CLI crashes with libuv assertion after printing its result on Windows - exit code then reads as failure
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 48/100
- Issue type
- Bug
- Clarity
- Mostly clear
- Activity status
- Active
- Tech stack
- node.js, typescript
- Domain
- cli, operating-systems
Research direction
Reproduce the issue with firebase login and firebase apps:sdkconfig <app-id> on Windows 11 using Node v24.18.0, then compare commands that exit cleanly such as projects:list. Trace the Windows process-shutdown path around the reported src\win\async.c libuv assertion; done means the result still prints, no assertion occurs, and the process exits with code 0.
Written by the indexing model from the issue text.
Description
[CLI crashes with libuv assertion after printing its result - exit code then reads as failure]
CLI Version: firebase-tools 15.30.0
Platform: Windows 11 Pro (10.0.26200), Node v24.18.0
Node Version: v24.18.0
Steps to reproduce:
firebase login- Run a subcommand that prints a result and exits, e.g.
firebase apps:sdkconfig <app-id>
Expected behavior
Process exits 0 after printing the result.
Actual behavior
Process prints its full result to stdout, then crashes:
Assertion failed: !(handle->flags & UV_HANDLE_CLOSING), file src\win\async.c, line 94
Exit code is then 127, even though the command's own output shows it completed
successfully. Measured in one session, same binary, same login:
| subcommand | assertion fires | exit code |
|---|---|---|
login |
yes | n/a (interactive) |
apps:sdkconfig |
yes | 127 |
projects:list |
no | 0 |
groups:create |
no | 0 |
testers:add |
no | 0 |
testers:list |
no | 0 |
Non-deterministic across otherwise-similar subcommands in the same process/session, which
suggests a race in libuv handle teardown on process exit (Windows-specific: src\win\async.c)
rather than anything about the individual command.
Impact
Any caller that gates on $LASTEXITCODE (or any exit-code check) cannot tell a real failure
from this teardown crash - a command that fully completed and printed its result can still be
read as failed, which for an upload/publish command silently corrupts release tooling built on
top of the CLI.
- Dominant language
- TypeScript
- Stars
- 4.5k
- Forks
- 1.3k
- Avg merge
- 1d 17h
- Merged PRs (30d)
- 73
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from firebase/firebase-tools
-
api: functions reproducible type: bug
Difficulty 2/5 1-3 hours Newbie friendliness 90/100
firebase/firebase-tools#11066 · 2 comments ·
-
api: functions type: bug
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
firebase/firebase-tools#11053 ·
-
emulators: functions type: bug
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
firebase/firebase-tools#10398 ·
-
emulator-suite emulators: functions help-wanted type: feature request
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
firebase/firebase-tools#3728 · 9 comments ·
-
type: bug
Difficulty 3/5 1-2 days Newbie friendliness 68/100
firebase/firebase-tools#11127 ·
All issues in firebase/firebase-tools
Similar issues
-
comp/dashboard P3 type/bug
Difficulty 2/5 1-3 hours Newbie friendliness 86/100
NousResearch/hermes-agent#117722 ·
-
clawsweeper:fix-shape-clear clawsweeper:queueable-fix clawsweeper:source-repro impact:ux-friction issue-rating: 🦞 diamond lobster no-stale P3
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
-
community first-timers-only good first issue hacktoberfest help wanted low hanging fruit up-for-grabs
Difficulty 1/5 Under an hour Newbie friendliness 76/100
-
code-quality refactoring
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
github/gh-aw-firewall#8816 ·
-
integration:quickjs org:external priority:backlog topic:code-interpreter topic:middleware type:feature
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
langchain-ai/deepagents#6450 ·