Firestore data not shown in emulator UI
See original GitHub issue[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.
Issue Analytics
- State:
- Created 3 years ago
- Reactions:3
- Comments:17 (4 by maintainers)
Top Results From Across the Web
Firestore data in emulator not showing up in emulator UI #2365
The local emulator was working, just not showing any data. Once I switched my config settings to the correct environment, all was well...
Read more >Why don't I see data in the Firebase Cloud Firestore Emulator ...
The emulator UI only shows the active project, i.e. the one used in firebase use . If tests use this project ID, their...
Read more >Connect your app to the Cloud Firestore Emulator - Firebase
The Cloud Firestore emulator lets you visualize client requests in the Emulator Suite UI, including evaluation tracing for Firebase Security Rules. Open the ......
Read more >Firebase Emulator UI
The web UI for Firebase Emulator Suite. Features include: Overview of Emulators running; Firebase Realtime Database Data Viewer/Editor; Cloud Firestore Data ...
Read more >The Local Firebase Emulator UI in 15 minutes - YouTube
In this video, you will learn how to set up these emulators so you can develop without network latency, create better unit and...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
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!!!There are two problems here. The original one is a bug that we’ve fixed. There’s the additional one when project IDs don’t match, which has the same symptom but can be solved by double checking the Project ID in the App code where Firebase options are specified. And for @loolooii, I think you’ve run into a completely different issue. As shown in your code, you’ve called
useFirestoreEmulator
twice with different ports – please remove the last line and make sure your ports match the ones printed byemulators:start
.We’re going to lock this issue here because the original issue was fixed. For anyone reading this, we’d appreciate it if you can open a new issue if you’re still having troubles. (And please do check your initialization code to make sure Project IDs do match.)