cypress: Cypress failed to make a connection to the Chrome DevTools Protocol after retrying for 50 seconds.
Current behavior
Randomly on a very slow windows machine I get this error:
Still waiting to connect to Edge, retrying in 1 second (attempt 62/62)
Cypress failed to make a connection to the Chrome DevTools Protocol after retrying for 50 seconds.
This usually indicates there was a problem opening the Edge browser.
The CDP port requested was 50325.
Error: connect ECONNREFUSED 127.0.0.1:50325
at TCPConnectWrap.afterConnect [as oncomplete] (node:net:1187:16)
Desired behavior
Cypress is able to connect to Chrome DevTools Protocol in X seconds. Please give a way to increase the timeout, or fix the issue that makes the connection fail.
Test code to reproduce
The problem is machine dependent, not code dependent, it can fail with any test.
Cypress Version
13.1.0
Node version
18.4.0
Operating System
Windows 10
Debug Logs
No response
Other
No response
About this issue
- Original URL
- State: open
- Created 3 years ago
- Reactions: 3
- Comments: 44 (18 by maintainers)
@alasdairrobinson
Thank you very much for reporting back your success!
It’s working:
Thanks again @MikeMcC399
@MikeMcC399 Thanks, I’ll try something similar in our yaml.
@Nmasmae
I didn’t do anything special to make it work. You can see the workflow on https://github.com/MikeMcC399/github-action/blob/test/edge-all-os/.github/workflows/example-edge.yml
Unfortunately I don’t have the skills to debug why it is taking a long time for Cypress to establish a connection to Edge. I also don’t know why it doesn’t appear to be a problem on the GitHub
macos-13runner, but only on Ubuntu and Windows.Since the connection time is long and variable, for some situations it succeeds and in other environments it times out. I made some other observations last year in https://github.com/cypress-io/cypress/issues/27830#issuecomment-1774829043. There hasn’t been any feedback on those points so far.
So after some more pipeline runs, it seems Node
20.xmakes it more reliable but not perfectly, I’ve had a crash due to this problem once out of 8 runs. It really feels not normal not to have this kind of feature running without the fear of a crash happening.On GitHub Actions workflow https://github.com/MikeMcC399/github-action/actions/runs/9894339824/job/27331610912 I am seeing Cypress having a hard time connecting to Edge 126 on Ubuntu and Windows. In the end, it does succeed. macOS showed no issue, but that may be coincidence.
It seems that there is still an underlying open problem.
This issue has not had any activity in 180 days. Cypress evolves quickly and the reported behavior should be tested on the latest version of Cypress to verify the behavior is still occurring. It will be closed in 14 days if no updates are provided.
For me it was working on Cypress 13.2.0, but its not working on 13.3.0. Using docker image with tag (cypress-13.3.0-node-20.6.1-chrome-116.0.5845.187-1-ff-117.0-edge-116.0.1938.76-1) and gitlab pipeline
Have the same issue in the Github Actions pipeline + locally, everything worked fine two weeks ago.
Since maybe it’s hard for you to reproduce and fix, and maybe can just be fixed by increasing the timeout. Can’t you just expose the option to increase the timeout? Something like browserConnectionTimeout in cypress.config.ts.