firebase / firebase/firebase-tools
Realtime Database viewer making requests to 0.0.0.0 and not displaying contents of Realtime Database.
- Dominant language
- TypeScript
- Stars
- 4.5k
- Forks
- 1.3k
- Avg merge
- 1d 12h
- Merged PRs (30d)
- 84
Description
### [REQUIRED] Environment info
**firebase-tools: 13.3.0
**Platform: ** Linux Docker Container
### [REQUIRED] Test case
Create a docker container with the following Dockerfile
```
FROM node:18-alpine
RUN apk add openjdk11
# Install firebase tools.
RUN npm install -g firebase-tools@13.3.0
RUN firebase setup:emulators:ui
WORKDIR /firebase
CMD firebase --project someProjectId emulators:start --import=/firebase/fixtures --export-on-exit
```
Use the following firebase.json file
```
{
"emulators": {
"singleProjectMode": false,
"firestore": {
"port": 5000,
"host": "0.0.0.0",
"indexes": "firestore-indexes.json"
},
"auth": {
"port": "5001",
"host": "0.0.0.0"
},
"database": {
"port": "5002",
"host": "0.0.0.0"
},
"hub": {
"host": "0.0.0.0"
},
"logging": {
"host": "0.0.0.0"
},
"ui": {
"enabled": true,
"host": "0.0.0.0",
"port": 4000
}
}
}
```
Run container using the following command
```
docker run --rm -v /home/dev/firebase:[Location to above firebase config] -d -it --name firebase -p 9150:9150 -p 5000-5002:5000-5002 -p 4000:4000 -p 4500:4500 firebase:v11
```
### [REQUIRED] Steps to reproduce
Access the above docker container firebase emulator UIfrom another machine through a local network
### [REQUIRED] Expected behavior
The Realtime DB viewer should show the content of the Database
### [REQUIRED] Actual behavior
The browser makes requests to 0.0.0.0 due to some config error in the firebase tooling and the realtime database page does not display the contents
Below is the umatrix extension showing the requests to 0.0.0.0
Below is the network requests from the browser dev tools window.
Below is the realtime database page showing tables but no content
Contributor guide
Research direction
Start with the Dockerfile and firebase.json configuration, then reproduce the emulator UI access from another machine using the published ports. Trace which configured host the Realtime Database viewer uses for its browser requests; done means the viewer contacts a reachable address instead of 0.0.0.0 and displays the database contents.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- docker, typescript
- Domain
- databases, devtools, networking
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100