Repository navigation
Standalone installer downloads x86_64-only macOS binary and fails on Apple Silicon without Rosetta #11318
Description
[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 executablefirebase --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_64The 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_64The 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 #9511 and #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
Activity
aalej commentedon Oct 21, 2026
Thanks for the thorough report and for sharing your feedback @Benny93! I do think this is something we can improve on and the suggested fixes you mentioned are spot on
I think this is the best approach. We are also working on improving how we build and release the firebase-tools binary to include an arm64 build(e.g. https://github.com/firebase/firebase-tools/releases/tag/v15.26.0-sea.preview.5). However, I can't provide a definite date as to when we would be able to release this.
This seems like a balanced approach. It is not as seamless as the first option, but it would give our users a clear and actionable path
If we can't do either of the above immediately, updating the failure output and documentation to clearly indicate the Rosetta requirement for arm64 (or the alternative npm installation path) would definitely be helpful.
I'll share your feedback with our engineering team and mark this as reproducible. For folks who are also encountering the
Bad CPU type in executableerror when running the auto install script, please leave a comment or a thumbs up on the original report. This will help us better keep track of this issue.