Questions tagged [electron]
Electron (formerly Atom Shell) is a framework created by GitHub that lets you write cross-platform desktop applications using HTML, CSS and JavaScript. Electron is based upon Node.js and Chromium.
electron
15,469
questions
0
votes
0
answers
18
views
Uncaught TypeError: Cannot read properties of undefined (reading 'send')
`Windows; MS Code; "Electron" 5.0.4, simple desktop text editing app
I get the following error after clicking the save button; the button is located on the "index.html" page in a &...
0
votes
0
answers
16
views
How to request an output from a usb device using usb library and node.js
I am creating an app to update the firmware on my usb device and need a way to check the progress on the update from the device's side. I am trying to figure out what exactly the output is so I can ...
0
votes
2
answers
25
views
Load locally saved files to tonejs
I am trying to create an app with the electron-react boilerplate where i can create audio files.
I found Tone.js, which allows me to play sounds but loading the sample files seems close to impossible. ...
0
votes
0
answers
12
views
Miracast Not Working While Electron App Running (RTSP Protocol Breaks)
I am experiencing an issue where Miracast stops working when my Electron app is running. Specifically, the RTSP protocol seems to break, causing the connection to fail.
Details:
Electron Version: 29.0....
0
votes
0
answers
47
views
Dropdown menu overlaps with component in Vue app
I had a Vue electron app, in which Home view component has 3 child components which are in single column one after the other, I have a b-dropdown in middle component when I scroll up the opened ...
0
votes
0
answers
19
views
Load React or Angular Component In OpenFin
I am trying to get an OpenFin app to run using the Platform API: https://developers.openfin.co/of-docs/docs/platform-getting-started
I can get a 'platform' running, and x2 panels using the example in ...
-1
votes
0
answers
15
views
How to create electron app that will replace windows desktop
How can i develop an app, that can be used instead of default windows desktop, couldn't find any tutorials online, so I'm asking here
I only found some ways of using kodi, but I want exactly electron ...
-1
votes
1
answer
48
views
How can i fix Electron problem: Error: ENOTDIR, not a directory?
I'm using an electron for the first time. I ran into a problem when building the application. I do everything according to the documentation, I use electron-forge. npm run make runs without problems, ...
-1
votes
0
answers
19
views
Electron squirrel startup app not getting removed from start up items after uninstallation [closed]
App not getting removed from start up items after uninstallation
this should be placed at top of main.js to handle setup events quickly
if (handleSquirrelEvent()) {
squirrel event handled and app will ...
0
votes
0
answers
9
views
Electron Forge resolving path to node module using absolute path rather than using relative path
I'm trying to create an app that include the get-windows npm package, but I cannot distribute my app because Electron Forge is using resolving the package to an absolute path rather than a relative ...
0
votes
0
answers
37
views
String contains non ISO-8859-1 code point
When I'm trying run my electronjs app and use window.loadURL('https://example.test'), I catch the following error from PrecacheCacheKeyPlugin.
Uncaught (in promise)
TypeError: Failed to construct '...
0
votes
0
answers
13
views
Runing WebDriverIo Test on Electron Application in Dev Mode
I am trying to use wdio for my electron project, its working very well when running it on the build (release/win-unpacked/)
but when I set the configuration file to use it directly in dev mode
...
0
votes
0
answers
34
views
How to add `tailwindcss` to my Vue + Electron Forge project?
I'm doing my first sample project using Vue + Electron Forge with the template vite+typescript. Now I want to add tailwind but I can't seem to find any useful documentation online.
This is my project ...
0
votes
0
answers
10
views
App not getting removed from start up items after uninstallation
App not getting removed from start up items after uninstallation
const key = new WinReg({
hive: WinReg.HKCU,
key: '\Software\Microsoft\Windows\CurrentVersion\Run'
});
const appName = 'airtel_reflect'...
1
vote
2
answers
67
views
Is it possible to add an eventListener to a custom title bar used for dragging the window in a frameless window?
Added a custom title bar to a frameless window in order to make the window draggable. The title bar shows, but eventListener won't fire:
main.js:
const createWindow = () => {
const win = new ...
0
votes
0
answers
25
views
Uncaught TypeError: Failed to resolve module specifier "monaco-editor". Relative references must start with either "/", "./", or "../"
I'm getting started using a Monaco Editor for an Electron JS application. So far I'm able to get the file content on a user's directory no problem but when I try to append it to a Monaco Editor is ...
0
votes
0
answers
23
views
Node.js Electron App renders a blank screen on start [closed]
I have an Electron app with Shadcn/ui, and when I start the program, I only get a blank white screen. In the console, I see no errors.
I tried using other guides, but they were either outdated or not ...
0
votes
0
answers
28
views
Builds for atypical templates using Electron + shadcn-ui not working as expected
I tried to create a simple app for desktop (windows) using electron + shadcn-ui. Everything was fine until the creation process, but I encountered a problem after the build.
PS C:\Users\user\Desktop\...
1
vote
0
answers
22
views
App threw an error during loadReferenceError: __dirname is not defined in ES module scope
I'm trying to build desktop app using Electron JS + React JS + Vite by using command (npm i electron-vite@latest)
It works fine, now there is a need to communicate to serialport, so installed (npm i ...
0
votes
0
answers
14
views
How to prevent system shutdown if an electron app is running
I want to send an api request when the user closes the app. I have managed to send an api request on that but on shutdown the request is not sent.
Is there any way in electron that we can prevent ...
0
votes
0
answers
13
views
Electron Forge with Vue 3 integration doesn't work
i want develop an Electron app integrated with Vue 3 using electron forge.
I've followed this official documentation
Electron Vue integration .
But when i run the command
npm start
the application ...
0
votes
0
answers
15
views
Does electron have a way to get information about the printer, including sub-sheet information, paper quantity, etc
ipcMain.handle('getPrinterAsync', async (_, args) => {
return this.windowPrint.getWindow().webContents.getPrintersAsync();
})
Does electron have a way to get information about the printer, ...
0
votes
1
answer
23
views
Electron: I keep getting undefined value from the main process in renderer process
I keep getting undefined value from the main process in renderer process. I am using ipcRenderer.invoke and ipcMain.handle.
main process (just cut down to this section):
ipcMain.handle('process-...
0
votes
0
answers
37
views
Annoying Error appear if i open devtool in electronJs app ( with react devtool installed )
I am working on an Electron application with React and Vite, and I have three main issues. Before I explain the problems, I will introduce the technologies I am using to clarify the issues and the ...
0
votes
0
answers
17
views
How to hide a frameless electron window on blur
I'm writing an electron app that should be shown when clicking on it's tray icon, and should be hidden when clicking outside of the window.
This is how I created the window:
mainWindow = new ...
0
votes
1
answer
57
views
Unable to send message from javascript injected into webview - ipcRenderer undefined
I am wanting to send messages from javascript injected into a webview element using webview.executeJavaScript, to main or renderer scripts. What I found in several places on the web sounds pretty ...
-2
votes
0
answers
51
views
Error while running react - electron in browser - Uncaught ReferenceError: require is not defined
I am tryin to make a electron - react application and while running i am getting a error on the console of the browser.
Uncaught ReferenceError: require is not defined
at Object.events (bundle.js:...
-7
votes
1
answer
43
views
Create window app from react which can run offline [closed]
I have one react application which is deployed to digital ocean. And want to create it's .exe file to run on windows.
Some modules of app can be run offline. And this application is for restaurant ...
0
votes
0
answers
17
views
Bundling executable binary for each platform with electron-forge
I would like to bundle pandoc executable binary for each platform (for Windows, macOS, Linux) in my electron app using electron-forge.
I want to contain the binary in bin directory.
How I can ...
-3
votes
0
answers
16
views
How to minimize Electron V30
trying to minimize the window but can't
const electron = window.require("electron") electron.remote.getCurrentWindow().minimize()
mainWindow = new BrowserWindow({ frame: false, ...
-2
votes
0
answers
33
views
How to Prompt for Sudo Password Once and Reuse Elevated Privileges in an Electron App on macOS?
I'm developing an Electron app that periodically executes a C file requiring elevated privileges on macOS. I need to prompt the user for their sudo password once when the app starts and use these ...
0
votes
0
answers
33
views
Use electron-forge's vite,typescript template to open child window in renderer.ts
I am trying to create a desktop app using the electron-forge vite,typescript template.
this:
https://www.electronforge.io/templates/vite-+-typescript
//main.ts
import { app, BrowserWindow } from '...
0
votes
0
answers
22
views
Device Compatibility Policy When Displaying Sharepoint Site in Electron Webview
I am trying to display a sharepoint web site inside an electron application using BrowserWindow and webview.
After I login and pass MFA, it shows an error message complaining device or client ...
0
votes
0
answers
16
views
Encoding error while running Electron tutorial in Windows 10
I'm starting the intro tutorial for Electron in VS Code on Windows 10:
https://www.electronjs.org/docs/latest/tutorial/tutorial-first-app.
main.js
console.log('Hello from Electron 👋')
Instead of the ...
-2
votes
0
answers
23
views
Issues with SQLite3 and the sqlite3 module in Electron
I've got an Electron application, with a simple SQLite3 database that is set up using DBeaver. The structure of the project is as follows:
- models
- dataManager.js
- dbConnector.js
- data.db
- ...
0
votes
0
answers
19
views
electron app not saving cookie from localhost
I want to set a cookie using Set-Cookie header from my local server which runs on http://localhost:3000. In my electron app when i send the cookie I get this error and the cookie is not saved and is ...
0
votes
0
answers
26
views
How to make my Electron application serve a website
I am trying to build a "Stream Deck" like application, basicaly it should be a .exe built from electron that has an express api, a renderer to configure the application and a website that ...
0
votes
0
answers
12
views
how to import a plugin to a Typescript electron app with plugin system manager?
i'm in the process of making an electron app that will support a plugin system that will not cause any changes in the app it will only load components which are the plugins i want to load.
and im ...
0
votes
0
answers
26
views
Does Vite allow for native node modules (.node file) in an electron app?
When using webpack I was using a require statement. Switching to an import statement doesn't seem to solve the problem. Am I just barking up the wrong tree here? Thank you in advance!
0
votes
2
answers
515
views
Is there any way to get around macOS Sequoia prompt for continued access to screen and audio permissions?
I am currently developing an Electron application with a companion Swift application that takes screenshots of the user's screen on keypress. It also takes a 1x1 pixel screenshot of the screen from ...
1
vote
0
answers
49
views
node.js require returns a string
I created an Electron project with Vite.
And I imported Electron from the file to be used in the Worker.
No Electron object was returned, only the Electron installation path.
How do I get an Electron ...
-1
votes
0
answers
20
views
How can I require the electron module from within cordova's renderer process?
I created a plain cordova-electron application using this tutorial.
I am trying to access the ipcRenderer object of the electron module so I can receive events sent from the main process (cdv-electron-...
0
votes
0
answers
24
views
How to create a Windows installer with UAC prompt using electron-forge?
Is it possible for electron-forge to display a UAC prompt before installation? I looked at the Electron Forge documentation, and it doesn't have any configuration to allow a UAC prompt before ...
0
votes
0
answers
11
views
making an installation program for electron.js solution
I successfully made an electron.js solution and zipped up the file to hand over the work to the computer where it would be used. It is launched by typing : "npm start" from a command line ...
0
votes
0
answers
21
views
How to specify the update location for Electron Wix MSI installer?
We are considering Electron for our next app and we have several enterprise customers that require that they be able to change the install location. Because of this, I'm trying to use Electron Forge'...
0
votes
1
answer
19
views
Electron dialog.showOpenDialog doesn't respect filters on Linux
I want to filter when choose a file with showOpenDialog on Electron.
I would like to make user able to choose Markdown (md) only.
But it is not respected.
So now User can select a file of all type.
...
0
votes
0
answers
67
views
Whatsapp-web.js doesn't trigger "ready" event when running packaged app in electron
const { Client, LocalAuth, MessageMedia } = require('whatsapp-web.js')
const {timer, generateRandomTime} = require('./utils')
const log = require('electron-log')
const puppeteer = require('puppeteer')
...
0
votes
0
answers
21
views
Passing headers with session.protocol.handle
When trying to pass a resolved url from inside a protocol handler, session.fetch does not pass any headers. Using request.headers does not work, as it is also empty
I have tried getting the headers ...
0
votes
0
answers
36
views
Install tensorflow\tfjs-node on Windows 11
I've got a lot of problem installing TFJS
My situation:
Python v3.11.9 (from vscode terminal)
NodeJS v20.14.0 (from vscode terminal)
Windows 11
Visual Studio Community installed
What i've done:
...
0
votes
0
answers
16
views
File not found at new WindowsPtyAgent when using pty for a spawn process of running another file through cmd
I am working on a Desktop app with electron framework which always has a terminal open the output of the processes run is shown in that terminal. I am using node-pty for this but when I try to pass a ...