Standalone installer downloads x86_64-only macOS binary and fails on Apple Silicon without Rosetta
I maintainer di solito rispondono entro 1 giorno
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 4/5
- Tempo stimato
- 3-5 giorni
- Idoneità per principianti
- 44/100
- Tipo di issue
- Bug
- Chiarezza
- Abbastanza chiara
- Stato di attività
- Attiva
- Stack tecnologico
- macos, node.js, typescript
Direzione di ricerca
The report identifies the standalone installer and its existing-install probe, but does not name their source files or tests. Start by locating the script that downloads https://firebase.tools/bin/macos/<version> and checking how it detects the host architecture and handles failed execution. Done means Apple Silicon without Rosetta gets a usable binary or an actionable failure before an existing binary is overwritten; add coverage for that case.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
[REQUIRED] Environment info
firebase-tools: 15.34.0 (installer reports this as the latest npm version and downloads https://firebase.tools/bin/macos/v15.34.0)
Platform: macOS 27.0.1 (build 26A434), Apple M1 Pro (arm64)
Rosetta 2 is not installed:
$ arch -x86_64 /usr/bin/true
arch: posix_spawnp: /usr/bin/true: Bad CPU type in executable
firebase --version is unavailable because the installer fails before the downloaded binary can run.
[REQUIRED] Test case
On an Apple Silicon Mac without Rosetta 2:
curl -sL https://firebase.tools | bash
[REQUIRED] Steps to reproduce
- Use an arm64 Mac where Rosetta 2 is not installed.
- Run
curl -sL https://firebase.tools | bash(orcurl -sL https://firebase.tools | upgrade=true bashto repair). - Observe that the installer replaces
/usr/local/bin/firebaseand then fails to execute it.
[REQUIRED] Expected behavior
The installer should either install a binary that runs on the host architecture, or fail with an actionable message (for example, install Rosetta or use npm install -g firebase-tools) before overwriting an existing firebase binary.
[REQUIRED] Actual behavior
$ curl -sL https://firebase.tools | upgrade=true bash
-- Checking for existing firebase-tools...
bash: line 177: /usr/local/bin/firebase: Bad CPU type in executable
-- Your machine has a corrupted firebase-tools binary, attempting upgrade...
-- Checking your machine type...
-- Downloading binary from https://firebase.tools/bin/macos/v15.34.0
######################################################################## 100.0%
-- Setting permissions on binary... /usr/local/bin/firebase
bash: line 287: /usr/local/bin/firebase: Bad CPU type in executable
Something went wrong, firebase has not been installed.
Please file a bug with your system information on Github.
https://github.com/firebase/firebase-tools/
-- All done!
After the failed install, /usr/local/bin/firebase is left in place and still unusable:
$ file /usr/local/bin/firebase
/usr/local/bin/firebase: Mach-O 64-bit executable x86_64
The downloaded release asset is also x86_64-only:
$ curl -sL -r 0-4095 https://firebase.tools/bin/macos/v15.34.0 | file -
Mach-O 64-bit executable x86_64
The v15.34.0 release only publishes a single macOS asset, firebase-tools-macos, so there is no arm64 alternative.
Root cause
The install script detects only the OS (uname -s → macos) and never checks the CPU architecture (uname -m) or Rosetta availability. The macOS standalone binary is x86_64-only, so it cannot run on Apple Silicon without Rosetta. The existing-install probe then reports the binary as "corrupted" even though it is a valid x86_64 executable, and the upgrade path overwrites the existing install with the same non-runnable binary.
The failure message does not mention Rosetta or npm install -g firebase-tools, making this difficult to diagnose.
This appears to be the same underlying issue as the closed reports https://github.com/firebase/firebase-tools/issues/9511 and https://github.com/firebase/firebase-tools/issues/10333, which were closed after installing Rosetta. The problem still reproduces with the latest release on systems where Rosetta is intentionally absent.
Suggested fixes
- Publish a universal or arm64 macOS standalone binary, and select it in the installer based on
uname -m. - If no arm64 binary is available, detect Apple Silicon without Rosetta and exit with an actionable message rather than downloading and overwriting the existing binary.
- At minimum, update the failure output/docs to mention the Rosetta requirement (
softwareupdate --install-rosetta --agree-to-license) and the npm fallback.
Workarounds
- Install Rosetta 2, then rerun the installer.
- Install via npm instead:
npm install -g firebase-tools
- Lingua principale
- TypeScript
- Stelle
- 4.5k
- Fork
- 1.3k
- Merge medio
- 3g 1h
- PR unite (30g)
- 98
Preparare l'ambiente
- Nessun Dockerfile né file Docker Compose
- Ha un modello di pull request
- Leggi la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di firebase/firebase-tools
-
Nodejs26 rejected at deploy, though Cloud Run functions supports it (Preview)Forse già presa @IzaakGough l’ha presa 8 giorni fa. Apertaapi: functions reproducible type: bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 76/100
firebase/firebase-tools#11393 · 2 commenti · 4 reazioni ·
I maintainer di solito rispondono entro 1 giorno
-
[firebase-vscode] CLI version check reads the version from the debug banner, because logSetup() leaks DEBUG=true into the spawned `firebase --version` (follow-up to #10874)Forse già presa @abhiramshaji-cyber l’ha presa 9 giorni fa. Apertareproducible type: bug VSCode Extension
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
firebase/firebase-tools#11363 · 2 commenti ·
I maintainer di solito rispondono entro 1 giorno
-
[MCP] Crashlytics tools not loaded for Android projects using Gradle version catalogs (libs.versions.toml)Forse già presa @aalej l’ha presa 10 giorni fa. Apertaapi: mcp reproducible type: bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 82/100
firebase/firebase-tools#11351 · 1 commento · 1 assegnatario ·
I maintainer di solito rispondono entro 1 giorno
-
CLI HTTP client ignores NO_PROXY, so emulators can’t reach each other behind a proxyForse già presa @joehan l’ha presa 25 giorni fa. Apertaemulator-suite type: bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 74/100
firebase/firebase-tools#11249 · 1 assegnatario ·
I maintainer di solito rispondono entro 1 giorno
-
functions:secrets:set and :prune never destroy anything: pruneSecrets filters firebase-managed=true, but labels() writes firebase-managed=functionsForse già presa @IzaakGough l’ha presa 58 giorni fa. Apertaapi: functions reproducible type: bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 90/100
firebase/firebase-tools#11066 · 2 commenti ·
I maintainer di solito rispondono entro 1 giorno
Tutte le issue di firebase/firebase-tools
Issue simili
-
content triage
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 82/100
tensorflow/tfjs#8754 ·
-
tool-submission
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 83/100
BraveOPotato/NoSignups#2348 ·
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
code-yeongyu/oh-my-openagent#12784 ·
I maintainer di solito rispondono entro 1 giorno
-
external-issue to-triage
Difficoltà 2/5 1-3 ore Idoneità per principianti 71/100
I maintainer di solito rispondono entro 1 giorno