firebasegoogle-cloud-firestorereact-redux-firebaseredux-firestore

redux-firestore listener error: FirebaseError: Missing or insufficient permissions.?


I am new to firebase and i have an error in console that i really don't know its source:

redux-firestore listener error: FirebaseError: Missing or insufficient permissions.

I don't know is this sufficient to explain my problem, but because i am new to firebase and firestore i can't explain more or bring some piece of code, everything was working fine but suddenly i got this error, what can be the source of that error?? how to fix it??


Solution

  • One reason you can suddenly be denied access to your Firebase database without having changed anything is that database access rules can have expiry dates, and the default Open Access rules do. E.g., if you examine your database rules at https://console.firebase.google.com/, you may see a line similar to this:

    match /{document=**} {
        allow read, write: if request.time < timestamp.date(2020, 7, 4);
    }
    

    Try changing the date into the future (and click Publish), and see if that helps.

    Note: You should set up proper rules that do not expire ASAP (unless expiry is part of your design). See Avoid insecure rules for more details.