question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

During Cypress video recording in CI, will some times fail

See original GitHub issue

Current 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:closed
  • Created 2 years ago
  • Comments:7 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
davidungiocommented, Aug 4, 2021

I’m following this issue as well. Parallel testing will sometimes cause videos to fail to process.

0reactions
jennifer-shehanecommented, Aug 9, 2021

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 to false to prevent this error from occuring or run each Cypress instance in a separate machine.

Read more comments on GitHub >

github_iconTop 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 >

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