Version
1.62.0 (Python)
Steps to reproduce
Self-contained Python reproduction (no external website or dependencies beyond Playwright). Save as mre.py; use only a disposable profile.
import argparse
from pathlib import Path
from playwright.sync_api import sync_playwright
parser = argparse.ArgumentParser()
parser.add_argument('--browser', default='msedge')
parser.add_argument('--profile', required=True)
parser.add_argument('--output', required=True)
args = parser.parse_args()
with sync_playwright() as p:
options = {'channel': 'msedge'} if args.browser == 'msedge' else {}
context = p.chromium.launch_persistent_context(
args.profile, headless=False, accept_downloads=True, **options
)
print('VERSION', context.browser.version, flush=True)
context.on('close', lambda _: print('CONTEXT_CLOSED', flush=True))
try:
page = context.pages[0]
page.set_content('<a download="probe.txt" href="data:text/plain,local-test-only">download</a>')
with page.expect_download(timeout=15000) as event:
page.locator('a').click(timeout=15000)
print('DOWNLOAD_EVENT', flush=True)
event.value.save_as(args.output)
assert Path(args.output).read_bytes() == b'local-test-only'
print('SAVE_VERIFIED', flush=True)
finally:
context.close()
Run twice in separate Python processes from PowerShell, with Playwright 1.62.0 and installed Edge:
$probeRoot = Join-Path $env:TEMP ('edge-mre-' + [guid]::NewGuid().ToString('N'))
New-Item -ItemType Directory -Path $probeRoot | Out-Null
$env:DEBUG = 'pw:browser'
python .\mre.py --browser msedge --profile "$probeRoot\profile" --output "$probeRoot\saved-1.txt"
python .\mre.py --browser msedge --profile "$probeRoot\profile" --output "$probeRoot\saved-2.txt"
The same profile is reused; the output filename differs. downloads_path is omitted. For the control, repeat with a NEW probeRoot and --browser chromium in both commands (bundled Chromium must be installed). The code above is the baseline path of the tested reproducer, with optional diagnostic branches removed.
Expected behavior
Both invocations should save the text file successfully when reusing a persistent profile.
Actual behavior
Edge 152.0.4191.53 succeeds on the first launch with a fresh persistent profile, but exits during the download on the second launch using that profile. No output file is saved on run 2. Bundled Chromium 151.0.7922.34 saves the expected 15 bytes on both launches.
Sanitized excerpt from the ordinary-PowerShell Edge run-2 log:
VERSION 152.0.4191.53
CONTEXT_CLOSED
DOWNLOAD_EVENT
<process did exit: exitCode=3221225477, signal=null>
playwright._impl._errors.TargetClosedError: Download.save_as: Target page, context or browser has been closed
The native exit code is 0xC0000005. The close/download ordering above is as observed in the merged log. The save_as exception is where Python observes failure, not proof that save_as initiates the native crash. No faulting native module or stack is available.
Additional context
This was reproduced on one Windows machine, including independently from ordinary PowerShell outside the agent's restricted execution environment. No application/site logic, authentication, user-supplied browser flags, personal profile, or file-moving code is required. Playwright's default launch arguments remain in effect.
Isolation results (fresh disposable profile for each scenario):
| Condition |
First launch |
Second launch |
| Edge, same profile, new output filenames, default downloads path |
Pass |
Exit 0xC0000005 |
| Edge, same profile, new explicit downloads/output directories |
Pass |
Exit 0xC0000005 |
| Edge, fresh profile each time, same output path |
Pass |
Pass |
| Chromium 151, same profile |
Pass |
Pass |
| Edge, download.path() instead of save_as() |
Bytes verified |
Exit 0xC0000005 |
| Edge, locally mocked HTTP attachment instead of data URL |
Pass |
Exit 0xC0000005 |
| Edge, headless=True |
Pass |
Exit 0xC0000005 |
| Edge, no path/save_as call; page.wait_for_timeout(20000) after event |
Browser stays alive |
Browser stays alive |
The idle test verifies survival only, not completed download bytes. The baseline Edge/Chromium comparison was confirmed in ordinary PowerShell; additional isolation cases ran in the agent execution environment.
I have not tested Edge 151 itself or a second machine. Chromium 151 is not an equivalent Edge-version control. I am reporting the reproducible scenario, not claiming a confirmed Edge 152 regression or assigning the cause to Playwright rather than Edge/machine configuration. Is there an additional diagnostic that would help identify the native failure?
Environment
Manually collected for the Python reproducer (not npx envinfo):
OS: Windows 11, build 26200
Python: 3.13.2 (Anaconda distribution, 64-bit)
Playwright Python: 1.62.0
Microsoft Edge: 152.0.4191.53 (channel="msedge")
Bundled Chromium: 151.0.7922.34
Execution: local ordinary PowerShell; separate Python processes; disposable persistent profiles
Version
1.62.0 (Python)
Steps to reproduce
Self-contained Python reproduction (no external website or dependencies beyond Playwright). Save as mre.py; use only a disposable profile.
Run twice in separate Python processes from PowerShell, with Playwright 1.62.0 and installed Edge:
The same profile is reused; the output filename differs. downloads_path is omitted. For the control, repeat with a NEW probeRoot and --browser chromium in both commands (bundled Chromium must be installed). The code above is the baseline path of the tested reproducer, with optional diagnostic branches removed.
Expected behavior
Both invocations should save the text file successfully when reusing a persistent profile.
Actual behavior
Edge 152.0.4191.53 succeeds on the first launch with a fresh persistent profile, but exits during the download on the second launch using that profile. No output file is saved on run 2. Bundled Chromium 151.0.7922.34 saves the expected 15 bytes on both launches.
Sanitized excerpt from the ordinary-PowerShell Edge run-2 log:
The native exit code is 0xC0000005. The close/download ordering above is as observed in the merged log. The save_as exception is where Python observes failure, not proof that save_as initiates the native crash. No faulting native module or stack is available.
Additional context
This was reproduced on one Windows machine, including independently from ordinary PowerShell outside the agent's restricted execution environment. No application/site logic, authentication, user-supplied browser flags, personal profile, or file-moving code is required. Playwright's default launch arguments remain in effect.
Isolation results (fresh disposable profile for each scenario):
The idle test verifies survival only, not completed download bytes. The baseline Edge/Chromium comparison was confirmed in ordinary PowerShell; additional isolation cases ran in the agent execution environment.
I have not tested Edge 151 itself or a second machine. Chromium 151 is not an equivalent Edge-version control. I am reporting the reproducible scenario, not claiming a confirmed Edge 152 regression or assigning the cause to Playwright rather than Edge/machine configuration. Is there an additional diagnostic that would help identify the native failure?
Environment