WebSocket is not open: readyState 3 (CLOSED) error when watching test files

See original GitHub issue

Current behavior:

I edited and saved a test file and got this error printed to the Command Log.

WebSocket is not open: readyState 3 (CLOSED)

The error did not disappear upon refresh / reload. I had to kill the Cypress process and restart. Was fixed after this.

Screen Shot 2019-11-12 at 12 58 59 PM Screen Shot 2019-11-12 at 12 59 11 PM copy

Steps to reproduce: (app code and test code)

Unfortunately this did not happen again, so I don’t know what may have caused this. Documenting for anyone that captures more DEBUG logs in the future.

Versions

3.6.1

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Reactions:5
  • Comments:26 (9 by maintainers)

github_iconTop GitHub Comments

2reactions
MarioPuzzocommented, Dec 17, 2019

I get this if I leave cypress open while I make a coffee. Have to close the browser and click “run all specs” again

a mocha ?

2reactions
chrisbreidingcommented, Nov 21, 2019

I’ve seen this multiple times. It seems to happen when I leave the browser open for an extended period of time (usually overnight between working sessions). When I try to run the tests again, I get this error and need to close and re-open the browser for tests to run.

Read more comments on GitHub >

github_iconTop Results From Across the Web

How to wait for a WebSocket's readyState to change
If the WebSocket connection succeeds, readyState becomes 1, but if it fails, readyState is 3, and I should begin polling.
Read more >
WebSocket.readyState - Web APIs | MDN
The connection is open and ready to communicate. The connection is in the process of closing. The connection is closed or couldn't be...
Read more >
Error: WebSocket is not open: readyState 3 (CLOSED) ...
when I deploy my flow on node-red of raspberry, it always get out ""Communication send error: Error: WebSocket is not open: readyState 3...
Read more >
WebSockets and Node.js - testing WS and SockJS by ...
The first is connectToServer which opens a connection to our WebSocketServer and then returns a Promise that resolves when the WebSockets readystate property...
Read more >
react-use-websocket
Start using react-use-websocket in your project by running `npm i ... can close/unsubscribe from a WebSocket by passing false as the third ......
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found