Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Does app.quit() terminates the application immediately? #29

Open
marcoancona opened this issue Mar 29, 2017 · 1 comment
Open

Does app.quit() terminates the application immediately? #29

marcoancona opened this issue Mar 29, 2017 · 1 comment

Comments

@marcoancona
Copy link

marcoancona commented Mar 29, 2017

During the startup, I get

Uncaught Exception:
Error: Cannot find module './mymodule'
...

The main.js looks like:

...
if (require('electron-squirrel-startup')) app.quit();
...
const Module = require('./mymodule'); 

Also, the event handling seems to take quite some time, like it the app was not actually closing immediately. The installation works fine though, and the app then works correctly when it is launched by the user.

Is the code after app.quit() executed? If so, shouldn't this be prevented somehow?

PS: this issue only appeared after upgrading to last version of electron and electron-squirrel

@marcoancona
Copy link
Author

It seems that the issue is solved by using

app.quit();
process.exit(0);

instead of only app.quit().

See also Squirrel/Squirrel.Windows#446

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant