Skip to content

An agent skill for creating detailed, interactive isometric illustrations of real-world machines and complex systems. Generates polished SVGs with optional WebGL shaders and 3D effects.

fix(browser-checks): start headless Chrome from an elevated Windows terminal

jmasoftwc780b409d1a4
diff --git a/CHANGELOG.md b/CHANGELOG.md
index cec4034..890563d 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -4,6 +4,10 @@ All notable changes to Anatomy are recorded here. The format follows [Keep a Cha
## [Unreleased]
+### Fixed
+
+- Start headless Chrome on Windows from an elevated terminal: `capture.mjs`, `drive.mjs` and `turn-check.mjs` pass `--do-not-de-elevate` there. Chrome otherwise relaunches itself without the elevation, the process the script started exits with code 0, and the check stops with `Chrome exited before startup: 0` while the relaunched browser stays running.
+
## [1.1.0] - 2026-10-12
### Added
diff --git a/scripts/capture.mjs b/scripts/capture.mjs
index 419a3f6..3923d3c 100644
--- a/scripts/capture.mjs
+++ b/scripts/capture.mjs
@@ -102,7 +102,7 @@ async function main() {
}
const profile = mkdtempSync(join(tmpdir(), "iso-capture-"));
const chrome = spawn(binary, [
- "--headless=new", ...(process.platform === "linux" ? ["--no-sandbox"] : []),
+ "--headless=new", ...(process.platform === "linux" ? ["--no-sandbox"] : []), ...(process.platform === "win32" ? ["--do-not-de-elevate"] : []),
"--remote-debugging-port=0",
`--user-data-dir=${profile}`,
"--no-first-run",
diff --git a/scripts/drive.mjs b/scripts/drive.mjs
index f4eb138..33fc024 100644
--- a/scripts/drive.mjs
+++ b/scripts/drive.mjs
@@ -117,7 +117,7 @@ async function main() {
process.exit(1);
}
const profile = mkdtempSync(join(tmpdir(), "iso-drive-"));
- const chrome = spawn(binary, ["--headless=new", ...(process.platform === "linux" ? ["--no-sandbox"] : []), "--remote-debugging-port=0", `--user-data-dir=${profile}`, "--no-first-run", "--no-default-browser-check", "--hide-scrollbars", "--allow-file-access-from-files", "--enable-unsafe-swiftshader", "--ignore-gpu-blocklist", "about:blank"]);
+ const chrome = spawn(binary, ["--headless=new", ...(process.platform === "linux" ? ["--no-sandbox"] : []), ...(process.platform === "win32" ? ["--do-not-de-elevate"] : []), "--remote-debugging-port=0", `--user-data-dir=${profile}`, "--no-first-run", "--no-default-browser-check", "--hide-scrollbars", "--allow-file-access-from-files", "--enable-unsafe-swiftshader", "--ignore-gpu-blocklist", "about:blank"]);
const port = await chromePort(chrome, profile);
const finish = (code) => {
chrome.kill("SIGKILL");
diff --git a/scripts/turn-check.mjs b/scripts/turn-check.mjs
index ec609a3..8e5309e 100644
--- a/scripts/turn-check.mjs
+++ b/scripts/turn-check.mjs
@@ -38,7 +38,7 @@ function chromePath() {
async function browser(target, { width, height, scale, throttle, noWebgl }) {
const profile = mkdtempSync(join(tmpdir(), "turn-check-"));
- const chrome = spawn(chromePath(), ["--headless=new", ...(process.platform === "linux" ? ["--no-sandbox"] : []), "--remote-debugging-port=0", `--user-data-dir=${profile}`, "--no-first-run", "--no-default-browser-check", "--hide-scrollbars", "--allow-file-access-from-files", "--enable-unsafe-swiftshader", "--ignore-gpu-blocklist", "about:blank"]);
+ const chrome = spawn(chromePath(), ["--headless=new", ...(process.platform === "linux" ? ["--no-sandbox"] : []), ...(process.platform === "win32" ? ["--do-not-de-elevate"] : []), "--remote-debugging-port=0", `--user-data-dir=${profile}`, "--no-first-run", "--no-default-browser-check", "--hide-scrollbars", "--allow-file-access-from-files", "--enable-unsafe-swiftshader", "--ignore-gpu-blocklist", "about:blank"]);
const port = await chromePort(chrome, profile);
const page = await (await fetch(`http://127.0.0.1:${port}/json/new?about:blank`, { method: "PUT" })).json();
const socket = new WebSocket(page.webSocketDebuggerUrl);