Skip to content

fix: auto-detect Linux root for Chromium --no-sandbox in shoot.mjs - #2

Open
Noxy229 wants to merge 1 commit into
nateherkai:mainfrom
Noxy229:main
Open

fix: auto-detect Linux root for Chromium --no-sandbox in shoot.mjs#2
Noxy229 wants to merge 1 commit into
nateherkai:mainfrom
Noxy229:main

Conversation

@Noxy229

@Noxy229 Noxy229 commented Aug 26, 2026

Copy link
Copy Markdown

Running shoot.mjs as root on Linux (e.g. inside a container or VM) caused Chromium to crash immediately.

This patch detects uid=0 via process.getuid() and passes --no-sandbox + --disable-setuid-sandbox automatically to the Playwright browser launch.

It also accepts SCROLLCRAFT_NO_SANDBOX=1 as an explicit opt-in for non-root setups that still need it. No behaviour change on macOS or Windows.

Tested on: Debian 12 (PVE), Node 24, Chromium, root user.

Running shoot.mjs as root on Linux (Debian 12, Node 24) caused Chromium
to crash immediately. The fix detects uid=0 via process.getuid() and
passes --no-sandbox + --disable-setuid-sandbox automatically.

Also accepts SCROLLCRAFT_NO_SANDBOX=1 as an explicit opt-in for non-root
setups that still need it. No behaviour change on macOS or Windows.

Tested on: Debian 12 (PVE), Node 24, Chromium 130, root user.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant