HomeiOS Developmentfirebase - Firestore permission denied even with guidelines set to permit all

firebase – Firestore permission denied even with guidelines set to permit all


I’ve a easy React utility that makes use of firebase because the backend. It was working advantageous till 2 hours in the past when it began giving “code=permission-denied” on information reads. It does begin working randomly for 2-4 minutes each on occasion. I’ve not made any important adjustments to the firebase configurations that may trigger this. PS authentication is working advantageous.

That is the error message I get:

firebase/firestore: Firestore (10.5.2): Uncaught Error in snapshot listener: FirebaseError: [code=permission-denied]: Lacking or inadequate permissions.

Listed below are my firestore guidelines:

rules_version = '2';

service cloud.firestore {
  match /databases/{database}/paperwork {

    match /{doc=**} {
      enable learn, write: if true;
    }
  }
}

And that is my line of code that’s producing this name to firestore:

const userRef = assortment(firebaseDB, "groups");
          const q = question(userRef, the place("electronic mail", "==", person.electronic mail));
          unSubUser = onSnapshot(q, (querySnapshot) => {
            if (querySnapshot.docs.size > 0) {
              querySnapshot.forEach((doc) => {
                const information = doc.information();
                dispatch(setTeamDetails({
                 // ...setting information
                }))
              });
            } else {
              // some app associated actions
            }

RELATED ARTICLES

LEAVE A REPLY

Please enter your comment!
Please enter your name here

Most Popular

Recent Comments