stablyai/orca · error
Wayland GPU sandbox validation requires a Wayland session.
Error message
Wayland GPU sandbox validation requires a Wayland session.
What it means
Even on Linux, the script requires an actual Wayland session — at least one of WAYLAND_DISPLAY, XDG_SESSION_TYPE=wayland, or ELECTRON_OZONE_PLATFORM_HINT=wayland must be set. Without a Wayland session Electron would fall back to X11 and the GPU-sandbox code path under test would never execute, making the validation meaningless. This is the second guard, after the platform check.
Source
Thrown at config/scripts/verify-linux-wayland-gpu-sandbox.mjs:73
function run(command, args, options = {}) {
execFileSync(command, args, {
cwd: rootDir,
env: process.env,
stdio: 'inherit',
...options
})
}
function assertWaylandHost() {
if (process.platform !== 'linux') {
throw new Error('Wayland GPU sandbox validation must run on Linux.')
}
if (
!process.env.WAYLAND_DISPLAY &&
process.env.XDG_SESSION_TYPE !== 'wayland' &&
process.env.ELECTRON_OZONE_PLATFORM_HINT !== 'wayland'
) {
throw new Error('Wayland GPU sandbox validation requires a Wayland session.')
}
}
function ensureElectronRuntime() {
run(process.execPath, ['config/scripts/ensure-native-runtime.mjs', '--runtime=electron'])
}
function buildAppIfNeeded() {
if (process.env.SKIP_BUILD === '1' && existsSync(outMain)) {
console.log('[wayland-gpu] SKIP_BUILD=1 and out/main/index.js exists; skipping build.')
return
}
run('npx', ['electron-vite', 'build', '--mode', 'e2e'])
}
function createGitRepo() {
const repoDir = mkdtempSync(path.join(tmpdir(), 'orca-wayland-gpu-repo-'))
run('git', ['init'], { cwd: repoDir, stdio: 'pipe' })View on GitHub (pinned to 1136503c6a)
Solutions
- Run inside a Wayland session (log into a Wayland desktop, or start weston/sway in the container).
- Export ELECTRON_OZONE_PLATFORM_HINT=wayland (and a real WAYLAND_DISPLAY) if running under a nested compositor.
- Ensure XDG_SESSION_TYPE reflects the actual session type.
Example fix
# before (headless / X11) node config/scripts/verify-linux-wayland-gpu-sandbox.mjs # after (nested weston) weston --width=1280 --height=800 & export WAYLAND_DISPLAY=wayland-1 export ELECTRON_OZONE_PLATFORM_HINT=wayland node config/scripts/verify-linux-wayland-gpu-sandbox.mjs
Defensive patterns
Strategy: validation
Validate before calling
const hasWayland =
!!process.env.WAYLAND_DISPLAY ||
process.env.XDG_SESSION_TYPE === 'wayland' ||
process.env.ELECTRON_OZONE_PLATFORM_HINT === 'wayland'
if (!hasWayland) {
console.error('Start a Wayland session (weston/sway) and export WAYLAND_DISPLAY')
process.exit(1)
} Prevention
- Run the script inside a real or nested Wayland compositor (weston/sway).
- Export ELECTRON_OZONE_PLATFORM_HINT=wayland for nested setups.
When it happens
Trigger: All three of !WAYLAND_DISPLAY, XDG_SESSION_TYPE !== 'wayland', and ELECTRON_OZONE_PLATFORM_HINT !== 'wayland' hold at line 68-72. Happens on an X11 Linux session, a headless container without a Wayland compositor, or SSH with no display.
Common situations: Running on a standard X11 desktop; a CI container with no compositor; an SSH session where neither variable is exported.
Related errors
- Expected --disable-gpu-sandbox on Linux Wayland, but it was
- Linux computer use requires an active desktop session; missi
- Unsupported --mode=${mode}
- Wayland GPU sandbox validation must run on Linux.
- Base run already has --disable-gpu-sandbox; cannot validate
AI-assisted analysis of stablyai/orca@1136503c6a (2026-08-12).
Data as JSON: /api/errors/700b16e9fb4a4bf8.
Report an issue: GitHub.