-
Notifications
You must be signed in to change notification settings - Fork 900
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Firestore indexDB persistence corrupted after user "Clear site data" #8593
Comments
I couldn't figure out how to label this issue, so I've labeled it for a human to triage. Hang tight. |
Hi @entrenadorhispano, thank you for sharing a very detailed reproduction steps, video recording and the code snippet. I was able to easily reproduce same the behavior. I tried both the SDK version that you used and the latest 11.0.1 version. I also verified that adding I will inform our engineering team of this issue. Please keep an eye out for any additional information they may provide. |
Another Part of the BugI found another part of this bug. Once the document cache is corrupted, even getDocFromServer() will fetch the cached, non-existent document. Severity of the BugI would also advise that this bug is severe and makes Firestore offline persistence unusable in production web apps. For example: In JS Frameworks, It May Be Even WorseI also tried the same process in frameworks like Svelte. There, you don't even have to modify data in the console. Simply clearing site data is enough to trigger this bug and start serving cached, non-existent documents. Thank you very much for your support and time in dealing with this. |
I would like to share my experiences with persistence on this issue:
I want to thank @entrenadorhispano for the very detailed description of the problem. This is a very serious issue and must be addressed urgently. It's incredibly difficult to debug unless you have a deep understanding of the inner workings of Firestore. Problems like this can drive developers away from Firebase. Personally, I am very close to abandoning Firebase entirely because of issues like this. I didn't create an issue on my own earlier because I just couldn't pinpoint the problem and wasn't able to make a good description without that. Also, there were many cases where I thought it was my fault and probably fixed it somehow, but it the problem came back again. Please prioritize a fix for this. |
Operating System
Windows 11, Chrome, Edge, Android, iOS
Environment (if applicable)
Chrome all major versions, Edge, Safari iOS tested on 16
Firebase SDK Version
10.14
Firebase SDK Product(s)
Firestore
Project Tooling
Vanilla JS.
Also tried on other web frameworks.
Detailed Problem Description
If Firestore persistence is active and a doc is cached. Then the user clears the site data, and and doc is updated on backend.
Cache gets corrupted and now the firestore listener returns NULL document FROM CACHE
I, leave some concrete steps for reproduction below.
(You have to put your own firebase_api_key for security)
Firebase.err.mp4
Steps and code to reproduce issue
The text was updated successfully, but these errors were encountered: