Vitest Storybook Browser Mode CI Disk Space Failures
Random `Failed to fetch dynamically imported module`, iframe disconnects, or browser connection closes can be real test bugs, but they can also be a disk-pressure symptom when Chromium, Vite, or the CI runner fills temporary storage mid-run.
Find what the runner can delete.
Leave your email now; the scan summary or failing job link can follow after the first reply. We send the free SafeDisk AI deletion trial step only if deletion risk is still unclear.
Useful symptoms
- Different stories fail on different runs.
- The same suite passes locally but fails on GitHub Actions or Azure DevOps.
- CI logs include `No space left on device` or disk warnings near the failure.
- Firefox passes slowly while Chromium fails or hangs.
- Sharding reduces failures because each runner handles less browser state.
Capture evidence before changing config
Add this around the browser-mode test step so each failure has disk, temp, and deleted-open-file evidence.
echo "== before =="
df -h
du -sh /tmp "$RUNNER_TEMP" "$GITHUB_WORKSPACE" 2>/dev/null || true
pnpm test:sb
status=$?
echo "== after =="
df -h
du -sh /tmp "$RUNNER_TEMP" "$GITHUB_WORKSPACE" 2>/dev/null || true
echo "== deleted open Chromium temp files =="
for fd in /proc/[0-9]*/fd/*; do
target=$(readlink "$fd" 2>/dev/null) || continue
case "$target" in
*"(deleted)"*)
size=$(stat -Lc '%s' "$fd" 2>/dev/null || echo 0)
pid=${fd#/proc/}; pid=${pid%%/*}
cmd=$(tr '\0' ' ' < "/proc/$pid/cmdline" 2>/dev/null)
printf '%12s pid=%-7s %s -> %s\n' "$size" "$pid" "$cmd" "$target"
;;
esac
done | grep -Ei 'chrome|chromium|playwright|vite|vitest' | sort -nr | head -80 || true
exit "$status"
Separate three failure classes
- Vite dependency optimization reload: look for `optimized dependencies changed. reloading` and add the named packages to `optimizeDeps.include`.
- Chromium temp pressure: look for many deleted-open `/tmp/.org.chromium.*` files and test Playwright launch flags, sharding, or lower browser concurrency.
- Runner storage exhaustion: check if workspace, artifacts, pnpm cache, Playwright browsers, or browser results consume the limited runner disk.
Safer fixes to try first
- Cache Vite optimized dependencies or explicitly include packages that optimize mid-run.
- Shard large Storybook suites before deleting cache folders blindly.
- Keep a disk snapshot in CI logs so future failures are measurable.
- Review Playwright/Chromium temp behavior before switching all tests to Firefox only.
Turn this into a CI storage deletion judgment
Copy the read-only check first. Request the free SafeDisk AI deletion trial only if the output, app state, or cleanup boundary is still not obvious.
Need a delete / confirm / protect answer for this runner?
Submit the form first; the failing job link can follow. We check whether free guidance is enough before asking for the free SafeDisk AI deletion trial.