-
Notifications
You must be signed in to change notification settings - Fork 71
Description
In firebase.json
, it is possible to specify 0.0.0.0
for host
for each emulator. This tells an emulator to listen on all IPv4 interfaces (including 127.0.0.1
, the device's public network IP, etc.).
{
// ...
"emulators": {
"firestore": {"host": "0.0.0.0", "port": 8080},
}
}
However, with this setup, the Emulator UI attempts to send requests http://0.0.0.0:8080
to reach Firestore in the Firestore viewer. This is invalid since 0.0.0.0
is a non-routable address but some browsers / platforms (such as Chrome on Linux) special cases it to mean the same as 127.0.0.1
. On other browsers / platforms (such as Chrome on Windows), this fails with errors like net::ERR_ADDRESS_INVALID
.
Instead, the Emulator UI should change it to 127.0.0.1
when constructing the URL. Similarly, the Emulator UI should connect to ::1
(IPv6 local) when ::
(IPv6 zero) is specified.