-
Notifications
You must be signed in to change notification settings - Fork 63
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Emulator UI can't find firebase when served on 0.0.0.0 #464
Emulator UI can't find firebase when served on 0.0.0.0 #464
Comments
Thanks for the bug report. This is a regression of #286 and we're looking into this. |
Fixed in Firebase CLI v9.1.0. |
This issue still exists for the realtime database emulator. The firestore emulator UI correctly connects to 127.0.0.1, while the database emulator UI looks like it's trying to connect to 0.0.0.0. This issue looke like it's a Chrome on Windows issue, since Chrome on Windows doesn't seem to know what to do with 0.0.0.0. I haven't tested it, but it seems that Chrome on Linux can handle this and consider 0.0.0.0 as localhost. |
@natebot13 Your observation about Chrome on Windows v.s. Linux is right on spot, but for us to look further into this we'd need Firebase CLI version number and Chrome DevTools (Network tab showing the wrong request to |
@yuchenshi I am having this same problem, but only for realtime emulator, not firestore. The web UI for firebase realtime won't work because it tries to connect to 0.0.0.0 This is my firebase json file. I need to set 0.0.0.0 as the host in order to access the emulator from devices in my local network as well. If I changed it to 127.0.0.1, the UI problem goes away, but i wouldn't be able to connect from my phone. |
@Agusfn I think you ran into firebase/firebase-tools#2870 (a separate issue). Please try the workaround at firebase/firebase-tools#2870 (comment) and let me know if it works. If it works, we may be able to add that workaround to Emulator UI itself. |
@yuchenshi That worked! Thanks a lot. I'm not aware of how easy or not to fix this problem is, but, apparently this happens to very few people? Because I remember having it since some months ago now, and it made me reluctant to use the emulator for developing and use production which is much slower. Thank again! |
@Agusfn This only happens to Windows users who are also using I've created #519 to track this issue (and @natebot13: you may want to subscribe to that one as well). I'm sorry to hear that you get reluctant to use the emulators, but we're always here to help. We look for issues like this on GitHub and you can also reach out to Firebase Support for more involved, project-specific issues. |
Are you sure your Firewall is not blocking the port? Try checking if the port is opened an try again. You can open the port on Ubuntu with is command sudo ufw allow 9299 |
I don't think it's blocking the port since I can access the service with the proper address. It's just that for some reason the sdk wants to connect to "0.0.0.0" which doesn't make sense, given also that I've instructed already an address to connect to. That address should just represent that the service accepts incoming connections from any ip? The repercussions of this problem for me are:
It's strange that I don't see this talked about more. |
I'm using:
I'm developing a Flutter app with firebase back-end, and want to test using firebase emulators running on my dev machine, and a real device running the flutter app. To achieve this I'm specifying 0.0.0.0 as the host for firebase and cloud functions in my firebase.json so that my device running the flutter app can connect to the emulators running on my dev machine using my dev machine's LAN IP:
firebase.json
In flutter (my dev machine LAN IP is 192.168.1.45):
This works fine. The emulators run, and the device can connect to them and read all the data from firestore.
The problem is that the emulator web UI on my dev machine at localhost:4000 shows the emulator UI page, but with no data in the firestore (strangely, it can see the collections, but not the documents):
I've double-checked that the documents do actually exist. The problem seems to be that the emulator can't connect to firestore, because I see this in my browser's dev console:
This seems like a bug - shouldn't the emulator translate 0.0.0.0 to localhost, or the computer's IP, or 127.0.0.1? Because as far as I understand, 0.0.0.0 isn't acutally a valid IP. I tried redirecting 0.0.0.0 to localhost using a hosts file but this doesn't seem to work.
The text was updated successfully, but these errors were encountered: