You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Headless isolated launch fails as root without --no-sandbox #261
Running chrome-devtools-mcp as the root user causes Chrome to exit immediately with Running as root without --no-sandbox is not supported, so the MCP client receives Target closed / Connection closed
errors.
Execute node build/src/index.js --headless --isolated as root
Observe Chrome crashing with the log above and the MCP server exiting
Expected Behavior
The bundled Chrome should launch successfully even when the server runs as root (typical for containers/CI), without requiring extra flags from the user.
Suggested Fix
Automatically add sandbox flags when running as root. For example in src/browser.ts:
Encountering the same issue, can confirm the proposed solution works. it'll be nice to just allow passing additional args to chrome as launch args. e.g `--launch-arg="--no-sandbox --disable-setuid-sandbox"'
Generally we cannot recommend running without Chrome sandboxes or turn them off automatically but we can allow passing additional args to Chrome. Started a PR here #261
Activity
wsxiaoys commentedon Oct 5, 2025
Encountering the same issue, can confirm the proposed solution works. it'll be nice to just allow passing additional args to chrome as launch args. e.g `--launch-arg="--no-sandbox --disable-setuid-sandbox"'
OrKoN commentedon Oct 10, 2025
Generally we cannot recommend running without Chrome sandboxes or turn them off automatically but we can allow passing additional args to Chrome. Started a PR here #261
feat: support passing args to Chrome (#338)
feat: support passing args to Chrome (#338)
feat: support passing args to Chrome (#338)
fix: explain launch failures caused by running as root (ChromeDevTool…