mirror of
https://github.com/garrytan/gstack.git
synced 2026-05-07 22:16:52 +02:00
fix: use Playwright channel:chrome instead of broken connectOverCDP
Playwright's connectOverCDP hangs with Chrome 146 due to CDP protocol version mismatch. Switch to channel:'chrome' which uses Playwright's native pipe protocol to launch the system Chrome binary directly. This is simpler and more reliable: - No CDP port discovery needed - No --remote-debugging-port or --user-data-dir hassles - $B connect just works — launches real Chrome headed window - All Playwright APIs (snapshot, click, fill) work unchanged bin/chrome-cdp updated with symlinked profile approach (kept for manual CDP use cases, but $B connect no longer needs it). Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -334,12 +334,12 @@ async function start() {
|
||||
|
||||
const port = await findPort();
|
||||
|
||||
// Launch browser (or connect to existing via CDP)
|
||||
// Launch browser (headless or real Chrome)
|
||||
const cdpUrl = process.env.BROWSE_CDP_URL;
|
||||
const cdpPort = parseInt(process.env.BROWSE_CDP_PORT || '0', 10);
|
||||
if (cdpUrl) {
|
||||
await browserManager.connectCDP(cdpUrl, cdpPort);
|
||||
console.log(`[browse] Connected to real browser via CDP (port ${cdpPort})`);
|
||||
console.log(`[browse] Launched real Chrome browser (headed)`);
|
||||
} else {
|
||||
await browserManager.launch();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user