GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — [Bug]: html_preview always fails when T3 runs as root: Chrome refuses to start sandboxed ("Running as root without --no-sandbox") · Issue #41201 · pingdotgg/t3code

[Bug]: html_preview always fails when T3 runs as root: Chrome refuses to start sandboxed ("Running as root without --no-sandbox") #41201

New issue
Copy link
New issue
Copy link
Closed
#41206
Closed
[Bug]: html_preview always fails when T3 runs as root: Chrome refuses to start sandboxed ("Running as root without --no-sandbox")#41201
#41206
Copy link

Description

@Dennis-Huangm
Dennis-Huangm
opened on Nov 23, 2026
Issue body actions

What happened

On a Linux server where T3 runs as root, every html_preview call fails right away with:

Headless Chrome could not render the page: the browser exited unexpectedly (exit code 1).

The input makes no difference. Even <p>hello</p> fails. The cause is that Chrome refuses to start as root with its sandbox on, and T3 launches the browser with the sandbox enabled. The error that reaches the agent doesn't include Chrome's own message, so the agent and the user can't tell why it failed.

Environment

  • T3 Code 0.1.11, t3 serve (started by t3 __service-launcher), both processes running as root
  • Ubuntu 22.04.5 LTS, kernel 5.15, KVM VM (not a container)
  • Browser that T3 downloaded on first use: ~/.t3/tools/chrome-headless-shell/linux64/157.0.8103.78/chrome-headless-shell
  • Agent: Claude Code in a T3 thread

Diagnosis

Running the same binary that T3 downloaded:

$ chrome-headless-shell --dump-dom 'data:text/html,<p>hi</p>'
ERROR:content/browser/zygote_host/zygote_host_impl_linux.cc:117] Running as root without --no-sandbox is not supported. See https://crbug.com/638180.

$ chrome-headless-shell --no-sandbox --dump-dom 'data:text/html,<p>hi</p>'
<html><head></head><body><p>hi</p></body></html>

The same thing through T3's bundled playwright-core 1.64.1:

chromium.launch({ executablePath })                         -> OK
chromium.launch({ executablePath, chromiumSandbox: true })  -> "Chromium sandboxing failed!"

So the binary, its libraries and its fonts are fine (ldd shows nothing missing). The only problem is the sandbox setting combined with uid 0. t3 browser setup doesn't help here, because no AppArmor or userns setting lets Chrome sandbox itself as root. That's a hard check in Chrome.

Running T3 as root is common on single-user VPSes and cloud dev boxes, which are exactly where t3 serve gets deployed.

Expected

Any one of these would fix it:

  1. When the server runs as uid 0, launch the preview browser with --no-sandbox (chromiumSandbox: false), possibly with a one-time warning. This is what Puppeteer and Playwright users normally do for root.
  2. Or provide an explicit opt-in (env var or setting) to turn off the browser sandbox.
  3. Either way, put Chrome's stderr (or at least the "Running as root without --no-sandbox" line) into the html_preview error. Then the failure explains itself instead of showing a bare exit code 1, and PreviewBrowserSandboxError / t3 browser setup could catch this case and say that setup can't fix it for root.

Related

#38222 is a different cause (AppArmor userns inside an LXC guest) with the same symptom: the sandbox blocks the preview browser and the message doesn't say why.

Activity

  1. juliusmarminge
    closed this as completedin #41206on Nov 23, 2026
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

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions

      You are visitor 01402775 — GeezerVison does not store the pages you look up.
      Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.