Skip to content

firestore emulator on hosting emulator does not work #3121

Closed
@lisp719

Description

@lisp719

[REQUIRED] Environment info

firebase-tools: 9.3.0

Platform: Docker container running on Windows 10

[REQUIRED] Test case

I launched a firebase emulator with docker.
I have specified a host to access from outside the container.

{
  "firestore": {
    "rules": "firestore.rules",
    "indexes": "firestore.indexes.json"
  },
  "hosting": {
    "public": "public",
    "ignore": ["firebase.json", "**/.*", "**/node_modules/**"]
  },
  "emulators": {
    "firestore": {
      "host": "0.0.0.0",
      "port": 8080
    },
    "hosting": {
      "host": "0.0.0.0",
      "port": 4200
    },
    "ui": {
      "enabled": true,
      "host": "0.0.0.0",
      "port": 3000
    }
  }
}

However, I cannot access the firestore emulator from the hosting emulator.

Emulator UI is accessing the firestore emulator at 127.0.0.1:8080.
However, hosting emulator is accessing the firestore emulator at 0.0.0.0:8080.

I think we need to make a similar fix here.
firebase/firebase-tools-ui#312

[REQUIRED] Steps to reproduce

  1. Run firebase init
  2. Select emulator, firestore, hosting
  3. Add host config to firebase.json
  4. Run firebase emulators:start

[REQUIRED] Expected behavior

I can access the firestore emulator from the hosting emulator.

[REQUIRED] Actual behavior

I cannot access the firestore emulator from the hosting emulator.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions