-
Notifications
You must be signed in to change notification settings - Fork 3.3k
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
Tests from example_spec.js don't run in Chrome after newly installed cypress #680
Comments
From gitter chat: Mike Joyce @mcMickJuice 10:37 Jennifer Shehane @jennifer-shehane 10:39 Mike Joyce @mcMickJuice 10:39 Jennifer Shehane @jennifer-shehane 10:39 Mike Joyce @mcMickJuice 10:39 Jennifer Shehane @jennifer-shehane 10:39 Mike Joyce @mcMickJuice 11:01 Jennifer Shehane @jennifer-shehane 11:02 Mike Joyce @mcMickJuice 11:02 Jennifer Shehane @jennifer-shehane 11:03 Mike Joyce @mcMickJuice 11:03 Mike Joyce @mcMickJuice 11:13 Jennifer Shehane @jennifer-shehane 11:14 |
I was unable to replicate this exact behavior, but I have seen the WebSocket connection error before in a strange edge case where I had Cypress open in 2 projects with the same |
This was an issue with my hosts file. I had 127.0.0.1 mapped to a url that mapped to docker but not to localhost. After adding localhost to map to ip4, everything worked! |
I'm having similar error. My app when started tries to do some websocket connections (which is actually webpack's dev server hot loading feature), but occasionally those fail (the handling on the server side for this is more convoluted). Anyway, the effect is that app tries to open ws connection and server listens on proper port, but does not support http upgrade at that moment, so server drops connection. Cypress immediately seeing it kills itself, too, without even trying to run anything else, even if I have |
@Nopik we need a reproducible repo / issue opened to look at this. As it is right now Cypress runs on tons of projects with websocket connections so there is likely a deeper issue at hand. Would need some direction for us to be able to look at it. |
So I had the same issue: launching a Cypress test would open both the Chrome and Electron browser, but nothing would happen, their pages would remain blank. Turns out that the problem was that for some reason, obscure to me, and almost certainly completely unrelated to Cypress, my In short, if you're seeing this, maybe check your hosts file just in case? |
Wow, well - the obvious is not always the obvious. My story in short: Thx for the fix! |
I got logs similar to these. The problem was that my
file did not include a line:
|
Is this a Feature or Bug?
Bug
Current behavior:
Clicking example_spec.js opens up chrome browser but no tests appear. Theres also a console.warn stating "WebSocket connection to 'ws://localhost:8080/__socket.io/?EIO=3&transport=websocket' failed: WebSocket is closed before the connection is established."
Desired behavior:
I'd expect the tests that are included in the example_spec.js would run in browser. instead, nothing appears in the browser
How to reproduce:
node_modules/.bin/cypress open
from command lineexample_spec.js
in integration tests listThe text was updated successfully, but these errors were encountered: