-
Notifications
You must be signed in to change notification settings - Fork 228
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
app.quit() is not noticed #131
Comments
I noticed a quit trouble with my case of a browser-kyosk project. It happened after about 300 executions. I am using Linux, Ubuntu 14+ with:
My case uses a a browser launcher script to launch and quit, first. When the script ends, an external (Forever daemon) system notices, and then it runs the node script again. Therefore, I have a sort of infinite testing cycle, which is by design. In this case it's a plain code (not using Mocha, etc) - the following source is the core of it aside from the external synchronous loop system. From a visual perspective, it got stuck, with the browser window open. When I killed, then I noticed another was there. So prior to get stuck, I believe that a twice were shown somehow. Looking in logs, all of the iterations showed a proper "Quit" output. I would think that it was Forever that caused the trouble but since the browser is open, I then thought about this report here.
|
I wonder if the chromedriver could be a reason here - mainly because I found this http://stackoverflow.com/questions/34563724/how-to-make-sure-only-single-chromedriver-exe-instance-is-running-in-background. And then it would be interesting to know exactly if spectron truly have full control over the chromedriver instance. |
It looks like there's a one-second delay before the value of |
I am having the same problem. I have some tests that are checking to make sure the app quits when all windows have closed. I hacked out a work around by executing the exec('pgrep <APPNAME>', (err, stdout) => {
if (err) {
// pgrep command did not work
// electron app is not running
} else {
// pgrep found some processes associated with <APPNAME>
// electron app is still running
}
}) |
is there any new solution for this problem. I can not get a test working, to check if the application has |
Having the same issue and seems |
Testing if my app is quitting correctly 😄
After
app.quit
t.context.app.isRunning()
still reportstrue
.https://github.com/electron/spectron/blob/aaf7b6964ed32f43c0955b0cb1af5eeb99938db0/lib/application.js#L86
t.context.app.stop()
will fail withError: chrome not reachable
.Manually doing
t.context.app.running = false;
fixes it.Not sure if this should be handled but maybe a note in the readme would be useful. I am leaving it to your judgment ;)
The text was updated successfully, but these errors were encountered: