I noticed a quite new phenomenon which is that when I leave the console open for over a couple of minutes I get an "Error loading documents" error on all my collections until I refresh the page. This never happened before regardless of how long I left it open.
The only thing that has changed was that I was experimenting with the rules, but at the end went back to the default setup.
My question is whether this might have repercussions on how my users access their information. Please see below the current rules (commented are the ones that I published for about 10 minutes to test).
service cloud.firestore {
match /databases/{database}/documents {
// match /users/{user}/{document=**} {
// allow read;
// allow write: if request.auth.uid == user;
// }
// match /items/{document=**} {
// allow read;
// allow write: if get(/databases/$(database)/documents/users/$(request.auth.uid)).data.admin == true;
// }
// match /completedItems/{document=**} {
// allow read;
// allow write: if get(/databases/$(database)/documents/users/$(request.auth.uid)).data.admin == true;
// }
match /{document=**} {
allow read, write: if request.auth.uid != null;
}
}
}
Thanks!
In my case I figured it was Kaspersky antivirus that blocks the request. When I closed it the database successfully loaded.
For me, it was AdBlock that was making the issue - still, in 2022. Disable it and it should work fine :)
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