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

Recent versions of Firefox on Windows do note close after test run completes. #1377

Open
the-t-in-rtf opened this issue Sep 26, 2019 · 5 comments

Comments

@the-t-in-rtf
Copy link
Contributor

the-t-in-rtf commented Sep 26, 2019

Recent versions of Firefox (I tested with 69) do not close after a test run. Steps to reproduce:

  1. On windows, checkout the testem repo.
  2. Install all dependencies
  3. Change to the examples/qunit_simple directory
  4. Run the command node ../../testem.js ci --file testem.json --launch Firefox

Please note, this behaviour is not unique to the qunit_simple example, you can see the same problem in the custom_reporter example as well. If you launch Chrome instead, all windows are closed as expected.

To investigate, I added -jsconsole to the Firefox args, which reveals these errors on startup:

Error: Can't find profile directory. XULStore.jsm:66:15
NS_ERROR_FAILURE: Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsIInterfaceRequestor.getInterface] 2 network-response-listener.js:86
NS_ERROR_FAILURE: Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsIInterfaceRequestor.getInterface] network-response-listener.js:86

If I run Testem on OS X with the same config, Firefox is closed as expected. If I add the -jsconsole option and run without the ci option, I see the last two errors on OS X, but not the profile directory error.

That suggests to me that at least on Windows the profile directory is either not being populated, or the path is unusable.

@the-t-in-rtf
Copy link
Contributor Author

Please note, if you add the -headless option to the Firefox args, the tests will run and the browser will close as expected. We plan to use this as a workaround in CI for now.

@the-t-in-rtf the-t-in-rtf changed the title Recent versions of Firefox on Windows do note close after test run. Recent versions of Firefox on Windows do note close after test run completes. Sep 26, 2019
@step2yeung
Copy link
Member

Thanks for the investigations @the-t-in-rtf !!
I'm curious when you say That suggests to me that at least on Windows the profile directory is either not being populated, or the path is unusable.
How does the profile directory relate to the browser not closing?

@the-t-in-rtf
Copy link
Contributor Author

@step2yeung, I had previously assumed that there were some default settings not getting picked up, but in later investigations it seems like it might not matter. If I use the -headless setting with no other changes, the browser closes as expected. So we may have two problems, one of which is the "headed" Firefox not closing, the other of which is that someone creating a custom user_js might not have their settings respected.

@raido
Copy link

raido commented Nov 17, 2019

I've experienced the same issue after switching from Browserstack Firefox instances to Github Actions Windows machines.

Adding --headless browser argument resolves the issue for CI.

@duhrer
Copy link

duhrer commented Feb 21, 2023

This is still the case with recent versions of Firefox and the latest version of testem.

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

4 participants