'Unable to access firebase emulator UI
I have the following firebase.json
{
"emulators": {
"firestore": {
"port": 8080
},
"ui": {
"enabled": true,
"host": "localhost",
"port": 4000
},
"database": {
"port": 9000
}
}
}
But I can't access localhost:4000.
My firebase-tools version is 8.4.3.
Running firebase emulators:start shows the following:
i emulators: Starting emulators: firestore, database
⚠ firestore: Did not find a Cloud Firestore rules file specified in a firebase.json config file.
⚠ firestore: The emulator will default to allowing all reads and writes. Learn more about this option: https://firebase.google.com/docs/emulator-suite/install_and_configure#security_rules_configuration.
i firestore: Firestore Emulator logging to firestore-debug.log
⚠ database: Did not find a Realtime Database rules file specified in a firebase.json config file. The emulator will default to allowing all reads and writes. Learn more about this option: https://firebase.google.com/docs/emulator-suite/install_and_configure#security_rules_configuration.
i database: Database Emulator logging to database-debug.log
┌──────────────────────────────────────────────────────────────┐
│ ✔ All emulators ready! It is now safe to connect your apps. │
└──────────────────────────────────────────────────────────────┘
┌───────────┬────────────────┐
│ Emulator │ Host:Port │
├───────────┼────────────────┤
│ Firestore │ localhost:8080 │
├───────────┼────────────────┤
│ Database │ localhost:9000 │
└───────────┴────────────────┘
Other reserved ports:
Thank you in appreciation.
Solution 1:[1]
I made a mistake of not choosing a default project. With a chosen default project, the emulator ui came up.
Solution 2:[2]
Make sure in firebase.json , ui is set to true for emulators like below
"emulators": {
"pubsub": {
"port": 8085
},
"ui": {
"enabled": true
}, }
Then once you run emulator with "firebase emulator:start"
You will find
If you visit mentioned url in browser, you will find
Solution 3:[3]
In case anyone is using docker for the emulator and trying to access it from the host using port mappings, make sure to set the host property of the emulator UI config to 0.0.0.0. This goes for all other services you want to access from the host as well.
{
"emulators": {
"ui": {
"host": "0.0.0.0",
"port": 4000
},
// other services
}
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 | ronbm |
| Solution 2 | Dharman |
| Solution 3 | mj3c |


