You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
CLI crashes with an unhandled 'error' event when the browser opener cannot be spawned #2531
Found in the v2.9.0 release smoke (#2530), driving #2410's fix from the production build.
#2410 / PR #2499 bounded openUrl() (clients/cli/src/open-url.ts) with a timeout and a .catch, so a failed open prints Could not open a browser automatically (…). Open the URL above manually. That covers an opener that rejects. It does not cover one that cannot be spawned:
open (10.2.0) resolves as soon as it has called childProcess.spawn(...) and returns the ChildProcess.
A spawn failure (ENOENT) is emitted afterwards as an 'error' event on that child. open only attaches subprocess.once("error", reject) when called with { wait: true } (node_modules/open/index.js:244-263), and the CLI does not pass it.
Observed: Please navigate to: <url> followed by node:events … throw er; // Unhandled 'error' event … Error: spawn open ENOENT, and the process exits.
Expected
A spawn failure is handled like any other open failure: the fallback message is printed and the CLI keeps waiting for the callback.
Likelihood
Low on a normal machine (/usr/bin/open on macOS; open ships its own xdg-open on Linux), but real wherever the opener binary is missing from PATH: minimal containers, sandboxed or env -i launches.
Activity
cliffhall commentedon Sep 30, 2026
Triage: Priority High (total 11)
buglabel, +1 milestoned (v2.9.0), +1 assignedBoard: #28, Status
In Progress(filed through the documented flow and started immediately).fix(cli): call open from a queued microtask so the listener cannot lag
cliffhall commentedon Sep 30, 2026
Shipped in #2534 (merged to
v2/main).fix(cli): catch an opener that cannot be spawned instead of crashing
fix(tui,web): handle a browser opener that cannot be spawned (#2533)