Closed Joebayld closed 3 years ago
@Joebayld thanks for filing this. Since it's about the Emulator UI I'm gonna move it over to that repo.
This is not merely an emulator UI issue.
In certain cases, the behavior of writes is different between emulators and production.
Perform the following write operation, on em empty database.
db.collection('one')
.doc('two')
.collection('three')
.doc('four').set({
status: "active"
})
@4mitabh Just let me clarify: Even in production, the document two
is not automatically created either. Reads to two
always fail since two
does not actually exist. There is no automatic cascading creation or deletion in Firestore.
The Firebase Console in production however shows an entry of "two" in the data viewer to help you navigate the database and find things under it. If you look closely, it also says "this document does not exist" in the panels to help clarify. This issue tracks the implementation of a similar feature to show a placeholder for such missing links in the Emulator UI.
I see. Thanks @yuchenshi for the clarification.
I've escalated this internally as b/152785133 and we're actively trying to staff this fix. In the meantime, feel free to send us a Pull Request.
Any Updates?
I have an issue maybe related to this, when the document is empty and there is a sub-collection of documents. I tried using the UI to add fields to the parent document.
I get this error in the console.
Uncaught (in promise) Error: .set() on an existing document would delete other fields
at api.tsx:51
at c (runtime.js:63)
at Generator._invoke (runtime.js:293)
at Generator.next (runtime.js:118)
at r (asyncToGenerator.js:3)
at s (asyncToGenerator.js:25)
@phenry20 This should be fixed now. If you see otherwise, make sure to upgrade to the latest CLI and try again, and feel free to open a new bug if it still doesn't work for you.
@edmondklai I'm afraid you ran into a separate issue, #437. If you can reliably reproduce the issue, please add a comment there. Thanks!
I am still facing this issue
hi everyone, any update on this? I do still face this issue now in May 2022, with latest Firebase CLI on Windows
hi everyone, any update on this? I do still face this issue now in May 2022, with latest Firebase CLI on Windows
Use Supabase. It's 100000x better.
im having the same issue..icant write on a subcollection but works perfectly on the actual firestore..whats the update on this.?
why is this marked as solved then the issue is still not resolved
Is this being looked at? I am still experiencing this issue 01-08-2023
@braadworst I recommend switching to Supabase. No one should be using Firebase, it's just bad software.
Supabase
Why blasting your commercial interests in a Github thread? Furthermore, Firebase ain't bad software and if I was ever considering Supabase your behavior has made me put it on the bottom of the list
@braadworst I don't have any commercial interest, I was giving a recommendation. I noticed that you are commenting on a 3-year-old bug that I once had, which is closed, yet you still have the same issue.
The reason Firebase is bad software is because they don't fix their bugs. Instead of going through all this trouble, as I and many others have experienced before, I highly recommend trying an alternative that actually works. It's entirely your choice whether you want to continue to use Firebase and resubmit issues.
So anyone having this problem, if you have a :
in your id, the sub collections will not show in the emulator. There might be more special characters that trigger this behavior, so look for that in your ids. This sorts it out for me, everything works well, emulator shows the sub collections. 👍
Why is this issue closed?
Why is this issue closed?
Why are you using Firebase when there are so many better alternatives?
Firebase appears to just be in maintenance mode for a long time now, scroll up and see they don't care. Search the closed issues and you'll see they never resolve them. I've made numerous posts on SO where they used to respond, but they just say "that's how it works" and I'm pretty sure that guy in charge of that left years ago. Save yourself the headache. And before @braadworst gets into a pithy again, just know I have a personal interest in helping my fellow software engineers write better code, because one day I may end up using your product.
[REQUIRED] Environment info
firebase-tools: 8.4.0
Platform: macOS 10.15.4
[REQUIRED] Test case
I've found that when having nested collections in Firestore, they don't display on the web interface of the emulator unless parent documents contain data.
[REQUIRED] Steps to reproduce
[REQUIRED] Expected behavior
On the production version of the data viewer, it displays empty documents in italics (to designate that there is no fields but sub-collections exist). Image below.
[REQUIRED] Actual behavior
There is nothing to display on the UI and I cannot access child collections. If I set some dummy data on a document, the row will appear.