firebase-tools: Firebase Emulators download failed, expected 64907894 bytes but got 64723779

[REQUIRED] Environment info

firebase-tools: 11.29.0

Platform: macOS, Ubuntu

[REQUIRED] Test case

None

[REQUIRED] Steps to reproduce

In a project with Firebase Emulators set up,

  1. npm uninstall firebase-tools 1 optional) npm uninstall -g firebase-tools
  2. npm install firebase-tools
  3. firebase emulators:start

[REQUIRED] Expected behavior

Firebase Emulators downloads and boots up as normally.

[REQUIRED] Actual behavior

Firebase Emulators appears to download to 100%, but emulators are aborted with the error Error: download failed, expected 64907894 bytes but got 64723779

About this issue

  • Original URL
  • State: closed
  • Created a year ago
  • Reactions: 31
  • Comments: 17 (5 by maintainers)

Most upvoted comments

Apologies everyone there seems to be an incorrect size and hash in the latest firebase-tools release. We’ll release a new version ASAP but for now reverting to 11.28 should resolve the issue.

11.29.1 fixes the issue without needing to purge the cache - thanks everyone.

There was no problem using v11.28.0

Yep… same issue. CLI reports the following:

i  firestore: downloading cloud-firestore-emulator-v1.17.2.jar...
Progress: ===========================> (100% of 65MB
i  emulators: Shutting down emulators.
i  functions: Stopping Functions Emulator
i  firestore: Stopping Firestore Emulator
i  eventarc: Stopping Eventarc Emulator
i  hub: Stopping emulator hub

Error: download failed, expected 64907894 bytes but got 64723779

Ran into the same issue with v11.29.0

For now, have reverted back to using my previous version (v11.24.1) which is working again 👍

Sorry folks, we found the original version of the firestore binary and re-uploaded it to our backend. Version 11.29.0 should work once you remove the cached jar from your machine, usually found here - ~/.cache/firebase/emulators/cloud-firestore-emulator-v1.17.2.jar. After that, running firebase emulators:start should download the correct one.

Thanks for all of your patience

hoe do reverse @rhys-mondo your version ?

You need to specify the exact version when installing, in your package.json, or when using firebase-tools

e.g

npm install firebase-tools@11.24.1

or if running in a script with npx

npx firebase-tools@11.24.1 <command>

I have the same problem, here is the debug log

[debug] [2023-04-26T00:56:27.915Z] ----------------------------------------------------------------------
[debug] [2023-04-26T00:56:27.916Z] Command:       /opt/homebrew/Cellar/node@18/18.16.0/bin/node /Users/tabsquare/Library/pnpm/global/5/node_modules/firebase-tools/lib/bin/firebase.js setup:emulators:firestore --debug
[debug] [2023-04-26T00:56:27.917Z] CLI Version:   11.29.0
[debug] [2023-04-26T00:56:27.917Z] Platform:      darwin
[debug] [2023-04-26T00:56:27.917Z] Node Version:  v18.16.0
[debug] [2023-04-26T00:56:27.918Z] Time:          Wed Apr 26 2023 07:56:27 GMT+0700 (Western Indonesia Time)
[debug] [2023-04-26T00:56:27.918Z] ----------------------------------------------------------------------
[debug] 
[info] i  firestore: downloading cloud-firestore-emulator-v1.17.2.jar... {"metadata":{"emulator":{"name":"firestore"},"message":"downloading cloud-firestore-emulator-v1.17.2.jar..."}}
[debug] [2023-04-26T00:56:27.955Z] >>> [apiv2][query] GET https://storage.googleapis.com/firebase-preview-drop/emulator/cloud-firestore-emulator-v1.17.2.jar 
[debug] [2023-04-26T00:56:28.691Z] <<< [apiv2][status] GET https://storage.googleapis.com/firebase-preview-drop/emulator/cloud-firestore-emulator-v1.17.2.jar 200
[debug] [2023-04-26T00:56:28.694Z] <<< [apiv2][body] GET https://storage.googleapis.com/firebase-preview-drop/emulator/cloud-firestore-emulator-v1.17.2.jar [stream]
[error] 
[error] Error: download failed, expected 64907894 bytes but got 64723779

i have no idea why it’s happening.

I had to install firebase-tools@11.24.1 to make it firestore and ui work.

same problem 😦

Mac OS : Ventura 13.3.1 M1 Node : v18.16.0 Firebase CLI : 11.29.0

Capture d’écran, le 2023-04-25 à 19 58 32

I have the same issue. Using node v18.16.0