fix(browse): bump Playwright to ^1.60.0 and pin full Chromium for extension loading

Two related fixes:

1. Playwright bump ^1.58.2 → ^1.60.0 (Chromium 1208/Chrome 145 → 1223/Chrome 148).
   Chromium 1208 fails Flutter Web's FlutterLoader environment compatibility check
   in headless mode, producing blank pages with webgl:false and no flt-glass-pane.
   Chromium 1223 (1.60.0) renders Flutter 3.41+ apps correctly in headless.
   Verified empirically: same browse source, same args, only Chromium build differs.

2. launchHeaded() now explicitly passes executablePath: executablePath ||
   chromium.executablePath() to launchPersistentContext. Playwright 1.49 changed
   headless:true to use chrome-headless-shell (which cannot load extensions).
   The headed path was unaffected, but we were relying on that implicitly. This
   pin ensures /open-gstack-browser and /pair-agent keep loading the sidebar
   extension if Playwright ever changes launchPersistentContext defaults.

GSTACK_CHROMIUM_PATH still takes priority in both paths.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
Steven B 2026-05-17 14:00:04 -03:00
parent 026751ea20
commit ecf7efb427
3 changed files with 10 additions and 5 deletions

View File

@ -418,7 +418,10 @@ export class BrowserManager {
args: launchArgs, args: launchArgs,
viewport: null, // Use browser's default viewport (real window size) viewport: null, // Use browser's default viewport (real window size)
userAgent: this.customUserAgent || customUA, userAgent: this.customUserAgent || customUA,
...(executablePath ? { executablePath } : {}), // Playwright 1.49+ defaults headless:true to chrome-headless-shell, which
// cannot load Chrome extensions. Explicitly pin the full Chromium binary
// so future Playwright upgrades don't silently break /open-gstack-browser.
executablePath: executablePath || chromium.executablePath(),
...(this.proxyConfig ? { proxy: this.proxyConfig } : {}), ...(this.proxyConfig ? { proxy: this.proxyConfig } : {}),
// Playwright adds flags that block extension loading // Playwright adds flags that block extension loading
ignoreDefaultArgs: [ ignoreDefaultArgs: [

View File

@ -9,7 +9,8 @@
"@ngrok/ngrok": "^1.7.0", "@ngrok/ngrok": "^1.7.0",
"diff": "^7.0.0", "diff": "^7.0.0",
"marked": "^18.0.2", "marked": "^18.0.2",
"playwright": "^1.58.2", "playwright": "^1.60.0",
"playwright-core": "^1.60.0",
"puppeteer-core": "^24.40.0", "puppeteer-core": "^24.40.0",
"socks": "^2.8.8", "socks": "^2.8.8",
}, },
@ -426,9 +427,9 @@
"platform": ["platform@1.3.6", "", {}, "sha512-fnWVljUchTro6RiCFvCXBbNhJc2NijN7oIQxbwsyL0buWJPG85v81ehlHI9fXrJsMNgTofEoWIQeClKpgxFLrg=="], "platform": ["platform@1.3.6", "", {}, "sha512-fnWVljUchTro6RiCFvCXBbNhJc2NijN7oIQxbwsyL0buWJPG85v81ehlHI9fXrJsMNgTofEoWIQeClKpgxFLrg=="],
"playwright": ["playwright@1.58.2", "", { "dependencies": { "playwright-core": "1.58.2" }, "optionalDependencies": { "fsevents": "2.3.2" }, "bin": { "playwright": "cli.js" } }, "sha512-vA30H8Nvkq/cPBnNw4Q8TWz1EJyqgpuinBcHET0YVJVFldr8JDNiU9LaWAE1KqSkRYazuaBhTpB5ZzShOezQ6A=="], "playwright": ["playwright@1.60.0", "", { "dependencies": { "playwright-core": "1.60.0" }, "optionalDependencies": { "fsevents": "2.3.2" }, "bin": { "playwright": "cli.js" } }, "sha512-hheHdokM8cdqCb0lcE3s+zT4t4W+vvjpGxsZlDnikarzx8tSzMebh3UiFtgqwFwnTnjYQcsyMF8ei2mCO/tpeA=="],
"playwright-core": ["playwright-core@1.58.2", "", { "bin": { "playwright-core": "cli.js" } }, "sha512-yZkEtftgwS8CsfYo7nm0KE8jsvm6i/PTgVtB8DL726wNf6H2IMsDuxCpJj59KDaxCtSnrWan2AeDqM7JBaultg=="], "playwright-core": ["playwright-core@1.60.0", "", { "bin": { "playwright-core": "cli.js" } }, "sha512-9bW6zvX/m0lEbgTKJ6YppOKx8H3VOPBMOCFh2irXFOT4BbHgrx5hPjwJYLT40Lu+4qtD36qKc/Hn56StUW57IA=="],
"progress": ["progress@2.0.3", "", {}, "sha512-7PiHtLll5LdnKIMw100I+8xJXR5gW2QwWYkT6iJva0bXitZKa/XMrSbdmg3r2Xnaidz9Qumd0VPaMrZlF9V9sA=="], "progress": ["progress@2.0.3", "", {}, "sha512-7PiHtLll5LdnKIMw100I+8xJXR5gW2QwWYkT6iJva0bXitZKa/XMrSbdmg3r2Xnaidz9Qumd0VPaMrZlF9V9sA=="],

View File

@ -47,7 +47,8 @@
"@ngrok/ngrok": "^1.7.0", "@ngrok/ngrok": "^1.7.0",
"diff": "^7.0.0", "diff": "^7.0.0",
"marked": "^18.0.2", "marked": "^18.0.2",
"playwright": "^1.58.2", "playwright": "^1.60.0",
"playwright-core": "^1.60.0",
"puppeteer-core": "^24.40.0", "puppeteer-core": "^24.40.0",
"socks": "^2.8.8" "socks": "^2.8.8"
}, },