Skip to content

fix(chromium): restore automation launch flag - #42403

Closed
Devin Rousso (dcrousso) wants to merge 1 commit into
microsoft:mainfrom
dcrousso:fix-42379
Closed

fix(chromium): restore automation launch flag#42403
Devin Rousso (dcrousso) wants to merge 1 commit into
microsoft:mainfrom
dcrousso:fix-42379

Conversation

@dcrousso

@dcroussoDevin Rousso (dcrousso) commented Aug 25, 2026

Copy link
Copy Markdown
Contributor

removing --enable-automation lets managed Edge hand off the browser process during SAML login

restore the default flag while preserving MCP launch behavior through an internal launch setting

regression from #40190

fixes#42379

@github-actions

This comment has been minimized.

@github-actions

This comment has been minimized.

const browser = await browserType.launch({
tracesDir,
...config.browser.launchOptions,
...{ disableAutomation: 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.

You can use ignoreDefaultArgs option instead.

removing `--enable-automation` lets managed Edge hand off the browser process during SAML login
restore the default flag while preserving MCP launch behavior with `ignoreDefaultArgs`
@github-actions

This comment has been minimized.

@github-actions

This comment has been minimized.

'--unsafely-disable-devtools-self-xss-warnings',
// Edge can potentially restart on Windows (msRelaunchNoCompatLayer) which looses its file descriptors (stdout/stderr) and CDP (3/4). Disable until fixed upstream.
'--edge-skip-compat-layer-relaunch',
'--enable-automation',

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.

It was removed in this change after some back and forth changes. The idea was that when browser is controlled via remote debugger, the same features are already turned on. --enable-automation is a big hammer and we haven't heard any complaints after removing the flag. Let's narrow down what is not working in their scenario and see if we can fix it differently.

Copy link
Copy Markdown
ContributorAuthor

Choose a reason for hiding this comment

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

unless im misreading the code, that change always set --enable-automation unless assistantMode: true, which was only for MCP, meaning that --enable-automation was always on for all other cases

furthermore, it was unconditionally added and has been unconditionally set since b20e87d 7yrs ago

Copy link
Copy Markdown
ContributorAuthor

Choose a reason for hiding this comment

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

as the original issue demonstrates, Chromium also uses --enable-automation to disable process handoff behavior https://issues.chromium.org/issues/371112535

@pavelfeldman

Copy link
Copy Markdown
Member

This likely has implications we don't want to deal with.

@github-actions

Copy link
Copy Markdown
Contributor

Test results for "tests 1"

3 flaky⚠️ [chromium-library] › library/video.spec.ts:736 › screencast › should work with video+trace `@chromium-ubuntu-22.04-node22`
⚠️ [firefox-page] › page/page-emulate-media.spec.ts:144 › should keep reduced motion and color emulation after reload `@firefox-ubuntu-22.04-node20`
⚠️ [firefox-page] › page/page-event-request.spec.ts:181 › should return response body when Cross-Origin-Opener-Policy is set `@firefox-ubuntu-22.04-node20`

51299 passed, 1237 skipped


Merge workflow run.

@dcrousso
Devin Rousso (dcrousso) deleted the fix-42379 branch August 27, 2026 19:22
@github-actions

Copy link
Copy Markdown
Contributor

Test results for "MCP"

2 failed
❌ [chrome] › mcp/annotate.spec.ts:137 › should abort MCP annotation when last screenshot is removed @mcp-windows-latest-chrome
❌ [firefox] › mcp/cli-devtools.spec.ts:173 › response-body returns just the body @mcp-windows-latest-firefox

8257 passed, 1361 skipped


Merge workflow run.

@github-actions

Copy link
Copy Markdown
Contributor

Hi, I'm the Playwright bot and I took a look at the failing CI on this PR.

🟢 The two failures are pre-existing flakes — this PR is clear

Both are Windows-only MCP flakes that fail on unrelated SHAs, and neither sits on a code path this PR changes. The diff adds --enable-automation back to the Chromium switches and makes the MCP launcher ignore it — for MCP-launched Chrome the net set of flags is unchanged (flag added to defaults, then ignored), and for Firefox the flag is a no-op. So nothing here touches annotation UI or devtools response-body capture.

Details

Latest MCP run had 2 failed; latest "tests 1" run was flaky-only. Both failures reproduce on other PRs in the test-results DB.

Pre-existing flake / infra

Triaged by the Playwright bot - agent run

Sign up for freeto 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]: Microsoft SAML login closes page on Edge since 1.60; adding --enable-automation fixes regression

3 participants

@dcrousso@pavelfeldman@yury-s