fix(mcp): disable the chromium sandbox for the bundled browser on linux - #42490
Conversation
An explicit browserName 'chromium' without a channel launches the same downloaded build as the 'chromium' and 'chrome-for-testing' channels, which has no setuid sandbox helper on linux. Fixes: microsoft#42452
| if (process.platform === 'linux') { | ||
| // Downloaded chromium builds (undefined channel, 'chromium', 'chrome-for-testing') lack the setuid sandbox helper on linux. | ||
| const { channel } = browser.launchOptions; | ||
| browser.launchOptions.chromiumSandbox = channel !== undefined && channel !== 'chromium' && channel !== 'chrome-for-testing'; |
There was a problem hiding this comment.
channel !== 'chrome-for-testing' <-- I would kick this out.
There was a problem hiding this comment.
It's in the same category. The downloaded builds ship chrome_sandbox, but it's extracted from a zip as -rwxr-xr-x user user and archives can't carry setuid root.
03a69df
into
microsoft:main
Test results for "MCP"1 failed 8307 passed, 1377 skipped Merge workflow run. |
|
Hi, I'm the Playwright bot and I took a first look at the CI failure here. 🟢 The one failure is a pre-existing flake — this PR is clearThe single red is DetailsPre-existing flake / infra
Triaged by the Playwright bot - agent run |
Summary
browserName: 'chromium'resolves to the same downloaded build as thechromiumandchrome-for-testingchannels, so treat it the same when defaultingchromiumSandboxon linux.Fixes #42452