cypress: Cypress hangs during execution of test suite
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
About this issue
- Original URL
- State: closed
- Created 4 years ago
- Reactions: 6
- Comments: 38 (3 by maintainers)
Commits related to this issue
- Disabling Cypress video recording as it seems to make github actions hang. https://github.com/cypress-io/cypress/issues/6695#issuecomment-852811773 — committed to island-is/island.is by saevarma 3 years ago
- Disabling Cypress video recording as it seems to make github actions hang. https://github.com/cypress-io/cypress/issues/6695#issuecomment-852811773 — committed to island-is/island.is by saevarma 3 years ago
- Disabling Cypress video recording as it seems to make github actions hang. https://github.com/cypress-io/cypress/issues/6695#issuecomment-852811773 (#4326) — committed to island-is/island.is by saevarma 3 years ago
- Merge branch 'main' into financial-aid/webVeita-to-config-generateprofile-package * main: fix(api): Update XROAD_TJODSKRA_MEMBER_CODE value on staging and prod (#4314) fix(ci): Always run pullreq... — committed to island-is/island.is by addi 3 years ago
- Disabling Cypress video recording as it seems to make github actions hang. https://github.com/cypress-io/cypress/issues/6695#issuecomment-852811773 (#4326) — committed to island-is/island.is by saevarma 3 years ago
Same issue has described by OP. I’m running a 75 specs test suite on 20 parallel machines.
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:
shm_size: 2gb"video": false"numTestsKeptInMemory": 0This 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.
Please I have this problem of running it locally … it hangs from time to time on headless mode with chrome … any ideas ?
Yes our tests on Cypress also hang on Github Actions
I confirm I encountered the same issue and shm_size did the trick. But my question is: why does cypress require 2gb of shared memory?
@0xIslamTaha It works, a so big thank you !
Trying this ! Thx
we faced the same nasty bug and we managed to solve it by adding
shm_size: 2GBto the cypress service inside the docker composer but If u are usingdocker run ...instead of docker-composer then u can do something likedocker run --shm_size=2GB .....@premkumar-gg
cypress openshould be ahead mode process which gonna use the system memorySetting
shm_sizedid not work for me, and maybe someone here is wiser than me on why this is happening.In my pipeline, Cypress hangs for ~2 minutes while executing the last test (I’m not sure whether being the last is meaningful): https://github.com/photion/web-admin/runs/1200705923?check_suite_focus=true#step:7:287
Nothing special happens in the test. I have downloaded a video of the problem and Cypress literally hangs for 2 minutes, and then it executes the test (which actually takes ~1 second).
add
options: --shm-size 2gband for more info check hereI’m also seeing cypress hanging, how does one obtain the Debug logs? Is it possible to print them to a file, since I cannot log in to my CI instance?
The Chrome requests to weird domains is normal behavior, see here: #3151