Fixing Cypress errors part 3: miscellaneous and additional notes
This is the last part of this blog series on Cypress errors. There were some additional notes I made which didn't go into the previous posts. This blog post is less specific and more about general advice and some obscure errors I saw along the way.
Blog Series:
- Fixing Cypress errors part 1: chromium out of memory crashes
- Fixing Cypress errors part 2: cannot find element due to assertion timing out
This is the last part of this blog series on Cypress errors. There were some additional notes I made which didn't go into the previous posts. This blog post is less specific and more about general advice and some obscure errors I saw along the way.
Are you using the latest of everything?
Cypress is being actively developed right now, in the span of 2 months, I saw six minor updates. It is very likely any issues that you see, assuming it was something Cypress team could address, then it'll get resolved very quickly.
We were using cypress/included:4.5.0
at the start, I updated it to cypress/included:4.10.0
after reading a lot of bug fixes in the changelog. Unfortunately, upgrading to the latest version didn't help me much with my issues. However, if you are debugging a new issue that occurred on an exiting project, this might be the first thing to try. Cypress team provides an official changelog. So give that a read instead of blindly upgrading. Don't forget to watch out for those breaking changes!
Rare errors
Test runner exited unexpectedly
I saw this error once or twice during my instigation (running over 100 builds). It wasn't obvious what caused the problem, and I wasn't able to reproduce it since. Maybe just something to be aware of that this kind of errors could occur.
Failed to connect to Chrome
This error seems to be caused by the fact Cypress wasn't able to connect to Chrome. I'm not sure how this could happen when everything was running inside a Docker container on the CI pipeline.
Once again, I've only seen this error once after switching over from Electron to Chrome, and the failure also went away after triggering a rerun.