Skip to content

fix(tracing): do not hang on unresponsive page when capturing snapshots - #42919

Merged
Yury Semikhatsky (yury-s) merged 4 commits into
microsoft:mainfrom
yury-s:fix-42903
Sep 24, 2026
Merged

Yury Semikhatsky (yury-s) merged 4 commits into
microsoft:mainfrom
yury-s:fix-42903

Conversation

@yury-s

@yury-s Yury Semikhatsky (yury-s) commented Sep 24, 2026 •

Copy link
Copy Markdown
Member

Summary

  • Race the DOM snapshot in _captureSnapshot against progress so a busy page cannot block before/after hooks forever.
  • Make await-must-use-progress lint rule see through optional chaining, which hid this case.
  • Version the progress eslint plugin by its source hash so rule changes invalidate the eslint cache.
  • Fix react-hooks/exhaustive-deps warning in trace viewer workbench.

Fixes #42903

await page.goto(server.EMPTY_PAGE);
await page.evaluate(() => {
setTimeout(() => {
while (true) {}

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nothing works on these pages, this test and change do not make sense.

@github-actions

This comment has been minimized.

@github-actions

This comment has been minimized.

@github-actions

This comment has been minimized.

@github-actions

This comment has been minimized.

@github-actions

This comment has been minimized.

@github-actions

Copy link
Copy Markdown
Contributor

Test results for "MCP"

3 failed
❌ [firefox] › mcp/sse.spec.ts:196 › sse transport browser lifecycle (persistent) @mcp-ubuntu-latest-firefox
❌ [firefox] › mcp/annotate.spec.ts:446 › should switch screencast to -s session on show --annotate @mcp-windows-latest-firefox
❌ [webkit] › mcp/sse.spec.ts:196 › sse transport browser lifecycle (persistent) @mcp-ubuntu-latest-webkit

8735 passed, 1480 skipped


Merge workflow run.

@github-actions

Copy link
Copy Markdown
Contributor

Test results for "tests 1"

4 flaky ⚠️ [chromium-library] › library/video.spec.ts:762 › screencast › should work with video+trace `@frozen-time-library-chromium-linux`
⚠️ [chromium-library] › library/beforeunload.spec.ts:130 › should support dismissing the dialog multiple times `@chromium-ubuntu-22.04-node20`
⚠️ [firefox-library] › library/browsercontext-cookies-third-party.spec.ts:257 › third party 'Partitioned;' cookies `@firefox-ubuntu-22.04-node20`
⚠️ [firefox-library] › library/browsercontext-cookies-third-party.spec.ts:470 › top level 'Partitioned;' cookie and same origin iframe `@firefox-ubuntu-22.04-node20`

52302 passed, 1241 skipped


Merge workflow run.

@github-actions

Copy link
Copy Markdown
Contributor

Hi, I'm the Playwright bot and I took a first look at the CI failures here.

🟢 The failures look like pre-existing flakes, not this PR

The latest "tests 1" run only has flaky tests, which retries rescued. The three MCP failures are all known flaky tests that also fail on main and on unrelated PRs. This PR touches tracing snapshot capture, the trace viewer workbench and an eslint rule, and none of the failing MCP tests exercise that code.

Details

I checked the latest reports on head a7c5f54: MCP run and tests 1 run. I then looked up each failing test's history in the aggregated test-results DB, after refreshing it with the last 2 days of runs.

Pre-existing flake / infra

Triaged by the Playwright bot - agent run

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug]: API calls never settle on an unresponsive page when tracing snapshots are on

2 participants