cypress: Build hangs on CI (Traivs)
Seeing this error for Cypress 2.0.0 and 2.0.1 on Travis CI. The build has finished successfully, but keeps hanging.
6 passing (25s)
(Tests Finished)
- Tests: 6
- Passes: 6
- Failures: 0
- Pending: 0
- Duration: 24 seconds
- Screenshots: 0
- Video Recorded: true
- Cypress Version: 2.0.1
No output has been received in the last 10m0s, this potentially indicates a stalled build or something wrong with the build itself.
Check the details on how to adjust your build configuration on: https://docs.travis-ci.com/user/common-build-problems/#Build-times-out-because-no-output-was-received
The build has been terminated
Example https://travis-ci.org/cypress-io/cypress-example-recipes/jobs/342663254
About this issue
- Original URL
- State: closed
- Created 6 years ago
- Comments: 22 (11 by maintainers)
I experience this issue today on CI (specs below). I tried running with Chrome (also inside Docker container) but experienced the same issue as using electron.
I’m on Cypress 3.0.2 and running on CircleCI.
As a workaround, I wrapped the Cypress runtime in a Node script and that allowed my test process to finish. Sharing the approach here in case it helps anyone else.
(uses the death package for process cleanup)
Then, in my bash script, I call
node ./run_cypress.js
rather than callingnode ./node_modules/.bin/cypress run
directly.Thanks for the debugging/fixes from the Cypress team. Look forward to getting this one solved!
Yup everyone is having the same issue. We’ve added more debug logs in
3.0.3
and came up with a workaround that’ll likely release after.It honestly makes no sense because it appears to be hanging on synchronous code randomly. With additional debug logs we should have a clearer picture but regardless we’ll figure it out.
To workaround this today
Just switch to using Chrome + our Docker containers (or install them yourself). I believe Chrome is already installed by default in Travis. That will “just work” as this is an Electron only problem.
@brian-mann It doesn’t seem to be related to me setting the videoRecording option. However, I upgraded to cypress 2.0.2 and ran a few times and have pasted the debug log below if it helps.
For a successful quit.
and a ‘hung’ run - was hung for 15 mins printing the logs from timers component till a SIGINT was sent from jenkins.
@sjones6 You may find our Module API helpful for doing what you’re doing. https://on.cypress.io/module-api
We have spent a considerable amount of time tracking this down and looking into it. The problem is that it fails randomly (and not in every CI provider). Because of that, it’s extremely difficult to understand the root cause.
It’s a high up item on our list and we’ll get it fixed soon. We prioritize problems in CI.
@brian-mann Seeing this error on jenkins 2.105 also. #1235 It looked like my error might be due to #674 but after seeing this issue- this is exactly what I see on jenkins also- everything completes fine but after that it just prints the cypress:server:timers sending, clearing and receiving messages on and on.