cypress: Cypress crash with "There was an error reconnecting to the Chrome DevTools protocol"

Current behavior

Cypress in version 12.12 and version 12.13, randomly crash with the following error

There was an error reconnecting to the Chrome DevTools protocol.
Please restart the browser.

Also reported in stackoverflow [https://stackoverflow.com/questions/76302675/cypress-there-was-an-error-reconnecting-to-the-chrome-devtools-protocol/76371091#76371091] and reproduced by different users.

Resolved downgrading to version 12.11

Desired behavior

Cypress should not crash

Test code to reproduce

Any test

Cypress Version

12.12 / 12.13

Node version

18.4.0

Operating System

MacOs 12.5 / Ubuntu 20.04.6 LTS

Debug Logs

No response

Other

No response

About this issue

  • Original URL
  • State: closed
  • Created a year ago
  • Reactions: 10
  • Comments: 43 (15 by maintainers)

Most upvoted comments

Fyi for anyone following this issue - we released Cypress v12.16.0 today, but the fix being worked by @mschile above was not included despite the “12.15.1” version number. That is just a placeholder value and is not a guarantee of what version it might be released in.

We also have this lately quite often - cypress test runs became very unstable…

09:52:14  There was an error reconnecting to the Chrome DevTools protocol. Please restart the browser.
09:52:14  
09:52:14  TypeError: Cannot read properties of undefined (reading 'webSocketDebuggerUrl')
09:52:14      at _._fetchDebuggerURL (<embedded>:2460:520933)
09:52:14      at process.processTicksAndRejections (node:internal/process/task_queues:96:5)
09:52:14      at async _._start (<embedded>:2460:520232)

Thanks for the debug logs! I’ve created a test binary, if someone who can reproduce the issue give the binary a try and see if it fixes the issue.

npm install https://cdn.cypress.io/beta/npm/12.15.1/linux-x64/mschile/issue-26900_browserCriClient-9cbe5805a2344c866d27b38f5f95bec4784db058/cypress.tgz