Reputation: 33
I'm trying to get the database emulator working.
Running firebase emulators:start --only auth,hosting
works fine an give the following output:
i emulators: Starting emulators: auth, hosting
i hosting: Serving hosting files from: dist/spa
✔ hosting: Local server: http://localhost:5000
i ui: Emulator UI logging to ui-debug.log
┌─────────────────────────────────────────────────────────────┐
│ ✔ All emulators ready! It is now safe to connect your app. │
│ i View Emulator UI at http://localhost:4000 │
└─────────────────────────────────────────────────────────────┘
┌────────────────┬────────────────┬────────────────────────────┐
│ Emulator │ Host:Port │ View in Emulator UI │
├────────────────┼────────────────┼────────────────────────────┤
│ Authentication │ localhost:9099 │ http://localhost:4000/auth │
├────────────────┼────────────────┼────────────────────────────┤
│ Hosting │ localhost:5000 │ n/a │
└────────────────┴────────────────┴────────────────────────────┘
Emulator Hub running at localhost:4400
Other reserved ports: 4500
However, as soon as I include emulation of the database the only thing I get is:
i emulators: Starting emulators: auth, database, hosting
i database: Database Emulator logging to database-debug.log
i emulators: Shutting down emulators.
i database: Stopping Database Emulator
i hub: Stopping emulator hub
Error: TIMEOUT: Port 9000 on localhost was not active within 60000ms
Going to http://localhost:9000
does give a response from the database so it seems to be running. But it hangs and does not allow the other emulators or the UI to start and will eventually time out.
This is the contents of the database-debug.log
08:23:16.050 [NamespaceSystem-akka.actor.default-dispatcher-4] INFO akka.event.slf4j.Slf4jLogger - Slf4jLogger started
08:23:16.247 [main] INFO com.firebase.server.forge.App$ - Listening at localhost:9000
08:24:14.144 [Thread-0] INFO com.firebase.server.forge.App$ - Attempting graceful shutdown.
08:24:14.156 [NamespaceSystem-akka.actor.default-dispatcher-4] INFO com.firebase.core.namespace.Terminator$Terminator - 1 actors left to terminate: fake-server
08:24:14.163 [NamespaceSystem-akka.actor.default-dispatcher-5] INFO com.firebase.core.namespace.NamespaceActor - Stopping namespace actor for fake-server
08:24:14.164 [NamespaceSystem-akka.actor.default-dispatcher-5] INFO com.firebase.core.namespace.NamespaceActor - Gauges removed for fake-server
08:24:14.170 [Thread-0] INFO com.firebase.server.forge.App$ - Graceful shutdown complete.
I have:
Upvotes: 2
Views: 1106
Reputation: 43
While running firebase emulators:start
you might get an output similar to this one 🥹
i emulators: Starting emulators: database, hosting
i database: Database Emulator logging to database-debug.log
i emulators: Shutting down emulators.
i database: Stopping Database Emulator.
i hub: Stopping emulator hub
Error: TIMEOUT: Port 9000 on localhost was not active within 60000ms 😭
"host": "127.0.0.1"
entry to the firebase.json
file as shown below in the emulators
section. 🔗emulators
section. 👀 "emulators": {
"database": {
"port": 9000,
"host": "127.0.0.1"
},
Run firebase emulators:start
again! 🤘🏻
Happy Coding 🧑🏻💻
Upvotes: 4