question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Sub-collections of docs with colon in the doc id are not shown

See original GitHub issue

If 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:

  1. the non-existing doc region:1 is shown in italics just as how FIrebase’s web console handles the situation ✅

  2. 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 the instances sub-collection in Firebase’s web console at this point

  3. 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 doc instanceB - then I am able to see both the instanceA doc created via code as per above and the instanceB doc 🥳 so mainly a UI listing bug of some sort: the emulator does appear to store the data of instanceA in this situation just like Firestore proper does.

  4. 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:open
  • Created 2 years ago
  • Comments:10 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
yuchenshicommented, May 25, 2021

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.

0reactions
codewithtusharcommented, Oct 2, 2021

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.

Read more comments on GitHub >

github_iconTop Results From Across the Web

firebase - Add a subcollection without knowing the document ID
I tried to insert the doc.id before, but always got firebase.firestore... is not a funtion error. I assigned like var id = doc.id...
Read more >
Get Started with the Google Fonts API
You should see a page displaying the following, in the font called Tangerine: ... To request other styles or weights, append a colon...
Read more >
Chapter 4: Inverted Indexing for Text Retrieval
Postings are shown as pairs of boxes, with the document id on the left and the term frequency on the right. The MapReduce...
Read more >
Extensible Markup Language (XML) 1.0 (Fifth Edition) - W3C
The standalone document declaration, which may appear as a component of the XML declaration, signals whether or not there are such declarations ...
Read more >
Help - PubMed - NIH
How do I find systematic reviews? Are there tools to help with clinical searches or finding medical genetics information? I'm not finding what...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found