A report-download test passes on a laptop and times out in CI. Set use: { trace: 'on-first-retry' } in your Playwright configuration and make sure the CI project allows a retry. This captures the first retry attempt, which makes the trace easier to keep for larger suites. If the retry passes, its trace still records that retry's run. Use retain-on-failure when you need to capture the failed first attempt itself.

Download the trace artifact from the CI run. Open it locally with npx playwright show-trace path/to/trace.zip. Select the action that failed and look at the recorded page state. If the page still shows Preparing report, check the network panel for a response from the report endpoint and note its status and timing.

Reproduce one explanation at a time

Try a fixture that makes the report request return an error. Check that the page surfaces an error message and that the test can assert on it. Then restore a successful response and confirm the download path. If the trace includes request contents or private page text, use a synthetic fixture before passing it to someone outside the team.

Distinguish an empty page from a blocked click

In Trace Viewer, inspect the failed action’s Before snapshot and its log. If the log says the button never became visible, look at the previous navigation and response before adjusting a locator. If the button was present but a loading overlay was still intercepting clicks, compare the overlay’s state with the report response on the timeline.

Write down the retry number, action name, and nearest relevant request. Use those details to make one focused reproduction. If the captured retry passed and the original failure happened earlier, use a failure-retention trace on a later run to inspect the original attempt.

Sources