firebase / firebase/firebase-tools

firebase emulator ui does not respect "emulator.ui.host" field in firebase.json

Open
#6,222 4 comments 0 reactions 0 assignees View on GitHub
emulator-suite help-wanted Needs: Attention reproducible type: bug
Dominant language
TypeScript
Stars
4.5k
Forks
1.3k
Avg merge
1d 12h
Merged PRs (30d)
84

Description

### [REQUIRED] Environment info

**firebase-tools:** 12.4.7, 12.4.6, 11.30.0

**Platform:** macOS (in docker linux/amd64)

### [REQUIRED] Test case

```dockerfile
FROM node:lts-slim

RUN apt-get update && apt-get install -y autoconf automake bash g++ libtool make openjdk-17-jre-headless python3 && \
java -version

RUN npm install -g firebase-tools@12.4.7 typescript && \
npm cache clean --force && \
firebase setup:emulators:database && \
firebase setup:emulators:firestore && \
firebase setup:emulators:pubsub && \
firebase setup:emulators:storage && \
firebase setup:emulators:ui

VOLUME /root/.cache
WORKDIR /root/app

EXPOSE 4000 4400 5000 5001 8080 8085 9000 9005 9009 9199
CMD ["sh"]
```

```firebase.json
{
"emulators": {
"singleProjectMode": false,
"auth": {
"host": "0.0.0.0",
"port": 9098
},
"functions": {
"host": "0.0.0.0",
"port": 5001
},
"firestore": {
"host": "0.0.0.0",
"port": 8080
},
"pubsub": {
"host": "0.0.0.0",
"port": 8085
},
"storage": {
"host": "0.0.0.0",
"port": 9199
},
"eventarc": {
"host": "0.0.0.0",
"port": 9299
},
"ui": {
"host": "0.0.0.0"
},
"hub": {
"host": "0.0.0.0"
},
"logging": {
"host": "0.0.0.0"
}
}
}
```

### [REQUIRED] Steps to reproduce

```sh
docker build -t fbtest:latest -f Dockerfile
docker run --rm -ti -v $PWD:/root/app /bin/bash

# in container
firebase emulators:start --only auth,firestore --project test
```

### [REQUIRED] Expected behavior

Emulator UI should start on 0.0.0.0 based on the settings in firebase.json

### [REQUIRED] Actual behavior

Emulator UI starts on 127.0.0.1. Auth and Firestore both respect the Host option.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.