diff --git a/scripts/qa-cockpit-plates.mjs b/scripts/qa-cockpit-plates.mjs index d4804d754..117dd7471 100644 --- a/scripts/qa-cockpit-plates.mjs +++ b/scripts/qa-cockpit-plates.mjs @@ -222,7 +222,9 @@ async function main() { args: [ '--no-sandbox', '--disable-setuid-sandbox', - ...(SWIFTSHADER + // Metal is a macOS-only ANGLE backend; off-Mac the GPU branch has to fall + // back to the software rasterizer or WebGL init fails outright. + ...(SWIFTSHADER || process.platform !== 'darwin' ? ['--use-gl=angle', '--use-angle=swiftshader'] : ['--use-angle=metal', '--enable-gpu', '--ignore-gpu-blocklist']), '--disable-dev-shm-usage', diff --git a/scripts/qa-cockpit-utility.mjs b/scripts/qa-cockpit-utility.mjs index 1d3e91aab..df7e24e63 100644 --- a/scripts/qa-cockpit-utility.mjs +++ b/scripts/qa-cockpit-utility.mjs @@ -20,7 +20,13 @@ const executablePath = chromeCandidates.find((candidate) => fs.existsSync(candid const browser = await puppeteer.launch({ headless: headful ? false : 'new', ...(executablePath ? { executablePath } : {}), - args: ['--use-angle=metal', '--enable-gpu', '--no-sandbox'], + // Metal is a macOS-only ANGLE backend; anywhere else it fails WebGL init. + args: [ + ...(process.platform === 'darwin' + ? ['--use-angle=metal', '--enable-gpu'] + : ['--use-gl=angle', '--use-angle=swiftshader']), + '--no-sandbox', + ], }); const page = await browser.newPage(); const failures = []; diff --git a/scripts/qa-firstrun.mjs b/scripts/qa-firstrun.mjs index 3c65abab2..68a9f3fb5 100644 --- a/scripts/qa-firstrun.mjs +++ b/scripts/qa-firstrun.mjs @@ -491,7 +491,10 @@ async function main() { ...(executablePath ? { executablePath } : {}), args: [ '--no-sandbox', '--disable-setuid-sandbox', - '--use-angle=metal', '--enable-gpu', '--ignore-gpu-blocklist', + // Metal is a macOS-only ANGLE backend; anywhere else it fails WebGL init. + ...(process.platform === 'darwin' + ? ['--use-angle=metal', '--enable-gpu', '--ignore-gpu-blocklist'] + : ['--use-gl=angle', '--use-angle=swiftshader']), '--disable-dev-shm-usage', '--disable-background-timer-throttling', '--disable-renderer-backgrounding', '--window-size=1440,900', ], diff --git a/scripts/qa-floor-hold.mjs b/scripts/qa-floor-hold.mjs index 9cdc85f80..9ae285ad2 100644 --- a/scripts/qa-floor-hold.mjs +++ b/scripts/qa-floor-hold.mjs @@ -37,7 +37,8 @@ import path from 'node:path'; const APP_URL = process.env.QA_BASE_URL || 'http://localhost:4173'; const argv = Object.fromEntries(process.argv.slice(2) .map((a) => a.replace(/^--/, '').split('=')).map(([k, v]) => [k, v ?? true])); -const ANGLE = String(argv.angle || 'metal'); +// Metal is a macOS-only ANGLE backend; defaulting to it off-Mac fails WebGL init. +const ANGLE = String(argv.angle || (process.platform === 'darwin' ? 'metal' : 'swiftshader')); const HEADFUL = !!argv.headful; // Austin airport apron by default — the site qa-floor-verify pins, where the // mesh sits ~150 m above the geoid and burial is unmistakable. diff --git a/scripts/qa-map-source-tray.mjs b/scripts/qa-map-source-tray.mjs index 76e88fb42..d93a5b053 100644 --- a/scripts/qa-map-source-tray.mjs +++ b/scripts/qa-map-source-tray.mjs @@ -29,7 +29,15 @@ fs.mkdirSync(shotsDir, { recursive: true }); const browser = await puppeteer.launch({ headless: headful ? false : 'new', executablePath, - args: ['--use-angle=metal', '--enable-gpu', '--no-sandbox'], + // Metal is a macOS-only ANGLE backend: passing it on Windows or Linux makes + // WebGL initialization fail outright, so Cesium never constructs and this + // harness dies at the boot wait before a single assertion runs. + args: [ + ...(process.platform === 'darwin' + ? ['--use-angle=metal', '--enable-gpu'] + : ['--use-gl=angle', '--use-angle=swiftshader']), + '--no-sandbox', + ], }); const page = await browser.newPage(); const failures = []; diff --git a/scripts/qa-view-target-prewarm.mjs b/scripts/qa-view-target-prewarm.mjs index c44cab207..289540d44 100644 --- a/scripts/qa-view-target-prewarm.mjs +++ b/scripts/qa-view-target-prewarm.mjs @@ -39,7 +39,13 @@ const executablePath = chromeCandidates.find((candidate) => fs.existsSync(candid const browser = await puppeteer.launch({ headless: headful ? false : 'new', ...(executablePath ? { executablePath } : {}), - args: ['--use-angle=metal', '--enable-gpu', '--no-sandbox'], + // Metal is a macOS-only ANGLE backend; anywhere else it fails WebGL init. + args: [ + ...(process.platform === 'darwin' + ? ['--use-angle=metal', '--enable-gpu'] + : ['--use-gl=angle', '--use-angle=swiftshader']), + '--no-sandbox', + ], }); const page = await browser.newPage(); const failures = [];