I have deleted some documents through a batch delete from a trigger in Cloud Functions. The console shows them as being deleted, however, my app still retrieves the docs! This has got to be a bug with firestore and it's a pretty major one. I found another user had the same problem here
The path I'm using is /users/{id}/timeline/{postId}
. I deleted a specific postId
.
Probably you have the problem, that the app uses the cache and loads as well some documents from it. One thing you could try is to disable the offline persistence.
If you're using Android with Real-Time Database you could try this:
FirebaseDatabase.getInstance().setPersistenceEnabled(true);
iOS + Real-Time Database
Database.database().isPersistenceEnabled = true
If you're using FireStore then use the following:
Android:
FirebaseFirestoreSettings settings = new FirebaseFirestoreSettings.Builder()
.setPersistenceEnabled(false)
.build();
db.setFirestoreSettings(settings);
iOS:
let settings = FirestoreSettings()
settings.isPersistenceEnabled = false
// Any additional options
// ...
// Enable offline data persistence
let db = Firestore.firestore()
db.settings = settings
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With