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

Failed to connect to firefox retrying in 1 second #18919

Closed
nitro2112 opened this issue Nov 15, 2021 · 12 comments
Closed

Failed to connect to firefox retrying in 1 second #18919

nitro2112 opened this issue Nov 15, 2021 · 12 comments
Assignees
Labels
stage: investigating Someone from Cypress is looking into this

Comments

@nitro2112
Copy link

Current behavior

After upgrading OS to Cypress has problem with Firefox driver initialization. Sometimes tests runs after 4 retries, sometimes after 50 retries, but and usually it fails after 62 retries.

Issue appear after upgrade OS to Microsoft Windows Server 2019 (10.0.17763). Issue also appear on Microsoft Windows Server 2022 (10.0.20348)

Desired behavior

In this situation Cypress should run test scenarios like in older OS versions or like for Chrome or Edge browsers on current OS.

Test code to reproduce

Tests are executed by package.json script: "e2e_firefox_cli": "tsc && cypress run --browser firefox --headless"

Cypress Version

9.0.0

Other

I saw this problem appeared after upgrading the OS from Microsoft Windows Server 2017 to Microsoft Windows Server 2019.
Cypress was version: 8.6.0,
Firefox was version: 93 (headless)

@merrua
Copy link

merrua commented Feb 13, 2022

I noticed this issue with
package.json
"cypress:run:firefox": "node_modules\.bin\cypress run --browser firefox",

I opened Firefox on the machine and let it updated and it then ran correctly. It may be related to Firefox needing to update?

@BlueWinds
Copy link
Contributor

We did have another user report an issue with Windows Server 2019 a couple weeks back - #19756 - but it wasn't entirely clear what was going on there, and they were having trouble with electron rather than Firefox.

I don't have ready access to a windows server box, so it's fairly hard for me to help directly - best I can do is offer some links to our troubleshooting guides and some suggestions to try.

  1. You might be able to learn more from the DEBUG logs.
  2. Can you open firefox headlessly outside the context of Cypress? It's worth trying to figure out if this is an issue with cypress or with firefox on your system.

@Rich-Farmbrough
Copy link

I'm seeing a similar issue , running the sample tests on Firefox under Debian:

Still waiting to connect to Firefox, retrying in 1 second (attempt 18/62)
...
Still waiting to connect to Firefox, retrying in 1 second (attempt 26/62)

After this the test runs. It seems very consistent. I'm wondering if the timeout is just a little too fast.

@DomyNithanth
Copy link

DomyNithanth commented Apr 4, 2022

Any update on this issue?
Facing the issue when running via VM, but the local run is working fine.

package.json script:
"testsuite": "tsc && cypress run --browser firefox

Cypress Version : 9.5.2
Firefox version : Firefox 98
Node Version: v10.15.3

image

@BlueWinds
Copy link
Contributor

Any update on this issue? Facing the issue when running via VM, but the local run is working fine.

package.json script: "testsuite": "tsc && cypress run --browser firefox

Cypress Version : 9.5.2 Firefox version : Firefox 98 Node Version: v10.15.3

We've been unable to trigger this ourselves. It's clearly a real issue, affecting multiple people, but without the ability to trigger it ourselves, it's very difficult to investigate or get any idea what's going on.

As I posted earlier in the thread, it's possible that the debug logs might contain more information to help track it down - you could try enabling them (be warned, they are quite verbose though).

@JohnLukeBentley
Copy link

I'm getting this sort of error after an upgrade to Cypress 10.0.1 (which distinguishes, for the first time, End to End V Component testing).

I've successfully migrated my project and can run End to End (e2e) tests in Chrome. But I can't run these in firefox ...

> npm test

> testers@1.0.1 test
> npx cypress open


Still waiting to connect to Firefox, retrying in 1 second (attempt 18/62)
Still waiting to connect to Firefox, retrying in 1 second (attempt 19/62)
Still waiting to connect to Firefox, retrying in 1 second (attempt 20/62)
Still waiting to connect to Firefox, retrying in 1 second (attempt 21/62)
Still waiting to connect to Firefox, retrying in 1 second (attempt 22/62)
[etc ...]

To get that failed result I:

  • (In effect) from the command line run npx cypress open. That is, npm test references scripts: { ..."test": "test": "npx cypress open"}} ... in package.json.
  • The Cypress test environment opens and I choose [E2E Testing]
  • Firefox is selected. I choose [Start E2E Testing in Firefox]
  • The Cypress test runner (browser) opens, with the browser body being blank and the "Still waiting to connect to Firefox, retrying in 1 second" messages being output to the command line (as above).

Windows 10 64bit Pro 21H1 (19043.1706)
Firefox 101.0 (64-bit).

@TatyCat
Copy link

TatyCat commented Jun 13, 2022

I'm getting this sort of error after an upgrade to Cypress 10.0.1 (which distinguishes, for the first time, End to End V Component testing).

I've successfully migrated my project and can run End to End (e2e) tests in Chrome. But I can't run these in firefox ...

> npm test

> testers@1.0.1 test
> npx cypress open


Still waiting to connect to Firefox, retrying in 1 second (attempt 18/62)
Still waiting to connect to Firefox, retrying in 1 second (attempt 19/62)
Still waiting to connect to Firefox, retrying in 1 second (attempt 20/62)
Still waiting to connect to Firefox, retrying in 1 second (attempt 21/62)
Still waiting to connect to Firefox, retrying in 1 second (attempt 22/62)
[etc ...]

To get that failed result I:

  • (In effect) from the command line run npx cypress open. That is, npm test references scripts: { ..."test": "test": "npx cypress open"}} ... in package.json.
  • The Cypress test environment opens and I choose [E2E Testing]
  • Firefox is selected. I choose [Start E2E Testing in Firefox]
  • The Cypress test runner (browser) opens, with the browser body being blank and the "Still waiting to connect to Firefox, retrying in 1 second" messages being output to the command line (as above).

Windows 10 64bit Pro 21H1 (19043.1706) Firefox 101.0 (64-bit).

I had the same issue with Cypress trying to connect to Firefox repeatedly. I was able to finally connect to Firefox after closing Cypress and updating npm and npx.

Windows 11 64bit

@JohnLukeBentley
Copy link

@TatyCat, thanks for your comment. There's no need to quote the whole post, if you are responding to it, just below.

(I've since discovered) #18919 is the main issue for this. Updating to cypress 10.1.0 did change this for me (and I'm on the latest Node.js LTS, 16.15.1).

@TatyCat
Copy link

TatyCat commented Jun 23, 2022

@JohnLukeBentley You're welcome.

@emilyrohrbough
Copy link
Member

emilyrohrbough commented Jun 23, 2022

@JohnLukeBentley Its hard to tell if this relates to you, it sounds like it does though. Take a look at: #22086 (comment)

If this indeed appears to be consistent with the error you are seeing, I'd like to close this issue as a duplicate to track this progress in one place.

@cypress-bot cypress-bot bot added stage: investigating Someone from Cypress is looking into this and removed stage: backlog labels Jun 23, 2022
@emilyrohrbough emilyrohrbough self-assigned this Jun 23, 2022
@mjhenkes
Copy link
Member

Closing as a duplicate of #22086

@JohnLukeBentley
Copy link

@emilyrohrbough the comment you point to is part of the thread, #18919, that I'd previously pointed to (as the more relevant thread). But good of you to tag me in any case. And indeed the current thread is now rightly close (at least there was no need to keep it open on my account).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
stage: investigating Someone from Cypress is looking into this
Projects
None yet
Development

No branches or pull requests

9 participants