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
Cypress run won’t finish, stuck while making connection to Chrome #6540
Comments
@filiphric Can you also try running with |
Here it is:
|
Reporting in, I'm running into the same issue. using WSL 2 on Windows `Title: Error launching browser Message: Cypress failed to make a connection to the Chrome DevTools Protocol after retrying for 20 seconds. This usually indicates there was a problem opening the Chrome browser. The CDP port requested was 36647. Error details: Error: connect ECONNREFUSED 127.0.0.1:36647 Stack trace:
Let me know if DEBUG is needed as well and I can provide. FYI this problem only happens when running chrome. Headless works fine. I had this problem since Cypress 3.8 or so after upgrading to 4.1 issue still persists. It working before 3.8 as far as I recall |
This issue is the follow-up for #6053 and its fix #6133 (cc @bahmutov) happened for me as well, here's the build: https://github.com/sweetalert2/sweetalert2/commit/7d31830a6f7a9757e6a9efff56087f8501cd0e84/checks?check_suite_id=504036788 |
This comment has been minimized.
This comment has been minimized.
Ubuntu 19, Chromium, Version 80.0.3987.149 (Official Build) snap (64-bit) Message: Cypress failed to make a connection to the Chrome DevTools Protocol after retrying for 20 seconds. This usually indicates there was a problem opening the Chrome browser. The CDP port requested was 36771. Error details: Error: connect ECONNREFUSED 127.0.0.1:36771 Stack trace:
|
@tipsey same config . how to fix it ? |
This comment has been minimized.
This comment has been minimized.
I think the problem on Ubuntu 19 is Chromium is installed via SNAP process. Cypress works on Electron and Firefox(Beta) but I don't want to try a Deb install on Ubuntu because it may break future Chromium releases. I found a Link to do this but don't want to toast my Ubunut: https://shevchuk.co/notes/2019/12/13/install-chromium-on-ubuntu-1910-from-debian-instead-of-snap |
I have the same problem when I do
what's interesting is the tests run fine doing |
This comment has been minimized.
This comment has been minimized.
I've had this problem with Chrome too and after a bit of investigation I'm wondering if it has something to do with a change in Chrome itself. I've had this or similar issues definitely on Chrome 80 and 81 and different versions of Cypress with the latest 4.4.1 still an issue. When Cypress opens Chrome it does so with a large number of parameters. One of those parameters is Using a simplified version, when Chrome is opened like this it fails: However, if the loopback value is quoted then Chrome starts quite happily: Is there a simple workaround by setting the proxy bypass list? |
I tested the 4.2.0 version and the error does not occur anymore. So, like @79it said, I think that problem is related to Chrome. Editing, the error happened again in the old Cypress version. :( |
@79it You can modify the launch args sent to Chrome by following the instructions here: https://on.cypress.io/browser-launch-api#Modify-browser-launch-arguments I've reviewed the comments/logs here and have not found many commonalities between the environments across people reporting this problem. A couple of things that are common:
I haven't fully verified the 3rd assertion, but from the few logs provided, they all indicated that the error occurred after a large number of spec files ran (38+). Some questions:Please if you can answer the questions below if you're experiencing this issue.
I guess my theory is that this may be related to longer runs or runs that connect to the CDP several times over several spec files. Also, tracking these debug logs specifically may be helpful in seeing if any leftover processes haven't existed properly. |
Hey @jennifer-shehane thank you for taking a look into it. I have been experiencing this lot less recently, but I can’t put my finger down on what might have caused this. to answer your questions:
I’ll make sure to run with a debug if it might happen in close future |
I have found a workaround that worked in my Mac. I run cypress through the API: const cypress = require("cypress");
const path = require("path");
const configFile = path.resolve("cypress.json");
cypress.open({ configFile }); |
I face a similar issue running my tests in browser edge 83. It is hard to reproduce the issue, since it happens quite randomly. Like mentioned above, usually one of the last tests fails. When I'm running my tests in egde in mode headed, all tests running fine. Current Setup:
I'm running my tests local with the command: npx cypress run --browser edge --headless Browser launch arguments: |
I assume that this problem is a copy of #7450. I solved my problem by adding the following workaround provided by @stevejefferies.
To run all test in edge without problems, you have to extend the if condition by adding the following:
Now, tests are running fine in chrome as well as in egde using headless mode. |
@simisimon that fixed worked for me. Thank you! :) |
Me too! Thanks! :D |
@simisimon !!! now we can finally run in chrome! every test file now runs 10-20 seconds faster THX 👍 🥇 |
@simisimon That doesn't work for me, unfortunately |
I was missing the line
|
This was the fix for me! Thank you! |
@flotwig why would |
this solve my problem too, very much Thanks to you! |
@bahmutov not sure, as of 3.8.1 we explicitly connect to cypress/packages/server/lib/browsers/protocol.ts Lines 88 to 96 in 57f5f9a
|
@flotwig @bahmutov module.exports = (on, config) => { now I'm getting the same error "Cypress failed to make a connection to the Chrome DevTools Protocol after retrying for 50 seconds. also added 127.0.0.1 localhost - not helped(also tried to add my test domains to localhost file) |
CYPRESS NOT BEING ABLE TO CONNECT TO CHROME 86 Hi, I am facing the same issue of Cypress not being able to connect to Chrome. If I try to run my tests using Firefox Beta or Electron, it works. What's the problem with Chrome? I have added the following code, but the problem persists. I mention the fact that everything worked fine until yesterday. |
Same with me.. tests doesn't not start to run on Windows 10, Chrome Version 86.0.4240.183 (Official Build) (64-bit). With Firefox everything works |
Hi, |
Well, for me it just started to work magically without changing anything. During the period of time when cypress was not working with Chrome I have used Brave and everything was fine. |
Still doesn't work
Pagarbiai,
Asta Leonavičienė
…On Fri, Dec 4, 2020 at 1:34 PM DogaruRaluca ***@***.***> wrote:
Well, for me it just started to work magically without changing anything.
During the period of time when cypress was not working with Chrome I have
used Brave and everything was fine.
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#6540 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AA2R5G4WVHRSK6W7DNWORJ3STDCODANCNFSM4K2DQRGQ>
.
|
Hi, Any news on this issue? Previously this fix seemed to fix the issue for us but it stopped working again. We keep getting this error: |
Also facing the same problem and at this point I have a question: as long as this happens on headless chrome, and in fact CI/CD pipelines usually use headless chrome runs, could they also fail due to this error? |
Facing the same - upgrading to using the 6.2.0 image seemed to fix the issue temporarily but facing the issue again. |
The code for this is done in cypress-io/cypress#14348, but has yet to be released. |
Released in This comment thread has been locked. If you are still experiencing this issue after upgrading to |
Current behavior:
I’m getting error:
Cypress failed to make a connection to the Chrome DevTools Protocol after retrying
during my tests. Usually happens during one of last tests (probably the last). I have multiple Cypress projects, happens on all of them. Tests are running in parallel, on Chrome.Test code to reproduce
Issue happens quite randomly, I’m sorry, but I cannot really give a reproducible example, since this happens in CI only. Sending screenshots.
Versions
Cypress 4.0.2
CI: Bitbucket Pipelines
Image: cypress/browsers:node13.6.0-chrome80-ff72
The text was updated successfully, but these errors were encountered: