Error library

Symptom: Firestore permission denied by Security Rules

Firestore denies client requests that your Security Rules don't explicitly allow, and locked-mode or expired test-mode rules deny everything. Write rules that allow each operation for the right signed-in user and test them in the Rules Playground.

Get this exact error fixed — $49 Quick FixFixed within scope, or we keep working until it is · Read-only access Not sure it's this error? $149 diagnosis

Cause: Security Rules don't allow this read/write for this user, or test-mode rules expired.

How to fix it

  1. Check the rules in the Firebase console; test-mode rules expire after a date.
  2. Write rules per collection that check request.auth.uid.
  3. Make sure the user is signed in before the query runs.
  4. Test with the Rules Playground or emulator before deploying.

Example

Illustrative example, not from a customer project.

  match /todos/{id} {
-   allow read, write: if false;
+   allow read, write: if request.auth != null && request.auth.uid == resource.data.uid;
  }

FAQ

It worked last month and suddenly stopped.

Test-mode rules include an expiry date.

Should I allow everything?

No. Open rules let anyone read or modify your data.

QUICK FIX · $49 · THIS ERROR ONLY

Get this exact error fixed — $49 Quick FixFixed within scope, or we keep working until it is · Read-only access Not sure it's this error? $149 diagnosis

One error, one root cause, fixed in your app. If it turns out bigger, we tell you before doing more, and your $49 is credited toward the fix, diagnosis or Launch Path if you book within 14 days. Fixing three? The 3-Error Pack is $119.

Bigger job: More than one auth or data issue? Auth & database security fix, from $400.

Built with Lovable, Bolt, Replit, Cursor or v0? See rescue by platform and the security checklist.

Check it yourself first, free

$49Fix this error