question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Firefox randomly failing to start in CI

See original GitHub issue

Current behavior:

When running tests with Firefox in CI (GitHub Actions), it randomly fails to start with this error:

Cypress could not connect to Firefox.

An unexpected error was received from Marionette connection:

Error: cannot open socket

To avoid this error, ensure that there are no other instances of Firefox launched by Cypress running.

It may be linked to #6504 , but because the environment seems to be different, I think a new issue is more appropriate.

Desired behavior:

Cypress runs reliably everytime.

Test code to reproduce

Repository: https://github.com/Seb-C/test-cypress-action CI script: https://github.com/Seb-C/test-cypress-action/blob/master/.github/workflows/tests.yml (all tests are the default one when we first do cypress open in a new project)

Runs history (showing the randomness): https://github.com/Seb-C/test-cypress-action/actions Logs of a failed run: https://github.com/Seb-C/test-cypress-action/runs/625344325?check_suite_focus=true

Versions

  • GitHub actions
  • Ubuntu 18.04.4 LTS
  • Firefox 74.0.1
  • Cypress 4.4.1

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Reactions:1
  • Comments:9 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
flotwigcommented, May 15, 2020

Yeah, so the initial connection timeout was only 2.5 seconds, which seems way too short. 20 seconds still occasionally timed out, but 50 seconds seems to be a good sweet spot from my testing (failures are unrelated to this issue): https://github.com/flotwig/test-cypress-action/commits/master

Opened a PR: #7372

1reaction
flotwigcommented, May 12, 2020

@jennifer-shehane This can be reopened, it seems like #6392 is distinctly about an issue on Windows when launching the second spec via Firefox, and this issue is more about an issue intermittently launching Firefox which can happen on any system.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Firefox keeps crashing at startup | Firefox Help - Mozilla Support
If Firefox keeps crashing when you try to start it and other solutions don't work, a clean reinstall can often fix the problem....
Read more >
Avoiding intermittent tests - Firefox Source Docs - Mozilla
Intermittent oranges are test failures which happen intermittently, in a seemingly random way. Many of such failures could be avoided by good test...
Read more >
Debugging Intermittent Test Failures - Firefox Source Docs
First, try running the test in isolation. You can use the · Sometimes, though, a test will only fail if it is run...
Read more >
[Wayland] Firefox can self closed randomly (Exiting due to ...
Now, the Firefox 69.0.1 is always crashing when I try open the hamburger menu or type any text (url, text to search) into...
Read more >
Firefox won't start - find solutions - Mozilla Support
Failed to read the configuration file ... This error is caused by a problem with Firefox program files. The solution is to remove...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found