[Bug]: `msedge` refuses to start when started with `--remote-debugging-pipe`
Version
1.52.0
Steps to reproduce
-
defineConfigwith a project:{ name: "msedge", use: { ...devices["Desktop Edge"], channel: "msedge" } } - Run the test(s)
Expected behavior
The tests run.
Actual behavior
msedge.exe refuses to start.
Additional context
Command playwright tried to run (cmd.exe-ified for repro):
"C:\Program Files (x86)\Microsoft\Edge\Application\msedge.exe" --disable-field-trial-config --disable-background-networking --disable-background-timer-throttling --disable-backgrounding-occluded-windows --disable-back-forward-cache --disable-breakpad --disable-client-side-phishing-detection --disable-component-extensions-with-background-pages --disable-component-update --no-default-browser-check --disable-default-apps --disable-dev-shm-usage --disable-extensions --disable-features=AcceptCHFrame,AutoExpandDetailsElement,AvoidUnnecessaryBeforeUnloadCheckSync,CertificateTransparencyComponentUpdater,DeferRendererTasksAfterInput,DestroyProfileOnBrowserClose,DialMediaRouteProvider,ExtensionManifestV2Disabled,GlobalMediaControls,HttpsUpgrades,ImprovedCookieControls,LazyFrameLoading,LensOverlay,MediaRouter,PaintHolding,ThirdPartyStoragePartitioning,Translate --allow-pre-commit-input --disable-hang-monitor --disable-ipc-flooding-protection --disable-popup-blocking --disable-prompt-on-repost --disable-renderer-backgrounding --force-color-profile=srgb --metrics-recording-only --no-first-run --enable-automation --password-store=basic --use-mock-keychain --no-service-autorun --export-tagged-pdf --disable-search-engine-choice-screen --unsafely-disable-devtools-self-xss-warnings --no-sandbox "--user-data-dir=%Temp%\playwright_chromiumdev_profile-JXfNA6" --remote-debugging-pipe --no-startup-window
If I run this command without --remote-debugging-pipe, msedge.exe appears in the Task Manager and without --no-startup-window I get the GUI to show as well.
When it fails to open, no logs are generated and the exit code is 0, indicating that nothing went wrong.
Output of a test with DEBUG=pw:browser npx playwright test:
[msedge] › tests_playwright\tests\Bars.spec.ts:316:5 › Bars (bitmap check) › Analytics bar
pw:browser <launching> C:\Program Files (x86)\Microsoft\Edge\Application\msedge.exe --disable-field-trial-config --disable-background-networking --disable-background-timer-throttling --disable-backgrounding-occluded-windows --disable-back-forward-cache --disable-breakpad --disable-client-side-phishing-detection --disable-component-extensions-with-background-pages --disable-component-update --no-default-browser-check --disable-default-apps --disable-dev-shm-usage --disable-extensions --disable-features=AcceptCHFrame,AutoExpandDetailsElement,AvoidUnnecessaryBeforeUnloadCheckSync,CertificateTransparencyComponentUpdater,DeferRendererTasksAfterInput,DestroyProfileOnBrowserClose,DialMediaRouteProvider,ExtensionManifestV2Disabled,GlobalMediaControls,HttpsUpgrades,ImprovedCookieControls,LazyFrameLoading,LensOverlay,MediaRouter,PaintHolding,ThirdPartyStoragePartitioning,Translate --allow-pre-commit-input --disable-hang-monitor --disable-ipc-flooding-protection --disable-popup-blocking --disable-prompt-on-repost --disable-renderer-backgrounding --force-color-profile=srgb --metrics-recording-only --no-first-run --enable-automation --password-store=basic --use-mock-keychain --no-service-autorun --export-tagged-pdf --disable-search-engine-choice-screen --unsafely-disable-devtools-self-xss-warnings --no-sandbox --remote-debugging-io-pipes=3,4 --user-data-dir=Temp\playwright_chromiumdev_profile-aXHo4Y --remote-debugging-pipe --no-startup-window +0ms
pw:browser <launched> pid=13144 +10ms
pw:browser [pid=13144] <gracefully close start> +22ms
pw:browser [pid=13144] <kill> +0ms
pw:browser [pid=13144] <will force kill> +0ms
pw:browser [pid=13144] taskkill stderr: ERROR: The process "13144" not found.
pw:browser +114ms
pw:browser [pid=13144] <process did exit: exitCode=0, signal=null> +1ms
pw:browser [pid=13144] starting temporary directories cleanup +0ms
pw:browser [pid=13144] finished temporary directories cleanup +558ms
pw:browser [pid=13144] <gracefully close end> +0ms
1) [msedge] › tests_playwright\tests\Bars.spec.ts:316:5 › Bars (bitmap check) › Analytics bar ────
Error: browserType.launch: Target page, context or browser has been closed
Browser logs:
<launching> C:\Program Files (x86)\Microsoft\Edge\Application\msedge.exe --disable-field-trial-config --disable-background-networking --disable-background-timer-throttling --disable-backgrounding-occluded-windows --disable-back-forward-cache --disable-breakpad --disable-client-side-phishing-detection --disable-component-extensions-with-background-pages --disable-component-update --no-default-browser-check --disable-default-apps --disable-dev-shm-usage --disable-extensions --disable-features=AcceptCHFrame,AutoExpandDetailsElement,AvoidUnnecessaryBeforeUnloadCheckSync,CertificateTransparencyComponentUpdater,DeferRendererTasksAfterInput,DestroyProfileOnBrowserClose,DialMediaRouteProvider,ExtensionManifestV2Disabled,GlobalMediaControls,HttpsUpgrades,ImprovedCookieControls,LazyFrameLoading,LensOverlay,MediaRouter,PaintHolding,ThirdPartyStoragePartitioning,Translate --allow-pre-commit-input --disable-hang-monitor --disable-ipc-flooding-protection --disable-popup-blocking --disable-prompt-on-repost --disable-renderer-backgrounding --force-color-profile=srgb --metrics-recording-only --no-first-run --enable-automation --password-store=basic --use-mock-keychain --no-service-autorun --export-tagged-pdf --disable-search-engine-choice-screen --unsafely-disable-devtools-self-xss-warnings --no-sandbox --remote-debugging-io-pipes=3,4 --user-data-dir=Temp\playwright_chromiumdev_profile-aXHo4Y --remote-debugging-pipe --no-startup-window
<launched> pid=13144
Call log:
- <launching> C:\Program Files (x86)\Microsoft\Edge\Application\msedge.exe --disable-field-trial-config --disable-background-networking --disable-background-timer-throttling --disable-backgrounding-occluded-windows --disable-back-forward-cache --disable-breakpad --disable-client-side-phishing-detection --disable-component-extensions-with-background-pages --disable-component-update --no-default-browser-check --disable-default-apps --disable-dev-shm-usage --disable-extensions --disable-features=AcceptCHFrame,AutoExpandDetailsElement,AvoidUnnecessaryBeforeUnloadCheckSync,CertificateTransparencyComponentUpdater,DeferRendererTasksAfterInput,DestroyProfileOnBrowserClose,DialMediaRouteProvider,ExtensionManifestV2Disabled,GlobalMediaControls,HttpsUpgrades,ImprovedCookieControls,LazyFrameLoading,LensOverlay,MediaRouter,PaintHolding,ThirdPartyStoragePartitioning,Translate --allow-pre-commit-input --disable-hang-monitor --disable-ipc-flooding-protection --disable-popup-blocking --disable-prompt-on-repost --disable-renderer-backgrounding --force-color-profile=srgb --metrics-recording-only --no-first-run --enable-automation --password-store=basic --use-mock-keychain --no-service-autorun --export-tagged-pdf --disable-search-engine-choice-screen --unsafely-disable-devtools-self-xss-warnings --no-sandbox --remote-debugging-io-pipes=3,4 --user-data-dir=Temp\playwright_chromiumdev_profile-aXHo4Y --remote-debugging-pipe --no-startup-window
- <launched> pid=13144
Error Context: test-results\Bars-Bars-bitmap-check-Analytics-bar-msedge\error-context.md
RemoteDebuggingAllowed doesn't appear to be configured, but I put in a ticket to enable it. The docs say that it should work regardless.
If I change --remote-debugging-pipe to --remote-debugging-port=0 manually, then the browser also starts, but I didn't find good documentation on how to make that work with a config file and npx playwright test.
Environment
System:
OS: Windows 11 10.0.22631
CPU: (16) x64 Intel(R) Core(TM) i9-9900K CPU @ 3.60GHz
Memory: 44.68 GB / 63.62 GB
Binaries:
Node: 24.2.0 - C:\Program Files\nodejs\node.EXE
npm: 11.1.0 - C:\Program Files\nodejs\npm.CMD
IDEs:
VSCode: 1.100.3 - C:\Program Files\Microsoft VS Code\bin\code.CMD
Languages:
Bash: 5.2.21 - C:\Windows\system32\bash.EXE
npmPackages:
@playwright/test: ^1.52.0 => 1.52.0
Before we dig deeper, could you navigate to edge://policy with your Edge and see if any Policies are listed there?
Here is the exported policies JSON:
{
"chromeMetadata": {
"OS": "Windows 11 Version 23H2 (Build 22631.5335)",
"application": "Microsoft Edge",
"revision": "f3affdcf267b3645b45a2fc38dcf44cb11cc4091",
"version": "137.0.3296.68 (Official build) (64-bit)"
},
"policyValues": {
"chrome": {
"name": "Microsoft Edge Policies",
"policies": {
"ExtensionSettings": {
"level": "mandatory",
"scope": "machine",
"source": "platform",
"value": {
"*": {
}
}
},
"HubsSidebarEnabled": {
"level": "mandatory",
"scope": "machine",
"source": "platform",
"value": false
},
"RelaunchNotification": {
"level": "mandatory",
"scope": "machine",
"source": "platform",
"value": 2
},
"RelaunchNotificationPeriod": {
"level": "mandatory",
"scope": "machine",
"source": "platform",
"value": 3600000
}
}
},
"extensions": {
},
"precedence": {
"name": "Policy Precedence",
"policies": {
},
"precedenceOrder": [ "Platform machine", "Cloud machine", "Platform user", "Cloud user" ]
},
"updater": {
"name": "Microsoft EdgeUpdate Policies",
"policies": {
"AutoUpdateCheckPeriodMinutes": {
"level": "mandatory",
"scope": "machine",
"source": "platform",
"value": "60"
},
"UpdatePolicy": {
"level": "mandatory",
"scope": "machine",
"source": "platform",
"value": "1"
},
"UpdaterExperimentationAndConfigurationServiceControl": {
"level": "mandatory",
"scope": "machine",
"source": "platform",
"value": "false"
}
}
}
},
"status": {
"updater": {
"domain": "org",
"policyDescriptionKey": "statusUpdater",
"timeSinceLastRefresh": "1 hour ago",
"version": "1.3.195.61"
},
"user": {
}
}
}
How does your playwright.config look like? We saw --remote-debugging-io-pipes=3,4 in your logs and this is not an argument we set. Does it happen with npm init playwright test-project aka. a fresh project?
Thank you - I forwarded it to the Edge team internally as well.
Following further investigation, I suspect this issue originates in Edge itself, not Playwright.
A Chromium bug has been filed to track this: https://issues.chromium.org/issues/425736619
Summary of Findings
- Edge Canary
139.0.3386.0exits immediately when launched with--remote-debugging-pipe - Behaviour persists even when using a clean
--user-data-dir - No logs or crash output are produced, the exit code is
0 - Adding
--no-startup-windowor removing other automation flags has no effect -
--remote-debugging-port=0works correctly - Chrome Stable behaves correctly with the same launch configuration
Environment
- Operating System: Windows 11 Version 24H2 (Build 26100.4349)
-
Browser: Edge Canary
139.0.3386.0 -
Policy Status: No blocking policies present in
edge://policy - Reproduction: Verified outside of Playwright using direct shell invocation
Additional Notes
The failure appears to stem from Edge’s current handling of --remote-debugging-pipe. Playwright’s behaviour is consistent, and the issue is reproducible independently of the framework.
We saw
--remote-debugging-io-pipes=3,4in your logs and this is not an argument we set.
Apologies, that was me touching module files to try to narrow down and test different flags. The issue reproduces with a clean node_modules directory as well.
Reproducer:
- Clone https://github.com/microsoft/playwright-examples
- Uncomment the
Microsoft Edgeproject - Run
npx playwright test "--project=Microsoft Edge" -x -j 1 clock.spec.ts
Do you have potentially special anti virus software installed on your system which might kill the Edge process?
Update: Could you try the following?
{
name: 'Microsoft Edge',
use: { ...devices['Desktop Edge'], channel: 'msedge', launchOptions: { args: ['--edge-skip-compat-layer-relaunch'] } },
},