Cypress hangs during execution of test suite

See original GitHub issue

Current behavior:

During a test run Cypress hangs and never exit, it doesn’t print anything in the stdout while it’s blocked.

From the DEBUG log can be seen that it goes in a kind of loop and prints cypress:server:util:process_profiler current & mean memory and CPU usage by process group every 10 seconds until is terminated by the CI timeout

Desired behavior:

Cypress doesn’t hang and instead fails if something goes wrong.

Test code to reproduce

It’s not happening 100% of the times so I don’t know what’s the root cause, however I’ve attached a debug log

Versions

Cypress 4.0.2 - Chrome 78/Firefox 70.0.1 - Unix executionLogRedacted.txt

Issue Analytics

  • State:open
  • Created 4 years ago
  • Reactions:5
  • Comments:37 (2 by maintainers)

github_iconTop GitHub Comments

6reactions
patrick-silvera-ppcommented, Apr 28, 2022

Same issue has described by OP. I’m running a 75 specs test suite on 20 parallel machines.

Github Actions
Docker image cypress/browsers:node16.13.2-chrome100-ff98
cypress 9.5.4
cypress-cucumber-preprocessor 9.0.5

While i’m writing this, 5 runs out the 7 last runs are hanging in Cypress dashboard. This is costing quite a lot of CI money, even with a timeout set in Github Actions. I tried this without success:

  • remove before and after hooks
  • switch to Docker and use shm_size: 2gb
  • add more machines so there’s less specs running on each machine
  • disable video "video": false
  • "numTestsKeptInMemory": 0
  • switch to Electron instead of Chrome

This is random, I wish I could give you more info to address this issue. Is there any other way we could help? This has been a problem for a lot of people for 2 years now.

5reactions
Cubo25commented, Aug 6, 2020

Please I have this problem of running it locally … it hangs from time to time on headless mode with chrome … any ideas ?

Read more comments on GitHub >

github_iconTop Results From Across the Web

Troubleshooting | Cypress Documentation
If the smoke test fails to execute, check if a shared library is missing (a common problem on Linux machines without all of...
Read more >
Cypress freezing (Your tests are loading) - Stack Overflow
The solution was to downgrade to Webpack 4. In this case it is a known issue, there is an open Pull Request on...
Read more >
cypress-io/cypress - Gitter
The cypress hangs on the first test suite and the pipeline doesn't go forward. I tried to upgrade to cypress 3.6, but it...
Read more >
The Most Common Cypress Mistakes - Christian Lüdemann
Deterministic tests mean no conditionals in the test code. Each test execution will go through the same test flow. Quality > quantity when...
Read more >
Cypress + Github actions - tests hang indefinitely - Reddit
hi! As a preface - same tests on AWS codebuild execute well, from start to finish. However since I started playing with github...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found