Bug
PR #315 added Chrome extension support via BROWSE_EXTENSIONS_DIR. Two issues found:
-
Visible Chromium window on macOS. The --window-position=-9999,-9999 approach doesn't work — newPage() creates new windows that ignore startup position flags.
-
Extensions don't actually run. browser.newContext() creates an isolated context. Extensions only execute in the default browser context, so content scripts, service workers, and declarativeNetRequest rules were all silently inactive.
Root cause
- Playwright's
chromium.launch() + browser.newContext() = isolated context = extensions invisible to pages
--window-position only affects the initial browser window, not windows created by newPage() via CDP Target.createTarget
Fix
Submitted a follow-up PR with:
launchPersistentContext() — extensions run in the default browser context
--headless=new — no visible window (Chromium 112+ supports extensions in new headless mode)
ignoreDefaultArgs to strip --disable-extensions and --enable-automation
- Cookie persistence across daemon restarts (
~/.gstack/browse-cookies.json)
Bug
PR #315 added Chrome extension support via
BROWSE_EXTENSIONS_DIR. Two issues found:Visible Chromium window on macOS. The
--window-position=-9999,-9999approach doesn't work —newPage()creates new windows that ignore startup position flags.Extensions don't actually run.
browser.newContext()creates an isolated context. Extensions only execute in the default browser context, so content scripts, service workers, and declarativeNetRequest rules were all silently inactive.Root cause
chromium.launch()+browser.newContext()= isolated context = extensions invisible to pages--window-positiononly affects the initial browser window, not windows created bynewPage()via CDPTarget.createTargetFix
Submitted a follow-up PR with:
launchPersistentContext()— extensions run in the default browser context--headless=new— no visible window (Chromium 112+ supports extensions in new headless mode)ignoreDefaultArgsto strip--disable-extensionsand--enable-automation~/.gstack/browse-cookies.json)