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

  1. Start emulator UI
  2. Setup firestore setting in android.
  3. 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. Screenshot 2020-07-13 at 8 20 17 AM

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)

Most upvoted comments

@heyalexchoi @burhanrashid52 if you’re reading and writing data to the emulator but can’t see it in the UI check your project IDs. The Emulator UI only shows data for one project ID, the one you used to start the emulators with emulators:start. It’s likely that your tests or your code are writing to a different project, which would be invisible in the UI.

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!!!