firebase-tools-ui: Firestore data not shown in emulator UI
[REQUIRED] Environment info
firebase-tools: 8.4.3
Platform: macOS
[REQUIRED] Test case
I am running the emulator UI locally and connecting my android device to the local emulator UI. I am using following code to connect my firestorm DB from the android device.
val settings = FirebaseFirestoreSettings.Builder()
.setHost("10.0.2.2:8080")
.setSslEnabled(false)
.setPersistenceEnabled(false)
.build()
firestoreInstance = FirebaseFirestore.getInstance()
firestoreInstance.firestoreSettings = settings
I wanted to test firestore database in my local.
[REQUIRED] Steps to reproduce
- Start emulator UI
- Setup firestore setting in android.
- Add some data to firestore.
[REQUIRED] Expected behavior
The data which is added from device should be visible on firestore emulator UI. http://localhost:4000/firestore
[REQUIRED] Actual behavior
The data is successfully pushed to the local emulator and got an update on the android device. But the data is not visible firestore emulator UI. http://localhost:4000/firestore
Workaround: If we paste firestore URL manually on the browser then we are able to see the data.
As we can see that the document PRWJQ4Sp...
is visible now. But it is not shown under users
collection.
About this issue
- Original URL
- State: closed
- Created 4 years ago
- Reactions: 3
- Comments: 17 (4 by maintainers)
Can’t stress this enough. I was moving my dev environment from another remote firebase project to a local one powered by a firebase emulator. My emulator was emulating my production project but I was calling
firebase.initializeApp
with my dev project API keys/projectIDs/appIDs. That caused some wonky behavior where some reads would work, but writes wouldn’t go through (they would return 200 but not update the UI). So anybody having trouble with wonky emulator UI stuff or just emulator behavior in general…double check your project ids!!!