Skip to content

chore(extension): warn when Playwright Extension is missing from profile#40406

Merged
yury-s merged 2 commits intomicrosoft:mainfrom
yury-s:extension-installed-check
Apr 24, 2026
Merged

chore(extension): warn when Playwright Extension is missing from profile#40406
yury-s merged 2 commits intomicrosoft:mainfrom
yury-s:extension-installed-check

Conversation

@yury-s
Copy link
Copy Markdown
Member

@yury-s yury-s commented Apr 24, 2026

Summary

  • Before spawning Chrome, the MCP relay checks whether the Playwright Extension is present in the target user-data-dir. If missing, we log a hint with the install URL to stderr and continue (instead of the previous 5s connect timeout).
  • Extension presence is detected via Default/Extensions/<id> (web store install) with a fallback of grepping Default/Preferences for the id (--load-extension).
  • Extracts the Chromium channel → default user-data-dir map into shared packages/utils/chromiumChannels.ts, used by chromium.ts and the MCP relay. cli-client/channelSessions.ts keeps its own copy since its strict per-file build can't resolve @utils/* at runtime.

Before launching Chrome, the MCP relay now checks whether the Playwright
Extension is present in the target user-data-dir — either via
Default/Extensions/<id> (web store) or the id appearing in
Default/Preferences (load-unpacked). If it's missing, we log a hint with
the install URL to stderr and continue (previous behaviour was a 5s
connection timeout).

Also extracts the Chromium channel → default user-data-dir map into a
shared packages/utils/chromiumChannels.ts used by chromium.ts and the
MCP relay. cli-client/channelSessions.ts keeps its own copy because
its strict per-file build can't resolve @utils/* at runtime.
@github-actions

This comment has been minimized.

@github-actions

This comment has been minimized.

Update the test to assert on the tool-call error response.
@yury-s yury-s merged commit 780644f into microsoft:main Apr 24, 2026
35 of 37 checks passed
@yury-s yury-s deleted the extension-installed-check branch April 24, 2026 18:18
@github-actions
Copy link
Copy Markdown
Contributor

Test results for "tests 1"

6 flaky ⚠️ [chromium-library] › library/popup.spec.ts:261 › should not throw when click closes popup `@ubuntu-22.04-chromium-tip-of-tree`
⚠️ [chromium-library] › library/video.spec.ts:476 › screencast › should capture static page in persistent context @smoke `@ubuntu-22.04-chromium-tip-of-tree`
⚠️ [chromium-library] › library/video.spec.ts:719 › screencast › should work with video+trace `@chromium-ubuntu-22.04-node24`
⚠️ [firefox-library] › library/inspector/cli-codegen-1.spec.ts:1080 › cli codegen › should not throw csp directive violation errors `@firefox-ubuntu-22.04-node20`
⚠️ [firefox-page] › page/page-wait-for-function.spec.ts:104 › should work with strict CSP policy `@firefox-ubuntu-22.04-node20`
⚠️ [webkit-library] › library/video.spec.ts:275 › screencast › should capture navigation `@webkit-ubuntu-22.04-node20`

41451 passed, 847 skipped


Merge workflow run.

@github-actions
Copy link
Copy Markdown
Contributor

Test results for "MCP"

29 failed
❌ [chrome] › mcp/dashboard.spec.ts:207 › should enter annotate mode on fresh dashboard.tsx mount with -s --annotate @mcp-windows-latest
❌ [chrome] › mcp/dashboard.spec.ts:231 › should switch screencast to -s session on show --annotate @mcp-windows-latest
❌ [firefox] › mcp/cli-devtools.spec.ts:141 › video-start-stop @mcp-windows-latest
❌ [firefox] › mcp/cli-devtools.spec.ts:155 › video-chapter @mcp-windows-latest
❌ [firefox] › mcp/cli-session.spec.ts:159 › workspace isolation - sessions in different workspaces are isolated @mcp-windows-latest
❌ [webkit] › mcp/dashboard.spec.ts:280 › should disengage annotate mode when --annotate client disconnects @mcp-windows-latest
❌ [webkit] › mcp/dashboard.spec.ts:347 › save recording streams WebM bytes to the chosen file @mcp-windows-latest
❌ [msedge] › mcp/cli-core.spec.ts:31 › close @mcp-windows-latest
❌ [msedge] › mcp/cli-devtools.spec.ts:141 › video-start-stop @mcp-windows-latest
❌ [msedge] › mcp/cli-devtools.spec.ts:155 › video-chapter @mcp-windows-latest
❌ [msedge] › mcp/cli-json.spec.ts:171 › close after open returns closed status @mcp-windows-latest
❌ [msedge] › mcp/cli-json.spec.ts:177 › close-all after open returns closed sessions @mcp-windows-latest
❌ [msedge] › mcp/cli-session.spec.ts:50 › close @mcp-windows-latest
❌ [msedge] › mcp/cli-session.spec.ts:60 › close named session @mcp-windows-latest
❌ [msedge] › mcp/cli-session.spec.ts:72 › persistent session shows in list after close @mcp-windows-latest
❌ [msedge] › mcp/cli-session.spec.ts:85 › close-all @mcp-windows-latest
❌ [msedge] › mcp/cli-session.spec.ts:99 › delete-data @mcp-windows-latest
❌ [msedge] › mcp/cli-session.spec.ts:111 › delete-data named session @mcp-windows-latest
❌ [msedge] › mcp/cli-session.spec.ts:128 › session stops when browser exits @mcp-windows-latest
❌ [msedge] › mcp/cli-session.spec.ts:142 › session reopen with different config @mcp-windows-latest
❌ [msedge] › mcp/cli-session.spec.ts:159 › workspace isolation - sessions in different workspaces are isolated @mcp-windows-latest
❌ [msedge] › mcp/cli-session.spec.ts:191 › list --all lists sessions from all workspaces @mcp-windows-latest
❌ [msedge] › mcp/dashboard.spec.ts:124 › daemon show: closing page exits the process @mcp-windows-latest
❌ [msedge] › mcp/dashboard.spec.ts:164 › should capture annotations via show --annotate @mcp-windows-latest
❌ [msedge] › mcp/dashboard.spec.ts:185 › should start dashboard and annotate when no dashboard is running @mcp-windows-latest
❌ [msedge] › mcp/dashboard.spec.ts:207 › should enter annotate mode on fresh dashboard.tsx mount with -s --annotate @mcp-windows-latest
❌ [msedge] › mcp/dashboard.spec.ts:231 › should switch screencast to -s session on show --annotate @mcp-windows-latest
❌ [msedge] › mcp/dashboard.spec.ts:280 › should disengage annotate mode when --annotate client disconnects @mcp-windows-latest
❌ [msedge] › mcp/dashboard.spec.ts:347 › save recording streams WebM bytes to the chosen file @mcp-windows-latest

6582 passed, 916 skipped


Merge workflow 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.

2 participants