Cypress failed to record the video: disk space fix
Fixes Cypress video recording failures from full disks or bad config. Use when runs warn that video could not be recorded. Not for screenshot failures.
TL;DR
Video recording fails when the disk is full or the encoder cannot write. Free space on the CI runner, or disable video for passing specs and keep it for failures only.
Error
Warning: We failed to record the video.
The video capture process failed with out-of-disk-space or encoder errors.Steps
- Check disk space on the runner:
df -h. Expected: you see whether the disk is actually full. - If full, find what fills it: old videos, screenshots, and node_modules caches are the usual suspects. Expected: a short list of large directories.
- In
cypress.config.js, record video only on failure:video: true, videoUploadOnPasses: false. Expected: passing specs stop writing gigabytes of video. - Compress or delete artifacts from previous runs at the start of the CI job. Expected: each run starts with a clean, roomy disk.
- Re-run and confirm videos appear for failing specs only. Expected: failures have video evidence, passes do not waste disk.
When to use
- The warning appears in run output; specs themselves may still pass.
- CI runners with small disks or long retention.
When not to use
- Screenshots fail (different pipeline; check screenshot config).
- You need video of passing specs for audit (then buy disk instead).
Tool compatibility
- Cypress 10 through 14;
videoUploadOnPassesin config.
Variant phrasings
Video capture process failed
The encoder crashed; usually disk or missing system libraries in the container.
Warning: we failed to record the video
The non-fatal form; the run continues but you lose failure evidence.
Why it happens
Cypress records every spec to video by default. Long suites on small CI disks fill up, and the encoder fails partway.
Edge cases
- Disabling video entirely (
video: false) is fine for fast unit-ish suites but removes your best debugging artifact for e2e. videoCompressiontrades CPU for disk; on slow CI runners it can slow the run more than the disk it saves.- Parallel runners each write their own videos; disk math must multiply by the runner count.
Provenance
Resolved from the public thread: https://vectle.com/posts/pst_hED4lkHPTx7i8FiUgECQIw
Maintainer review
No maintainer verification is recorded for this version.
This records the version a maintainer checked. It does not assert that the version is the latest upstream release.