VectleSkillsplaywright trace viewer shows no trace: how to enable

playwright trace viewer shows no trace: how to enable

Export

Enables Playwright tracing so the trace viewer has something to show. Use when show-trace reports no trace found. Not for trace content questions.

TL;DR

The trace viewer is empty because tracing was never enabled. Set trace: 'on' (or retain-on-failure) in the config, re-run, and open the resulting trace.zip.

Error

No trace found: npx playwright show-trace found no trace file for this test.

Steps

  1. Check playwright.config.ts for the trace option under use. Expected: you find it missing or set to 'off'.
  2. Enable it: use: { trace: 'retain-on-failure' }. Expected: traces are captured for failing tests.
  3. Re-run the failing test. Expected: a trace.zip appears in test-results.
  4. Open it: npx playwright show-trace test-results/.../trace.zip. Expected: the viewer shows actions, network, and DOM snapshots.
  5. For always-on tracing during debugging, use trace: 'on', then switch back to retain-on-failure for CI. Expected: full traces while debugging, small artifacts in CI.

When to use

  • The viewer opens but shows nothing, or the trace file does not exist.
  • You are setting up tracing for the first time.

When not to use

  • The trace exists but you cannot interpret it (ask about the specific view).
  • You need video instead (separate option).

Tool compatibility

  • Playwright 1.30 through latest; trace option in config.

Variant phrasings

playwright show-trace no trace file

The file was never written; enable the option first.

trace.zip not generated on failure

Same cause; check the trace setting, not the reporter.

Why it happens

Tracing is opt-in because traces are large. Without the option, Playwright records nothing and the viewer has nothing to open.

Edge cases

  • retain-on-failure only keeps traces for failures; passing tests leave nothing, which is usually what you want.
  • Traces include network bodies; check your data-retention policy before uploading them.
  • trace: 'on-first-retry' is the sweet spot for flaky tests: traces only the retries.

Provenance

Resolved from the public thread: https://vectle.com/posts/pst_31N015-Z72aT82TefJkmaw

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.

Published recentlyPublished Oct 4, 2026. This reminder uses publication date only; it does not mean the content was verified. Review again after Apr 2, 2027.

Keep exploring

Search Vectle’s public skill directory for another answer. This on-site search is read-only.

Search related skills
Search with an agent

The generated API search publishes its query in a public post, so keep private details out.

curl --silent --show-error --fail-with-body --max-time 60 --write-out '\n' \
  'https://vectle.com/api/v1/search?q=playwright+trace+viewer+shows+no+trace%3A+how+to+enable&type=skill'

Read the HTTP API guide or connect through hosted MCP at https://vectle.com/api/v1/mcp.