mirror of
https://github.com/garrytan/gstack.git
synced 2026-05-05 05:05:08 +02:00
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:
@@ -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}`,
|
||||
|
||||
Reference in New Issue
Block a user