-
Notifications
You must be signed in to change notification settings - Fork 933
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
Unable connect to Firestore Emulator from another physical device (able to connect to auth, functions, storage services) #5872
Comments
Question, does |
Thank you for your response. No, |
Hi @just7mile, just to verify, when you mentioned “I'm able to open the Emulator UI in a Safari/Firefox browser”, do you mean you’re able to access the Emulator UI on your Mac machine or your iPhone, or both? If it’s both, could you let us know if you’re able to access the Firestore Emulator UI on your Mac and if it only does not load when accessing via your iPhone? I’m trying to reproduce this issue, but currently I’m only using an iOS emulated device to run the Flutter app on. I’m able to write to Firestore Emulator without any issues. Could you try using an iOS emulated device on your Mac to see if a different behavior would be shown? |
Hello @aalej, I am able to access the Emulator UI from both the iPhone physical device and the Mac machine. I am able to access Firestore Emulator UI on the Mac. Also, accessing Firestore emulator from the Flutter app works as expected when running the app on an iOS emulated device. I wanted to test the app on a physical iPhone devices, so I connected an iPhone to the Mac machine via USB cable (type-C to lighting directly, without any adapters). The Firebase Emulator is running on the Mac machine. I am able to open the Emulator UI in the iPhone's Safari and Firefox browsers (by accessing Also, when running the Flutter app on the physical iPhone device, I am able to sign in via Firebase Auth, and after hot reloads/restarts the user stays authenticated, so the Firebase Auth works as expected. But, I am not able to get documents from the Firestore. It throws errors as mentioned in this issue. I thought there is some problem specifically with the Firestore and created this issue, as other services are working as expected. |
The Emulator UI is running on the mac, so I would expect the iPhone should be able to load the firestore page if the auth/storage pages work. Maybe something is incorrect about the JWT/auth forwarding? |
@christhompsongoogle I am seeing exactly the same thing here. I commented on another issue: #4154 (comment) As per my comment on the other issue I am able to connect to the Firebase emulator instance on the same wifi network with the same Flutter app build on a physical Android device with no issues, it just doesn't work on iOS despite my verifying that my app does have the "Local Network" permission (I double check this in the iOS Settings screen for my app). I can likewise access the Emulator UI webpages in Safari on my iphone so it definitely can at least open HTTP connections to the laptop where I have the Firebase Emulator running. |
Got same issue on Windows 10 + Android device. Temporarily disabling Windows firewall fixed the issue, so it's a firewall issue. edit: |
[REQUIRED] Environment info
firebase-tools: 12.1.0
Platform: MacOS
[REQUIRED] Test case
The Firebase Emulator Suite is started on the Mac with host as
0.0.0.0
for all services. An iPhone device is connected to the Mac via USB cable and internet sharing is enabled. Ports of services areUI: 10100
,Functions: 10200
,Auth: 10300
,Firestore: 10400
.I'm able to open the Emulator UI in a Safari/Firefox browser by accessing
http://macbook-pro.local:10100
orhttp://<mac-ip-address>:10100
, it opens the Auth emulator when clicking onGo to auth emulator
button and shows list of users. Same with functions and storage emulators. BUT, it gives timeout with firestore emulator, and never loads it.It is a problem, because I'm not being able to test my app. I'm connecting to the Emulator Suite from my app which is running on a physical iPhone device connected to the Mac via USB, and I'm able to log into the app, but I'm not able to get documents from the firestore. On hot restart the user is authenticated, which means the Firebase Auth is able to connect to the emulator, but the Firestore keeps giving
[cloud_firestore/unavailable] The service is currently unavailable. This is a most likely a transient condition and may be corrected by retrying with a backoff
and[FirebaseFirestore][I-FST000001] WatchStream (10521fe78) Stream error: 'Unavailable: failed to connect to all addresses'
errors.The app is developed in Flutter, and here is my setup:
[REQUIRED] Steps to reproduce
Go to firestore emulator
button.[REQUIRED] Expected behavior
It opens the page with a loading indicator in the collection column saying
Loading collections
, and after few moments it timeouts.[REQUIRED] Actual behavior
Should be able to load, similar to Auth, Functions or Storage services.
The text was updated successfully, but these errors were encountered: