mirror of
https://github.com/garrytan/gstack.git
synced 2026-05-08 06:26:45 +02:00
fix: use launchPersistentContext for Chrome extension loading
Playwright's chromium.launch() silently ignores --load-extension. Switch to launchPersistentContext with ignoreDefaultArgs to remove --disable-extensions flag. Use bundled Chromium (real Chrome blocks unpacked extensions). Fixed port 34567 for CDP mode so the extension auto-connects. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -365,9 +365,11 @@ Refs: After 'snapshot', use @e1, @e2... as selectors:
|
||||
console.log('Launching real Chrome browser...');
|
||||
try {
|
||||
// Start server with CDP flag — server.ts will use channel:chrome
|
||||
// Use a well-known port so the Chrome extension auto-connects
|
||||
const newState = await startServer({
|
||||
BROWSE_CDP_URL: 'channel:chrome',
|
||||
BROWSE_CDP_PORT: '0',
|
||||
BROWSE_PORT: '34567',
|
||||
});
|
||||
|
||||
// Print connected status
|
||||
|
||||
Reference in New Issue
Block a user