During Cypress video recording in CI, will some times fail
See original GitHub issueCurrent behavior
When running cypress run --parallel --record
sometimes video recording will fail and then both cypress dashboard and our CI will break.
CI will fail the step cypress dashboard never completes a run and will never “complete”
Warning: We failed to record the video.
1163 |
1164 | This error will not alter the exit code.
1165 |
1166 | Error: ffmpeg exited with code 1: /********/src/packages/cypress2/cypress/videos/browser/auth/login.spec.ts.mp4: No such file or directory
1167 |
1168 | at ChildProcess.<anonymous> (/root/.cache/Cypress/7.7.0/Cypress/resources/app/packages/server/node_modules/fluent-ffmpeg/lib/processor.js:182:22)
1169 | at ChildProcess.emit (events.js:315:20)
1170 | at Process.ChildProcess._handle.onexit (internal/child_process.js:277:12)
1171
Desired behavior
Cypress recording succeeds
Test code to reproduce
not open source, sorry.
Cypress Version
7.7.0
Other
CI: Drone, running cypress via docker image
Issue Analytics
- State:
- Created 2 years ago
- Comments:7 (2 by maintainers)
Top Results From Across the Web
Screenshots and Videos - Cypress Documentation
Additionally, Cypress will automatically capture screenshots when a failure happens during cypress run . Screenshots on failure are not automatically taken ...
Read more >Record video only for failed test cases - cypress - Stack Overflow
Cypress confirms there's no way to do this right now during cypress run , since the tests are recorded before knowing if they...
Read more >Save The Page On Test Failure - Gleb Bahmutov
Sometimes a Cypress test fails on CI, and you cannot determine why the test has failed from the screenshot and video alone.
Read more >Running Cypress tests in parallel in GitHub Actions without ...
Making Cypress run in parallel can speed up your build times and help you have more confidence your app works correctly.
Read more >Screenshots and Videos in Cypress - Tools QA
Screenshots were the still images which capture the screen at a particular time. But, what if the automation tool provides a capability that...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I’m following this issue as well. Parallel testing will sometimes cause videos to fail to process.
We believe this error is ocurring when running multiple Cypress instances in parallel. There’s a larger explanation in this comment: https://github.com/cypress-io/cypress/issues/9128#issuecomment-894338562
And we’ll close this as a duplicate of #9128.
Cypress wasn’t originally built with the expectation of it being run on the same machine in parallel, so we’ll have to come up with a larger solution for this. This would not be fixed by the work in #17469 unfortunately.
For now you should be able to set
trashAssetsBeforeRuns
tofalse
to prevent this error from occuring or run each Cypress instance in a separate machine.