From 680c1c6c7879c0c089ebdc20fb53eb73aeede29d Mon Sep 17 00:00:00 2001 From: Frank Lam Date: Wed, 18 Mar 2026 10:28:08 -0700 Subject: [PATCH] Skip single-process flag on macOS to prevent Chromium crashes The --single-process Chrome flag, required for screenshots in gVisor/container environments, causes Chromium to crash on macOS when navigating to complex sites. Only set the flag on non-Darwin platforms. Co-Authored-By: Claude Opus 4.6 --- main.go | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/main.go b/main.go index a5188db..3951331 100644 --- a/main.go +++ b/main.go @@ -15,6 +15,7 @@ import ( "os/signal" "path/filepath" "strconv" + "runtime" "strings" "syscall" "time" @@ -377,11 +378,16 @@ func cmdStart(args []string) { l := launcher.New(). Set("no-sandbox"). Set("disable-gpu"). - Set("single-process"). // Required for screenshots in gVisor/container environments Leakless(false). // Keep Chrome alive after CLI exits UserDataDir(dataDir). Headless(headless) + // single-process is required for screenshots in gVisor/container environments + // but crashes Chromium on complex sites on macOS + if runtime.GOOS != "darwin" { + l = l.Set("single-process") + } + // When in non-headless mode, make sure that we show the startup window immediately // (instead of showing a window only after calling "rodney open") if !headless {