Playwright · tool · fg-0318

No trace.zip for a failed test because the config records traces only on first retry

If you see test-results has no trace.zip for a local failure, the cause and the fix for Playwright are below, last verified 2026-10-15.

Verified Oct 2026trust 50/100
Symptom
test-results has no trace.zip for a local failureThe HTML report shows no Traces section for the failed test
Cause
The generated config uses trace: 'on-first-retry' together with retries: 0 outside CI. With no retry, nothing is recorded.
Fix
Use retain-on-failure, which records every test and keeps only the failing ones.
Apply
// playwright.config.ts use: { trace: 'retain-on-failure' } # or one run: npx playwright test --trace on
Affected
Playwright Test configs created by npm init playwright, all current versions
Sources

Last verified 2026-10-15 · Confirmed by 0 builders

Related traps

Have your agent know this before it fails

$ /plugin marketplace add getfootgun/footgun
$ /plugin install footgun@footgun