Closed benoitroy closed 7 years ago
After much headbanging and reading ..which hinted at antivirus software interfering with electron browser windows... I found out that this guy ePowerEvent.exe was the root cause of the issue (this will only exists on Acer computers). Killing the process allows electron apps/windows to launch now.
Closing for good.
Ran into this myself today, but somehow didn't come across this issue when googling. Ended up coming to exactly the same conclusion after a days-worth of headbanging and life-questioning. Just want to add some extra context here for other googlers and hopefully help prevent our pain from happening to anyone else...
This affects electron 1.5+. Electron 1.4 and earlier aren't affected. On electron 1.5, electron 1.6, electron 1.7 and onwards, a new browser window will simply not open. There is no other indication that a problem has occurred. I notice two background electron processes running, and one node.js process running. Killing them doesn't result in any error message unless they were started with npm start instead of electron . in which case you get the npm error messages above. This was all tested with the electron quick start app. The electron quick start app won't work.
You might think that your electron app will only run once, or that electron will only open one window. You might notice that electron will only work if you run it immediately when Windows first starts. You might think something is preventing electron from starting. "Why won't my electron window open?", you might ask!
And, as noted above... if you're using an Acer computer, the answer is ePowerEvent.exe. For whatever stupid reason, it messes with electron apps. Kill it, and your problems will magically go away.
I'm going to bed.
I've spent weeks on the issue sparsely. Thank god now I can use all the electron apps. One weird thing though, I noticed that atom was not affected by this. Not too sure what's going on with it. Maybe it's using some other methods of rendering the window? Anyway, thanks to you guys!
While the above fix works, it's not ideal to have to have users kill processes on their computers. Many users may download the software and simply think it doesn't work and uninstall. Does anyone know of a solution that can be permanently built into the app?
And thanks @benoitroy for figuring it out, you saved us a lot of time! 👍
Just to keep the issue alive - it is still present in electron 1.7.11 and killing ePowerEvent.exe helps. Thanks @benoitroy !
I can confirm in 1.7.12 this is still present. And this is even without and ePowerEvent running. Doesn't leave any errors or anything. I can also see that 3 processes of my app start and then one closes leaving only 2 processes, yet I only see one window
I can confirm this is an issue in 1.8.3, killing those processes fixed the issue and we were able to run the app, thanks a lot for this!
Does someone in this thread have some javascript code to share to kill these processes automatically on opening of the application?
I have electron Version 4.1.4 and seemingly the same problem? This is a major drawback for production use is there a good solution?
I ended up writing some Windows native code to kill ePowerEvent.exe if I detect it on the system...granted my app is also running with admin mode.
Clearing cache
C:\Users\
How do you kill ePowerEvent.exe!? I can't seem to find it under processes...
Clearing cache C:\Users
\AppData\Roaming worked for me
Worked for me too
My particular finding: the packaged Electron App I was running had a space in the file name e.g. 'My App'. On a Windows 7 instance it started fine. On 'A' windows 10 box the execution resulted in nothing...no Electron.exe in TaskMgr or anything. When I did another build, I accidentally created a package without the space "MyApp' and behold, it ran beautifully! The puzzling thing is that I have other apps with spaces in their names. Seems to only affect Electron Apps.
Clearing cache C:\Users
\AppData\Roaming worked for me
You the MVP! Lost hours trying different electron versions and chasing log files. And it started seemingly completely out of the blue.
I'm working from office and home workstation, so I usually start with git pull && npm install. This time, after doing the npm install, electron window did not appear. I console.logged in the main.js, and it seemed app never received the ready
event.
Deleting app folder from Roaming did the trick. Maybe newer electron version didn't like something in the older Roaming dir?
If you are here and nothing from the above worked, you might want to remove those lines from src/background.js
if (isDevelopment && !process.env.IS_TEST) {
// Install Vue Devtools
// Devtools extensions are broken in Electron 6.0.0 and greater
// See https://github.com/nklayman/vue-cli-plugin-electron-builder/issues/378 for more info
// Electron will not launch with Devtools extensions installed on Windows 10 with dark mode
// If you are not using Windows 10 dark mode, you may uncomment these lines
// In addition, if the linked issue is closed, you can upgrade electron and uncomment these lines
try {
await installVueDevtools();
} catch (e) {
console.error("Vue Devtools failed to install:", e.toString());
}
}
This might be fixed with Electron 8.2.5.
Make sure you're only calling MacOS specific methods, like setTrafficLightPosition()
, within a Mac environment.
Please ensure you have this piece of code setup:
function server(currentWindow) {
app.on('ready', () => {
currentWindow.show(); // currentWindow is from parent window setup, something like second part of code
});
}
windows.main = new Window({
height: 768,
hideOnClose: true,
show: true,
width: 1024,
});
server(windows.main);
Running into this issue on windows10 64bit (node-8.0.0, npm-5.0.2).
The application window doesn't launch after an npm start or a electron ./app/main.j or a electron . on a very simple hello world type app. However I do see an electron.exe process in TaskManager. If I manually terminate the process I get the following
And inpecting the logs files reveals a stacktrace just like electron/electron-quick-start#155.
The only way I can get this to launch is by using electron-builder with build --ia32 packaging, the 64bit build doesn't launch either.
All is well in Ubuntu 16.04 land.