BUG: deno compile on Windows: child_process.spawn with extra stdio pipe fds fails intermittently with "The handle is invalid. (os error 6)"#35994
Summary
In a deno compiled executable on Windows, node:child_process.spawn() intermittently fails with Error: The handle is invalid. (os error 6) when the child is spawned with extra stdio pipe file descriptors (fds 3/4) — the configuration Playwright uses to launch Firefox/WebKit via its "pipe" browser-protocol transport.
The failure is intermittent (most launches succeed) and surfaces as an uncaught promise rejection, so it cannot be caught around the spawn/launch call — it crashes the whole process. Chromium is unaffected because it's driven over a TCP/CDP socket with only standard stdio (fds 0–2).
I hit this reliably in CI running a deno compiled CLI that uses playwright-core to launch Firefox on windows-latest. It does not happen with the Node build of the same program (Node's child_process handles the extra pipe fds fine), and does not happen for Chromium.
Environment
- Deno:
v2.xviadenoland/setup-deno@v2(latest 2.x as of 2026-07-12; also have 2.8.0 stable locally) - OS:
windows-latest(GitHub Actions runner) - Binary produced by
deno compile; failure in the compat layer