Skip to content

Commit c257e15

Browse files
author
zynx
committed
fix(linux): add no-sandbox and disable-dev-shm-usage for headless env
Fixes GPU process launch failure (error_code=1002) on Linux servers where unprivileged user namespaces are disabled (non-root users). Also prevents network service crash due to insufficient /dev/shm in container environments.
1 parent a2a7de0 commit c257e15

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/utils/configureChromium.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,10 @@ if (isLinuxNoDisplay) {
2222
app.commandLine.appendSwitch('headless');
2323
app.commandLine.appendSwitch('disable-gpu');
2424
app.commandLine.appendSwitch('disable-software-rasterizer');
25+
// Prevent GPU sandbox init failure (error_code=1002) on servers without user namespaces
26+
app.commandLine.appendSwitch('no-sandbox');
27+
// Prevent network service crash caused by insufficient /dev/shm in container environments
28+
app.commandLine.appendSwitch('disable-dev-shm-usage');
2529
}
2630

2731
// For WebUI and --resetpass modes: disable sandbox for root user

0 commit comments

Comments
 (0)