I have a flutter app in development and I use firestore as the storage. users (collections)-> userId(doc) -> records (collection)
I am using this query:
FirebaseFirestore.instance.collection('users').doc(_userId).collection('records')
I notice when I test my app on simulator and test on my physical iphone, the list of documents I get from firestore are different. And on both env, I notice there are some documents are missing when I fetch from firestore. I can see the documents are in the firestore, but when I check the result of the query, I couldn't get the full list of documents in the collection. I notice I can only get the newly added documents. But the older documents, I couldn't get them anymore. Anyone know where to start to debug this issue? Thanks.
service cloud.firestore {
match /databases/{database}/documents {
match /{document=**} {
allow read, write: if request.auth != null;
}
}
}
I checked the query exception, no exception detected, the query succeeded.