Unable to Validate Firestore Schema
When trying to validate your Firestore Schema, you may encounter the error as seen in the image below:
Troubleshooting Steps:
-
Verify that you have Created a Firestore database
Ensure that you have already created a Firestore database in your Firebase project.
-
Check the Database Mode
A database in Test Mode may not work properly for FlutterFlow integration.
noteAfter creating the database in Test Mode, there is no direct visual option to switch to Production Mode. You need to update the Firebase security rules manually. However, if you deploy the rules from FlutterFlow, this step is handled automatically.
Steps to Update your Database Rules:
- Go to your Firebase project.
- Select Cloud Firestore.
- Navigate to Rules.
You will see something like this:
Update the rules as needed.
noteEnsure that you specify the correct
rules_version
and verify your configuration.- Click Publish to apply the changes.
-
Assign the necessary permissions to
firebase@flutterflow.io
You must grant the required cloud permissions to
firebase@flutterflow.io
:- Editor
- Cloud Functions Admin
- Service Account
In the Firebase Console:
- Open your project.
- Go to Project Settings > Users & Permissions.
- Confirm that the required roles are assigned to
firebase@flutterflow.io
.
If you don't see these roles assigned, you need to complete this step:
-
Ensure you have at least one collection created in FlutterFlow
In FlutterFlow, select the Firestore tab from the left menu. If no collections are listed, create at least one collection.
-
Confirm that your collections have documents
Use FlutterFlow's CMS to verify that your collections contain at least one document:
- Select Manage Content.
- Check each collection to confirm that data exists.
If no documents exist, add at least one:
-
Deploy Firestore rules from FlutterFlow
In your FlutterFlow project:
- Select Firestore > Settings.
- Scroll down to Firestore Rules.
- Select Deploy (or Redeploy if needed).