Repository navigation
Description
Version
1.60.0
Steps to reproduce
Steps to Reproduce
import asyncio
from playwright.async_api import async_playwright
async def main():
async with async_playwright() as p:
browser = await p.chromium.connect_over_cdp("http://127.0.0.1:9222")
print("connected") # never reached
await browser.close()
asyncio.run(main())Expected behavior
connect_over_cdp() should connect successfully to Edge 148,
as it did with Edge 147.
Actual behavior
Description
After Microsoft Edge was updated to 148.0.3967.54 via Windows Update,
connect_over_cdp() hangs indefinitely and never returns.
Edge is launched with remote debugging enabled:
"C:\Program Files (x86)\Microsoft\Edge\Application\msedge.exe" --remote-debugging-port=9222
Observed Behavior
The call log shows the WebSocket connection succeeds, but the call hangs
after <ws connected> and never resolves:
<ws preparing> retrieving websocket url from http://127.0.0.1:9222
<ws connecting> ws://127.0.0.1:9222/devtools/browser/xxxxxxxx-...
<ws connected> ws://127.0.0.1:9222/devtools/browser/xxxxxxxx-...
(hangs here indefinitely)
Additional context
Investigation
To confirm that Edge's CDP endpoint itself is reachable, I verified:
http://127.0.0.1:9222/jsonreturns valid JSON ✅- Connecting via raw
websocketslibrary and sendingBrowser.getVersion
returns a valid response ✅
This suggests that Edge 148 may have changed its CDP initialization
sequence or response format in a way that is incompatible with
Playwright 1.60.0's handshake implementation. The connection succeeds
at the WebSocket level, but Playwright appears to hang waiting for
a response that does not arrive in the expected format.
The root cause — whether it lies in Edge's changed behavior or in
Playwright's handling of it — would need further investigation on the
Playwright side.
Additional Notes
- Playwright 1.60.0 lists Edge 147 as its tested browser version.
The Windows Update bumped Edge to 148, causing this version mismatch. - Downgrading Edge is not practical in a managed corporate environment.
- A workaround using the raw
websocketslibrary with
Target.attachToTargetconfirms that CDP communication itself works
correctly after the connection is established manually.
Environment
| | Version |
|---|---|
| Playwright Python | 1.60.0 |
| Node.js | v24.14.1 |
| Python | 3.12.13 (conda) |
| OS | Windows 11 22H2(Build 22631.7079) |
| Microsoft Edge | 148.0.3967.54 |
Activity
Huaian666 commentedon Jun 2, 2026
yury-s commentedon Jun 2, 2026
I reproduced this hang (on both 1.60.0 and
main). It happens when any open tab has a navigation that started but never committed —connectOverCDPwaits for every existing page to finish its first navigation, and a page stuck "waiting for response headers" blocks it forever.Edge 148 changed the new-tab page to load online content (
edge://new-tab-page-online, fromntp.msn.com/assets.msn.com). A blocked load that errors is fine (it commits to an error page), but one that stalls — e.g. behind a corporate authenticating proxy that never returns headers — leaves the page uncommitted and hangs the connect.To confirm: when it hangs, what tabs/pages are open in Edge? Specifically, is there a new-tab page or any tab stuck loading (spinner)? Output of
http://127.0.0.1:9222/jsonat that moment would help.yasuyukitera commentedon Jun 3, 2026
Yury Semikhatsky (@yury-s) Thank you for your reply!!
Your reply gave me a clue to the solution.
Actually, I had a lot of tabs open in Edge, and some of them were stuck due to loading errors or had gone into sleep mode. Once I reloaded all of them, the sample code I showed worked as well!!
This gives us a temporary workaround for now. However, we’ll need to make sure the script users are aware that if the browser hangs, they should reload all Edge tabs.I don't think that can really be called a fundamental solution.But I don’t know if this might be resolved by an update to Playwright.😢😢😢
yury-s commentedon Jun 4, 2026
Thanks for the information. Would you be able to pin point which exact tab is causing the problem? Our theory was that it's a page that got stuck (i.e. no error, no success yet) on the initial navigation, but from what you describe it may well be something different.
yury-s commentedon Jun 16, 2026
Decided not to proceed with the fix for now. Since the bug disappeared after reloads and there is no reliable repro, let's see if there are more reports to justify the risky change.
yasuyukitera commentedon Jun 19, 2026
Thank you for your assistance. We have decided to handle this manually (such as by closing tabs with loading errors).