-
Notifications
You must be signed in to change notification settings - Fork 3.2k
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
3.7.0 - Cypress failed to make a connection to the Chrome DevTools Protocol #5912
3.7.0 - Cypress failed to make a connection to the Chrome DevTools Protocol #5912
Comments
I have the same issue as above, chrome, chromium & canary all trow this error. Electron is the only option that is working for me at the moment. Versions: |
Weirdly enough, I asked my colleague to try to run the same thing on his Mac (the same Mac OS Mojave, 10.14.4), everything worked as expected. Still can't find what's causing the issue for me :/ |
BTW I installed the Chromium, and selected it via the Cypress UI. The same error happens. I just wanted to check if it's something related to Chrome or not. |
I installed the project at home at another windows pc and it runs flawless. Tried at the office on multiple chromium, chrome and canary versions and it doesn’t work. Firewall is turned off, chrome has no user policies applied and proxies turned off. |
It looks like there's nothing else to do, but to start reading about Chrome DevTools Protocol. I'll try to see why a connection couldn't be established to it, but over the weekend. Kinda buried in work at the moment, trying to ship things :/ |
Are any of you also able to pin this down to a specific Cypress version? Like "it works in 3.4.1, but fails starting in 3.5"? |
Tried Now also installed the At this point, I believe there has to be something incorrectly configured on my Mac / Chrome. I don't think it's related to the Cypress itself, at least it doesn't look like it. This was tested with Chrome 79 and Chromium 61. |
Also had this on multiple versions, 3.5 and 3.7 on Windows 10 |
@doitadrian Do you see anything in You might also want to try launching Cypress with all other Chrome windows closed. If you can provide the full DEBUG logs, we can see what Chrome is launching with, maybe it is getting passed an incorrect |
Thanks @flotwig for the response. Checked the Tried closing all other Chrome windows, the same issue happens again. I can provide the full DEBUG logs, just not sure what would be the best way to get it. The following shows logs printed in the terminal, using Should I c/p everything to you? |
Seems policies are not the problem, but for me policies: |
@doitadrian It looks like Cypress is unable to spawn its own instance - you should not be seeing your browser extensions "AdBlock" and "Grammarly" inside of Cypress. This generally only happens because of some device management policy that sees the behavior of Cypress as malicious. Is your computer managed? A good workaround is to try running with the Chromium browser instead of Chrome. That may circumvent these restrictions. The built-in Electron should work as well. @ray1618 Same here - it's likely that there are other policies interfering with the correct launching of Chrome. Try Chromium, or the built-in Electron. |
Thank you for the response @flotwig! I'm sorry, I actually sent you the policies view from a regular Chrome that I use, not from the one that Cypress spawns. When I open the same thing now in that Cypress spawned Chrome, I get the following: My computer isn't managed. I tried running tests in Chromium and Electron, for both I get the same exact error, for example Electron: BTW, here is the entire c/p log of |
Hmmm... I wonder if |
Let me see... |
👍 👍 👍 👍 👍 👍 👍 👍 👍 👍 👍 👍 👍 👍 👍 |
Can't believe it, it works! 🎉🎉🎉🎉🎉 |
So yeah, I just commented out the following line in the `/etc/hosts/ file, and the thing worked:
Woa @flotwig, thanks a lot, not sure why this was happening nor why was this entry in my hosts file. 🍻🍻🍻 |
🍺 Glad you got it figured out. We try to stick to using |
do we show an error in this case in the terminal? Might mention /etc/hosts
file and give url to the error on our site with explanations and debugging
steps
…On Fri, Dec 13, 2019 at 4:47 PM Zach Bloomquist ***@***.***> wrote:
🍺 Glad you got it figured out. We try to stick to using 127.0.0.1 in the
test runner, never localhost, for exactly this reason. This should
probably get tracked down and changed to use 127.0.0.1 explicitly.
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#5912?email_source=notifications&email_token=AAQ4BJRII5IN5WGBZD2E42LQYP7G3A5CNFSM4JXRWUE2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEG3K5WI#issuecomment-565620441>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAQ4BJVX2OASZN4E4RLFF4LQYP7G3ANCNFSM4JXRWUEQ>
.
--
Dr. Gleb Bahmutov, PhD
Schedule video chat / phone call / meeting with me via
https://calendly.com/bahmutov
gleb.bahmutov@gmail.com @bahmutov <https://twitter.com/@bahmutov>
https://glebbahmutov.com/ https://glebbahmutov.com/blog
https://github.com/bahmutov
|
@bahmutov this error will happen anywhere we use |
As far as I'm concerned, we can close this issue, Not sure about @ray1618 though. Thanks again for the help guys, now let's write some tests 😊 |
Zach I am thinking right here at this error we can say “here is a link to debug this error”
…Sent from my iPhone
On Dec 13, 2019, at 16:51, Adrian Smijulj ***@***.***> wrote:
On my end, the only thing I received was:
And of course, the ECONNREFUSED errors in the console, which wasn't very helpful, hence this issue.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub, or unsubscribe.
|
@doitadrian I'll try editing the hosts file tomorrow |
Checked my hostfile, no redirects in here from ::1 my error looks the same as the screenshot of doitardrian
Only differnce that instead of ::1 it references to 127.0.0.1 |
@ray1618 This seems like a different issue than Adrian's. I know you mentioned that you have no Chrome policy set, but can you do me a favor? Double-check that, in the browser opened by Cypress, the URL If it is indeed blank, management is probably not the issue. You can try running your tests with debug logs enabled, and share those logs here. It will show some more information which we can use to get to the root of the issue.
Make sure to scrub any private data from the logs before sharing here. |
Hey @ray1618, any followup on the debug steps mentioned by Zach above? #5912 (comment) |
The code for this is done in cypress-io/cypress#5960, but has yet to be released. |
Released in |
Current behavior:
Basically, I'm having the same issue mentioned in the #5431. I installed cypress via
yarn add --dev cypress
, and just wanted to run tests that were initially provided.Logs (an excerpt) received after running
DEBUG=* cypress open
Desired behavior:
Be able to run tests.
Versions
Cypress 3.7.0
Mac OS Mojave, 10.14.4
Node v8.16.2
Yarn v1.15.2
Sorry if I missed some of the details, please let me know if I did.
Thanks for making this awesome piece of software :)
P.S. When I run
cypress run
, which should I guess run tests via Electron, I can also see theECONNREFUSED
issues.The text was updated successfully, but these errors were encountered: