-
Notifications
You must be signed in to change notification settings - Fork 28
Description
Can we access your project?
- I give permission for members of the FlutterFlow team to access and test my project for the sole purpose of investigating this issue.
Current Behavior
Hello FlutterFlow Team,
I am experiencing a persistent "Unable to Validate Firestore Schema" error with a "[cloud_firestore/permission-denied]" message on my "users" collection.
This error is preventing the "Is Anonymous" property from appearing in my project, which I need for my app's logic. We have exhausted all standard troubleshooting steps.
Here is what we have verified:
The FlutterFlow Project ID and Firebase Project ID are 100% matched.
The Anonymous Auth provider is enabled in Firebase.
We have updated the Firestore Rules directly in the Firebase Console to explicitly grant read/write access to the FlutterFlow service.
After updating the rules, we performed a "hard reset" by logging out, clearing all browser cache and cookies for all time, and logging back in.
Despite all these steps, the permission-denied error continues to appear.
Here are my current, live Firestore Rules:
rules_version = '2';
service cloud.firestore {
match /databases/{database}/documents {
match /{document=**} {
allow read, write: if request.auth.token.email.matches(".*@flutterflow.io");
}
match /users/{document} {
allow create: if request.auth.uid == document;
allow read: if request.auth.uid == document || request.auth.token.email.matches(".*@flutterflow.io");
allow write: if request.auth.uid == document;
allow delete: if false;
}
match /events/{document} {
allow read: if true;
allow create: if false;
allow write: if false;
delete: if false;
}
}
}
Could you please check the backend logs for my project to see why the schema validation call is failing with a permission-denied error even though the rules are correct?
Project URL: [https://app.flutterflow.io/project/act-in-665a9s?tab=pageSelector&page=GirisEkran]
Expected Behavior
After correctly configuring the Firestore rules to grant access to the FlutterFlow service (...@flutterflow.io
), I expected the Firestore Schema Validation to pass successfully without a permission-denied
error.
Consequently, I expected the Is Anonymous
boolean property to become visible under the Authenticated User
global variable in the Action Flow Editor.
Steps to Reproduce
-
Connect a FlutterFlow project to a new Firebase project.
-
Enable Anonymous Authentication in the Firebase Console.
-
Deploy the following Firestore Rules. (These are my current, verified rules that are live in Firebase).
rules_version = '2';
service cloud.firestore {
match /databases/{database}/documents {match /{document=**} { allow read, write: if request.auth.token.email.matches(".*@flutterflow.io"); } match /users/{document} { allow create: if request.auth.uid == document; allow read: if request.auth.uid == document || request.auth.token.email.matches(".*@flutterflow.io"); allow write: if request.auth.uid == document; allow delete: if false; } match /events/{document} { allow read: if true; allow create: if false; allow write: if false; allow delete: if false; }
}
} -
In the FlutterFlow project, go to Settings & Integrations > Firebase.
-
In the "Users Collection" section, ensure the 'users' collection is selected.
-
Click the "Validate" button.
-
Observe the "Unable to Validate Firestore Schema" with a "permission-denied" error pop-up.
-
As a result, go to the Action Flow Editor for any widget and check the properties under the 'Authenticated User' global variable. The 'Is Anonymous' property is missing.
Reproducible from Blank
- The steps to reproduce above start from a blank project.
Bug Report Code (Required)
ITFXl/KB2ItNoblE+pfhKPpWoCowGUwbUOc7j9VEGAsjCeOvPZkPPuD8VFVoSOqHfW9fe1b+/VEz0eDSveHUUPI4KQiCf6U/1Ll5UxDgeFqmRbLSErqSZ2h5EcZPGUydyLbYqiNDOshZW1plw166C9mAY3qCf9qOYwx5e6fDbOY=
Visual documentation
Environment
- FlutterFlow version: 3.32.4
- Platform: Ipad
- Browser name and version: Safari
- Operating system and version affected: IpadOS, 18.6
Additional Information
No response