fix: auto-detect Linux root for Chromium --no-sandbox in shoot.mjs - #2
Open
Noxy229 wants to merge 1 commit into
Open
fix: auto-detect Linux root for Chromium --no-sandbox in shoot.mjs#2Noxy229 wants to merge 1 commit into
Noxy229 wants to merge 1 commit into
Conversation
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Running
shoot.mjsas root on Linux (e.g. inside a container or VM) caused Chromium to crash immediately.This patch detects
uid=0viaprocess.getuid()and passes--no-sandbox+--disable-setuid-sandboxautomatically to the Playwright browser launch.It also accepts
SCROLLCRAFT_NO_SANDBOX=1as 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.