Sub-collections of docs with colon in the doc id are not shown
See original GitHub issueIf I write to a sub-collection of a non-existing doc, like so (haven’t written any data to the doc region:1
prior to this):
db.collection("servers").doc("region:1").collection("instances").doc("instanceA").set({...})
…and if I navigate to the servers
collection in the emulator UI, then:
-
the non-existing doc
region:1
is shown in italics just as how FIrebase’s web console handles the situation ✅ -
after clicking the non-existing doc
region:1
, it does not present any sub-collections though! ❌ whereas if I reproduce these steps in Firestore proper I can see theinstances
sub-collection in Firebase’s web console at this point -
if I now add the
instances
sub-collection via the emulator UI - at which point I am asked to also add a doc: I add the docinstanceB
- then I am able to see both theinstanceA
doc created via code as per above and theinstanceB
doc 🥳 so mainly a UI listing bug of some sort: the emulator does appear to store the data ofinstanceA
in this situation just like Firestore proper does. -
If I reload the emulator UI browser window at this point, the
instances
sub-collection is hidden again, i.e. the workaround presented in 3 does not persist beyond a page reload.
Issue Analytics
- State:
- Created 2 years ago
- Comments:10 (3 by maintainers)
Thanks for the additional info! Looks like the the colon
:
confused the Emulator UI or Firestore Emulator REST API and thus the subcollection IDs are not correctly listed. We can definitely look into this bug. In the meantime, please test with IDs without colons for now.i am too facing same issue, for me subcollections are created but i cannot see them in UI, but if i had path of that subcollections , i can access it and see all data still there, But i didn’t have colons anywhere
Update: document of root collection was having space at the start of it , recreating document and subcollection worked for me, also i am not able to delete the old document id with space in it, so living it it.