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

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

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

[ad_1]

I’ve a easy React utility that makes use of firebase because the backend. It was working wonderful till 2 hours in the past when it began giving “code=permission-denied” on knowledge 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 wonderful.

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=**} {
      permit 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 knowledge = doc.knowledge();
                dispatch(setTeamDetails({
                 // ...setting knowledge
                }))
              });
            } else {
              // some app associated actions
            }

[ad_2]

LEAVE A REPLY

Please enter your comment!
Please enter your name here