3

I have the following versions npm - 8.1.0 java - openjdk 11.0.13 2021-10-19 LTS

I'm on a M1 Mac.

I have selected only the firestore emulator to run, successfully logged in, etc.

I do firebase emulators:start

Here is my output

i  emulators: Starting emulators: firestore
i  firestore: Firestore Emulator logging to firestore-debug.log

it then hangs here for 60 seconds and then I get this

i  emulators: Shutting down emulators.
i  firestore: Stopping Firestore Emulator
i  hub: Stopping emulator hub

Error: TIMEOUT: Port 8085 on localhost was not active within 60000ms

Note that I have tried 8080, the default and also 8085 just to try a different port but same behavior.

Firestore debug look like this

Dec 10, 2021 10:38:11 AM com.google.cloud.datastore.emulator.firestore.websocket.WebSocketServer start
INFO: Started WebSocket server on ws://localhost:49860
API endpoint: http://localhost:8085
If you are using a library that supports the FIRESTORE_EMULATOR_HOST environment variable, run:

   export FIRESTORE_EMULATOR_HOST=localhost:8085

Dev App Server is now running.

*** shutting down gRPC server since JVM is shutting down
*** server shut down

Any ideas on what might be wrong or how I can resolve?

Kevin McQuown
  • 1,277
  • 2
  • 9
  • 13

1 Answers1

4

I was using node v17. Using nvm I reverted to node v14.16.0 and it started up properly

Also I found that enter this command is critical for the firestore UI to show entries made by my iOS app.

export FIRESTORE_EMULATOR_HOST=localhost:8080

Kevin McQuown
  • 1,277
  • 2
  • 9
  • 13
  • 1
    Thanks, this helped a lot! It also seems to work on the LTS version for node 16. I installed with `nvm install lts/gallium`. Then `node use 16`. Then the emulators will start. – Jesse Pangburn Jan 22 '22 at 21:02
  • I also revert back to Node 16 and it is now working. – Darari Nur Amali Mar 16 '22 at 10:05
  • I confirm the need to upgrade node version in later versions of Firebase CLI (2022/08). From the cli tool: `Firebase CLI v11.5.0 is incompatible with Node.js v14.13.1 Please upgrade Node.js to version ^14.18.0 || >=16.4.0` – Philippe Hebert Aug 09 '22 at 19:19