Skip to content

fix(extension): do not treat orphaned preferences entries as an installed extension - #42224

Merged
Yury Semikhatsky (yury-s) merged 2 commits into
microsoft:mainfrom
yury-s:fix-1712
Aug 12, 2026
Merged

fix(extension): do not treat orphaned preferences entries as an installed extension#42224
Yury Semikhatsky (yury-s) merged 2 commits into
microsoft:mainfrom
yury-s:fix-1712

Conversation

@yury-s

Copy link
Copy Markdown
Member

Summary

  • Uninstalling the extension leaves orphaned entries in the profile's Preferences (empty extensions.settings.<id> record, protection.macs.*, updateclientdata.apps.*) that matched the substring check, so the wrong profile could be launched.
  • Require a populated extensions.settings.<id> record instead; also read Secure Preferences, where the record lives on Windows/macOS.

Fixes microsoft/playwright-mcp#1712

…lled extension

Uninstalling the extension leaves orphaned entries in the profile's
Preferences (an empty extensions.settings record, protection.macs.* and
updateclientdata.apps.*) that matched the substring check and caused the
wrong profile to be launched. Require a populated extensions.settings
record instead.

Fixes: microsoft/playwright-mcp#1712
@github-actions

Copy link
Copy Markdown
Contributor

Test results for "MCP"

2 failed
❌ [firefox] › mcp/cli-core.spec.ts:106 › fill numeric @mcp-windows-latest-firefox
❌ [firefox] › mcp/cli-devtools.spec.ts:115 › per-part commands extract individual parts @mcp-windows-latest-firefox

8093 passed, 1304 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.

🟢 Both failures are pre-existing Firefox flakes — the PR is clear

The two reds are MCP CLI tests on mcp-windows-latest-firefox, and neither touches the extension-install detection this PR changes. Both flip verdict across many unrelated runs.

Details

This PR only changes packages/playwright-core/src/tools/utils/extension.ts (how an installed extension is detected in a profile's Preferences) and the matching tests/extension/extension.spec.ts. The failing tests exercise the fill and per-part request CLI commands — unrelated code paths.

Pre-existing flake / infra

Both are Firefox/Windows-only, in code the PR never touches, with a long history of the same failures elsewhere. No evidence points at this PR.

Triaged by the Playwright bot - agent run

@yury-s
Yury Semikhatsky (yury-s) merged commit c27d062 into microsoft:main Aug 12, 2026
17 of 18 checks passed
@yury-s
Yury Semikhatsky (yury-s) deleted the fix-1712 branch August 12, 2026 21:36
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.

--extension picks the wrong Chrome profile: Preferences substring check false-positives on leftovers from an uninstalled extension

2 participants