Skip to content

fix(mcp): recover from page renderer crash#40617

Merged
yury-s merged 2 commits intomicrosoft:mainfrom
yury-s:fix-1599
May 5, 2026
Merged

fix(mcp): recover from page renderer crash#40617
yury-s merged 2 commits intomicrosoft:mainfrom
yury-s:fix-1599

Conversation

@yury-s
Copy link
Copy Markdown
Member

@yury-s yury-s commented May 4, 2026

Summary

  • Tab marks itself crashed on the page 'crash' event.
  • ensureTab() detects a crashed current tab, closes it, opens a fresh about:blank, and logs a synthetic console error so the LLM can see what happened.
  • Non-current crashed tabs are surfaced with a [crashed] marker in browser_tabs list.

Fixes microsoft/playwright-mcp#1599

yury-s added 2 commits May 4, 2026 16:18
When the renderer crashes, mark the Tab as crashed via the page 'crash'
event. On the next ensureTab() call, close the dead page, open a fresh
about:blank, and log a synthetic console error. Non-current crashed
tabs are surfaced with a [crashed] marker in the tab list.

Fixes: microsoft/playwright-mcp#1599
chrome://crash never dispatches the crash event there, matching the
existing skip in tests/library/page-event-crash.spec.ts.
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 4, 2026

Test results for "MCP"

22 failed
❌ [chrome] › mcp/crash.spec.ts:29 › crash recovery › resets to about:blank and logs the crash @mcp-ubuntu-latest-chrome
❌ [chrome] › mcp/crash.spec.ts:51 › crash recovery › lists only one tab @mcp-ubuntu-latest-chrome
❌ [chrome] › mcp/crash.spec.ts:65 › crash recovery › marks non-current crashed tab in the tab list @mcp-ubuntu-latest-chrome
❌ [chromium] › mcp/crash.spec.ts:29 › crash recovery › resets to about:blank and logs the crash @mcp-ubuntu-latest-chromium
❌ [chromium] › mcp/crash.spec.ts:51 › crash recovery › lists only one tab @mcp-ubuntu-latest-chromium
❌ [chromium] › mcp/crash.spec.ts:65 › crash recovery › marks non-current crashed tab in the tab list @mcp-ubuntu-latest-chromium
❌ [firefox] › mcp/dashboard.spec.ts:124 › daemon show: closing page exits the process @mcp-windows-latest-firefox
❌ [firefox] › mcp/dashboard.spec.ts:164 › should capture annotations via show --annotate @mcp-windows-latest-firefox
❌ [firefox] › mcp/dashboard.spec.ts:185 › should start dashboard and annotate when no dashboard is running @mcp-windows-latest-firefox
❌ [firefox] › mcp/dashboard.spec.ts:207 › should enter annotate mode on fresh dashboard.tsx mount with -s --annotate @mcp-windows-latest-firefox
❌ [firefox] › mcp/dashboard.spec.ts:231 › should annotate via direct browser_annotate MCP call @mcp-windows-latest-firefox
❌ [firefox] › mcp/dashboard.spec.ts:264 › should annotate when context has no fixed viewport @mcp-windows-latest-firefox
❌ [firefox] › mcp/dashboard.spec.ts:301 › should cancel browser_annotate when the MCP request is aborted @mcp-windows-latest-firefox
❌ [firefox] › mcp/dashboard.spec.ts:332 › should cancel browser_annotate when the MCP client disconnects @mcp-windows-latest-firefox
❌ [firefox] › mcp/dashboard.spec.ts:361 › should switch screencast to -s session on show --annotate @mcp-windows-latest-firefox
❌ [firefox] › mcp/dashboard.spec.ts:410 › should disengage annotate mode when --annotate client disconnects @mcp-windows-latest-firefox
❌ [firefox] › mcp/dashboard.spec.ts:477 › save recording streams WebM bytes to the chosen file @mcp-windows-latest-firefox
❌ [msedge] › mcp/dashboard.spec.ts:207 › should enter annotate mode on fresh dashboard.tsx mount with -s --annotate @mcp-windows-latest-msedge
❌ [msedge] › mcp/http.spec.ts:103 › http transport browser lifecycle (isolated) @mcp-windows-latest-msedge
❌ [msedge] › mcp/http.spec.ts:142 › http transport browser sigint @mcp-windows-latest-msedge
❌ [webkit] › mcp/dashboard.spec.ts:231 › should annotate via direct browser_annotate MCP call @mcp-windows-latest-webkit
❌ [webkit] › mcp/dashboard.spec.ts:264 › should annotate when context has no fixed viewport @mcp-windows-latest-webkit

6888 passed, 1046 skipped


Merge workflow run.

@yury-s yury-s merged commit 1109b9b into microsoft:main May 5, 2026
1 check passed
@yury-s yury-s deleted the fix-1599 branch May 5, 2026 01:02
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.

ensureTab() returns a crashed page reference, leaving the server stuck reporting "Page crashed" until restart

2 participants