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: closed
- Created 3 years ago
- Reactions: 12
- Comments: 22 (3 by maintainers)
Experiencing this with Cypress 13.6.0, running tests in Github Actions in docker
OK I am able to reproduce this. Its similar to https://github.com/cypress-io/cypress/issues/28397. The logs provided suggest that the browser is exiting mid run (I don’t want to say crash because the exit code is 0). When that happens, we wait for the browser to reconnect up to 3 attempts. In this case though, since the browser closed, we closed the CRI client as well and we are able to successfully relaunch the browser, expecting the CRI client to be there, but its not so we get this error. I can reproduce it with this branch against this test suite. I will start exploring solutions shortly…
Are here any updates or solutions? @jennifer-shehane @mschile @AtofStryker