cypress-io / cypress

Fast, easy and reliable testing for anything that runs in a browser.
https://cypress.io
MIT License
46.8k stars 3.17k forks source link

Fatal Crash Exits Early Without Ending Cloud Recording #28212

Open emilyrohrbough opened 11 months ago

emilyrohrbough commented 11 months ago

Current behavior

Observed in this CI run, we are hitting the fatal error:

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

TypeError: Cannot read properties of undefined (reading 'webSocketDebuggerUrl')
    at Chrome._fetchDebuggerURL (<embedded>:276502:27)
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
    at async Chrome._start (<embedded>:276473:21)

When this error is hit, we exit early because

If we cannot reconnect to CDP, we will be unable to move to the next set of specs since we use CDP to clean up and close tabs. Marking this as fatal

This ends the Cypress run without first sending the results to the Cloud. This in term has resulted in an incomplete Cloud run after 1 hr and 46 minutes, where we should have signaled the run was prematurely ending.

Cloud Run: https://cloud.cypress.io/projects/ypt4pf/runs/51995

Desired behavior

Push finished spec results to the Cloud, skip remaining specs and send message tot he Cloud the skipped specs could not run because of an issue with CDP.

Test code to reproduce

Unclear cause of error to repo.

Cypress Version

13.4.0

Node version

16.16.0

Operating System

Ubuntu 20.04.6 LTS

Debug Logs

Observed issue on Firefox browser. CDP issue unclear but unrelated to observed record behavior.

Other

No response

cypress-app-bot commented 5 months ago

This issue has not had any activity in 180 days. Cypress evolves quickly and the reported behavior should be tested on the latest version of Cypress to verify the behavior is still occurring. It will be closed in 14 days if no updates are provided.

mguetta1 commented 1 month ago

Following. I see the same error, not related to a specific test.

Timed out waiting for the browser to connect. Retrying...
There was an error reconnecting to the Chrome DevTools protocol. Please restart the browser.

TypeError: Cannot read properties of undefined (reading 'webSocketDebuggerUrl')
    at _._fetchDebuggerURL (<embedded>:628:579043)
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
    at async _._start (<embedded>:628:578342)

image

jennifer-shehane commented 1 month ago

@mguetta1 Are you using the puppeteer plugin with Cypress?

mguetta1 commented 1 month ago

@mguetta1 Are you using the puppeteer plugin with Cypress?

Hi, no.