cypress: Missing browserCriClient in connectToNewSpec

Current behavior

Sometimes when running tests (in CD, in docker), cypress simply fails.

We see:

Timed out waiting for the browser to connect. Retrying...
Error: Missing browserCriClient in connectToNewSpec

And then cypress.run returns:

{
  "failures": 1,
  "message": "Could not find Cypress test run results"
}

Notes:

  • we are running using the module api.
  • We are also using --quiet
  • It happens lot in 1 project in particular (~50% of the time):
    • For this project, it happens in the same place every time: after the first spec in the project has completed, and before the second spec has started
    • The first spec passes, and everything looks fine in the video
  • It also happens sporadically in other projects (3-4% of the time)

Desired behavior

tests to run without crashing (or some indication of what is being done incorrectly)

Test code to reproduce

unsure how to reliably reproduce. most projects run fine most of the time.

Cypress Version

12.17.3

Node version

16.20.0

Operating System

Linux / docker

Debug Logs

No response

Other

Looks like the same problem as https://github.com/cypress-io/cypress/issues/27241 and https://github.com/cypress-io/cypress/issues/24650

About this issue

  • Original URL
  • State: open
  • Created 10 months ago
  • Reactions: 11
  • Comments: 18

Most upvoted comments

Experiencing this with Cypress 13.6.0, running tests in Github Actions in docker