firebase / emulators-codelab

Apache License 2.0
46 stars 39 forks source link

Update the firebase.json emulators config to include explicit hosts. #21

Closed christhompsongoogle closed 2 years ago

christhompsongoogle commented 2 years ago

Update the firebase.json emulators config to include explicit hosts rather than relying on the default localhost. This fixes some connection issues with unit tests.

Update the node version in the github workflow to 16 to satisfy the firebase-tools min version.

Question: This still requires FIREBASE_EMULATOR_HUB to be set - is there a way we can include that in the config?

yuchenshi commented 2 years ago

Update the node version in the github workflow to 16 to satisfy the firebase-tools min version.

Gotta update the package.json files too with the engine field.

Question: This still requires FIREBASE_EMULATOR_HUB to be set - is there a way we can include that in the config?

No, but according to my testing, neither the env var nor the host IP address is needed any more in the next CLI release. The hub will default to listen on both IPv6 and IPv4, so the hub can be reached in most of the cases, and then the hub report the 127.0.0.1 IPv4 address for Firestore and the tests will just work(TM).

christhompsongoogle commented 2 years ago

Update the node version in the github workflow to 16 to satisfy the firebase-tools min version.

Gotta update the package.json files too with the engine field.

Added

Question: This still requires FIREBASE_EMULATOR_HUB to be set - is there a way we can include that in the config?

No, but according to my testing, neither the env var nor the host IP address is needed any more in the next CLI release. The hub will default to listen on both IPv6 and IPv4, so the hub can be reached in most of the cases, and then the hub report the 127.0.0.1 IPv4 address for Firestore and the tests will just work(TM).

This matches my testing with the HEAD version. Nice !