You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
browse: Playwright Chromium launch hangs on Windows (Bun pipe transport issue) #77
browse goto <url> hangs indefinitely on Windows. The server never starts — it gets stuck at chromium.launch({ headless: true }) in browser-manager.ts:45.
Root Cause
Bun's child process pipe implementation on Windows does not properly handle Playwright's --remote-debugging-pipe transport. Chromium launches (PID visible) but the DevTools Protocol pipe never connects, causing a timeout.
Reproduction
# This hangs on Windows with Bun:cd~/.claude/skills/gstack
bun -e "import { chromium } from 'playwright'; const b = await chromium.launch({ headless: true, timeout: 15000 }); console.log('ok'); await b.close();"# → Timeout 15000ms exceeded# Same code works perfectly with Node:
node -e "import('playwright').then(async({chromium})=>{const b=await chromium.launch({headless:true,timeout:15000});console.log('ok');await b.close();})"# → ok
Tested with both chromium_headless_shell-1155 and chromium-1155 (full browser). Also tried channel: 'chrome' (system Chrome). All hang with Bun, all work with Node.
Suggested Fixes
On Windows, spawn the server with node + tsx instead of bun — requires making server.ts runtime-agnostic (replacing Bun.serve with Node HTTP, Bun.spawn with child_process, etc.)
Use playwright.chromium.connectOverCDP() with websocket instead of pipe transport — would bypass the broken pipe
Wait for Bun fix — this is ultimately a Bun issue with Windows named pipes
Workaround
Created a standalone Node-based browse wrapper that uses Node + Playwright directly. Works but lacks the full gstack browse feature set.
Submitted a fix in #84. Detects process.platform === 'win32' in browser-manager.ts and uses connectOverCDP() with websocket transport instead of the default pipe transport.
node + chromium.launch({ args: [''--remote-debugging-port=0''] }) works
node + chromium.connectOverCDP(''http://127.0.0.1:9224'') works
But on Bun:
bun + chromium.launch() still hangs / times out
bun + chromium.launch({ args: [''--remote-debugging-port=0''] }) also still hangs
bun + chromium.connectOverCDP(''http://127.0.0.1:9223'') also times out
The connectOverCDP() failure is especially important because it suggests the current problem is broader than just --remote-debugging-pipe. In my run, Bun successfully fetched the websocket endpoint from /json/version, but then timed out while connecting to the returned ws://127.0.0.1:9223/devtools/browser/... URL. Node succeeds against the same manually started browser.
So at least on this environment, #84's current direction (--remote-debugging-port=0 on launch) does not appear sufficient to fix the issue. The evidence now points to a broader Bun <-> Playwright browser transport compatibility problem on Windows, affecting both launch and CDP websocket connection paths.
Activity
fix(browse): use CDP websocket fallback on Windows
mvanhorn commentedon Mar 16, 2026
Submitted a fix in #84. Detects
process.platform === 'win32'inbrowser-manager.tsand usesconnectOverCDP()with websocket transport instead of the default pipe transport.KeKeDou810 commentedon Mar 20, 2026
Retested on 2026-03-20 after upgrading Bun, and the failure is still reproducible on a slightly newer runtime.
Environment:
chrome-headless-shellWhat I verified locally:
node + chromium.launch()worksnode + chromium.launch({ args: [''--remote-debugging-port=0''] })worksnode + chromium.connectOverCDP(''http://127.0.0.1:9224'')worksBut on Bun:
bun + chromium.launch()still hangs / times outbun + chromium.launch({ args: [''--remote-debugging-port=0''] })also still hangsbun + chromium.connectOverCDP(''http://127.0.0.1:9223'')also times outThe
connectOverCDP()failure is especially important because it suggests the current problem is broader than just--remote-debugging-pipe. In my run, Bun successfully fetched the websocket endpoint from/json/version, but then timed out while connecting to the returnedws://127.0.0.1:9223/devtools/browser/...URL. Node succeeds against the same manually started browser.So at least on this environment,
#84's current direction (--remote-debugging-port=0on launch) does not appear sufficient to fix the issue. The evidence now points to a broader Bun <-> Playwright browser transport compatibility problem on Windows, affecting both launch and CDP websocket connection paths.