Skip to content

Chromium fails to launch on hosts with unprivileged userns disabled (No usable sandbox) — breaks browse/design/make-pdf #2157

Closed

Description

@ewards

Summary

On Linux hosts where unprivileged user namespaces are disabled (default on Ubuntu 23.10+ / 24.04 via AppArmor, and common in containers/CI), the bundled Chromium refuses to launch because gstack starts it without --no-sandbox. Every skill that drives Chromium fails: /browse (screenshot/goto), /design-consultation + /plan-design-review (mockups), and /make-pdf.

gstack version: 1.58.5.0

Error

From make-pdf/dist/pdf setup (same launch path as browse):

[pid=...][err] [FATAL:content/browser/zygote_host/zygote_host_impl_linux.cc:128]
No usable sandbox! If you are running on Ubuntu 23.10+ or another Linux distro
that has disabled unprivileged user namespaces with AppArmor, see
.../apparmor-userns-restrictions.md ... If you want to live dangerously and need
an immediate workaround, you can try using --no-sandbox.
    at launch (browse/src/browser-manager.ts:372:35)
    at async start (browse/src/server.ts:2974:28)

Environment

  • Linux (Ubuntu 23.10+ / kernel with kernel.apparmor_restrict_unprivileged_userns=1)
  • Playwright Chromium present at ~/.cache/ms-playwright/chromium-*/chrome-linux/chrome and chromium_headless_shell-*
  • chromium also present but snap-confined (writes to a private /tmp, cannot read dotdirs like ~/.gstack), so it is not a usable fallback either.

Repro

  1. On an Ubuntu 24.04 host (or any host with sysctl kernel.apparmor_restrict_unprivileged_userns=1).
  2. Run any Chromium-backed skill, e.g. ~/.claude/skills/gstack/make-pdf/dist/pdf setup, or browse/dist/browse goto file:///tmp/x.html && browse screenshot /tmp/x.png.
  3. Launch fails with the FATAL sandbox error above; no screenshot/PDF/mockup is produced.

Root cause

browser-manager.ts launches Chromium without --no-sandbox, and the host cannot create the sandbox via unprivileged user namespaces.

Suggested fixes (any one unblocks it)

  1. Detect-and-fallback (preferred): on Linux, probe whether the sandbox can start; if not, relaunch with --no-sandbox and emit a one-line warning. This is what Puppeteer/Playwright wrappers commonly do for CI/containers.
  2. Opt-in env: honor something like GSTACK_CHROMIUM_NO_SANDBOX=1 (and/or a general GSTACK_CHROMIUM_ARGS) passed through to the launch args. Today neither the browse nor make-pdf binary exposes a no-sandbox flag or arg passthrough.
  3. Docs: if --no-sandbox is undesirable by default, document the host-side fix in setup output: sudo sysctl kernel.apparmor_restrict_unprivileged_userns=0 (non-persistent) or an AppArmor profile.

Impact

Hits three skill families on affected hosts (browse, design mockups, make-pdf). Workaround today is to bypass the gstack binaries entirely and drive the Playwright chrome directly with --no-sandbox (e.g. chrome --headless=new --no-sandbox --print-to-pdf), which loses the gstack styling/daemon.

Activity

  1. time-attack commented on Jul 15, 2026

    @time-attack
    Contributor

    @16francej Please close this issue as resolved. All Chromium launch paths now honor GSTACK_CHROMIUM_NO_SANDBOX=1, providing the requested explicit workaround for hosts where user namespaces are disabled.

  2. capy-ai commented on Oct 2, 2026

    @capy-ai
    Contributor

    Verified on main (v1.91.12.0): every Chromium launch path honors GSTACK_CHROMIUM_NO_SANDBOX=1 (see browse/src/browser-manager.ts), the explicit opt-in workaround for hosts with unprivileged user namespaces disabled. Shipped in v1.64.0.0 (#2571). Thanks! Reply here if a launch path still ignores it and we'll reopen.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions