Skip to content

A spy satellite simulator in your browser, except the data is real. Live open source spatial intelligence on a photorealistic 3D globe.

fix(qa): choose portable browser renderers outside macOS

Tom-Neverwinter01dcecf6e9df
diff --git a/scripts/qa-cockpit-plates.mjs b/scripts/qa-cockpit-plates.mjs
index f7a8f052f..b5481cfe5 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-firstrun.mjs b/scripts/qa-firstrun.mjs
index de41ba5a6..70a7106d0 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 59542b547..798a3e560 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-view-target-prewarm.mjs b/scripts/qa-view-target-prewarm.mjs
index 272c2288e..d0d6cb711 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 = [];