mirror of https://github.com/garrytan/gstack.git
fix: add --no-sandbox for Chromium in CI/container environments
Chromium's sandbox requires unprivileged user namespaces which are disabled in Docker containers. Without --no-sandbox, Chromium silently fails to launch, causing browse E2E tests to exhaust all turns trying to start the server. Detects CI or CONTAINER env vars and adds --no-sandbox automatically. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
parent
eb4e20c6c4
commit
4ba89d4f49
|
|
@ -69,6 +69,13 @@ export class BrowserManager {
|
|||
const launchArgs: string[] = [];
|
||||
let useHeadless = true;
|
||||
|
||||
// Docker/CI: Chromium sandbox requires unprivileged user namespaces which
|
||||
// are typically disabled in containers. Detect container environment and
|
||||
// add --no-sandbox automatically.
|
||||
if (process.env.CI || process.env.CONTAINER) {
|
||||
launchArgs.push('--no-sandbox');
|
||||
}
|
||||
|
||||
if (extensionsDir) {
|
||||
launchArgs.push(
|
||||
`--disable-extensions-except=${extensionsDir}`,
|
||||
|
|
|
|||
Loading…
Reference in New Issue