Skip to content

Commit 7940218

Browse files
committed
improved formatting and updated content
1 parent 4eb2f62 commit 7940218

File tree

4 files changed

+110
-81
lines changed

4 files changed

+110
-81
lines changed

docs/troubleshooting/backend-issues/listview_gray_box_and_red_screen_errors.md

Lines changed: 45 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -6,73 +6,76 @@ title: ListView Gray Box and Red Screen Errors
66

77
# ListView Gray Box and Red Screen Errors
88

9-
**Issue**
9+
When loading a list of items from the database, you might encounter a gray box or red error screen. This article explains the possible causes and how to resolve them.
1010

11-
When trying to load a list of items from the database, the list doesn't load and displays a gray box.
12-
13-
**Cause**
14-
15-
A gray box means the backend query failed and couldn't return any result.
11+
:::info[Prerequisites]
12+
- Ensure your query is correctly connected to a Firestore collection or CMS.
13+
- Confirm that your app builds and runs correctly in **Run** and **Test** modes.
14+
:::
1615

17-
**Verifying Query Functionality**
16+
**Understanding the Error:**
1817

19-
- If the query is successful and returns items, you will see the list populated.
20-
- If there are no records matching the query, but the query itself is successful, you will see the **empty state** that you have configured for your list.
18+
A **gray box** usually indicates that the backend query failed to return results. A **red screen** in Test mode suggests a runtime error caused by invalid data or query failure.
2119

22-
![](../assets/20250430121239249713.png)
20+
**Step-by-Step Troubleshooting:**
2321

24-
:::tip
25-
Always configure an empty state for lists. This helps differentiate between an empty dataset and a failed query.
26-
:::
22+
1. **Verify Query Results**
2723

28-
**Behavior in Different Modes**
24+
- If the query is successful and returns items, the list will populate as expected.
25+
- If there are no records matching the query, you will see the **empty state** you configured.
26+
- If the query fails, a gray box (in Run mode) or a red error screen (in Test mode) will appear.
2927

30-
The behavior may differ depending on whether you are in **Run** or **Test** mode:
28+
![Empty State](../assets/20250430121239249713.png)
3129

32-
- **Run mode**: A gray box is displayed.
33-
- **Test mode**: A red screen with an error message appears.
30+
:::tip
31+
Always configure an empty state for lists. This helps distinguish between a failed query and an empty dataset.
32+
:::
3433

35-
**Working Query with no Results**
34+
2. **Behavior by Mode**
3635

37-
![](../assets/20250430121239492027.png)
36+
- **Run mode**: Displays a gray box when the query fails.
37+
- **Test mode**: Shows a red screen with a specific error message.
3838

39-
**Failed query**
39+
**Example: Working Query with No Results**
40+
![Working Query](../assets/20250430121239492027.png)
4041

41-
![](../assets/20250430121239708989.png)
42+
**Example: Failed Query**
43+
![Failed Query](../assets/20250430121239708989.png)
4244

43-
**Troubleshooting Steps**
45+
3. **Check for Null Values in the Data**
4446

45-
If you are seeing a gray box and no filters or ordering are applied to your query, the issue is likely with the data itself, specifically **null values** in your database.
47+
Null values in critical fields may cause queries or widgets to fail.
4648

47-
Null values can cause FlutterFlow queries to fail.
49+
Here is how to check for null values:
4850

49-
![](../assets/20250430121239967301.png)
51+
1. Inspect your data in **Firebase** or **CMS** for any fields with `null` values.
52+
2. Pay attention to fields used in filters, formatting, or conditional visibility.
53+
3. For example, if `created_time` is null and you are formatting a date from this field, the query may fail.
5054

51-
**How to Check for Null Values**
55+
**Example: Null Field Causing Error**
5256

53-
- Inspect your data in Firebase for any fields that have null values.
54-
- If your dataset is small, you can use the FlutterFlow CMS to review the data.
57+
![Null Field Example](../assets/20250430121240227391.png)
58+
![Date Formatting Error](../assets/20250430121240508011.png)
5559

56-
For example, in the image below, the `created_time` field is null. If your widget relies on this field (e.g., formatting the date), the query will fail.
60+
:::note
61+
Use **visibility rules** to hide widgets that depend on potentially null values.
62+
:::
5763

58-
![](../assets/20250430121240227391.png)
59-
![](../assets/20250430121240508011.png)
64+
4. **Handle Document-From-Reference Queries Safely**
6065

61-
:::note
62-
When unsure if a value is null, use **visibility rules** to hide widgets that depend on potentially null data.
63-
:::
66+
If you use document references inside a list item widget, and the reference is null or missing, it will break the query.
6467

65-
![](../assets/20250430121240818334.png)
68+
![Broken Reference Example](../assets/20250430121240818334.png)
6669

67-
:::note
68-
If you are performing document-from-reference queries inside an item widget, always add a visibility rule to that widget. This prevents the query from breaking if the reference field is empty.
69-
:::
70+
:::note
71+
Always add a visibility rule to any widget performing document-from-reference queries. This ensures the widget is only visible when the reference is valid.
72+
:::
7073

7174

7275
:::info[Summary]
73-
- A gray box means the query failed.
74-
- A red screen means an error occurred in test mode.
75-
- Null values in your data are a common cause.
76-
- Always configure empty states and use visibility rules to handle null data safely.
76+
- A **gray box** means the backend query failed.
77+
- A **red screen** indicates a runtime error in **Test mode**.
78+
- **Null values** in your database are a common cause of failure.
79+
- Always configure **empty states** and apply **visibility rules** to handle null or missing data gracefully.
7780
:::
7881

docs/troubleshooting/backend-issues/listview_returning_only_one_item.md

Lines changed: 23 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -3,18 +3,33 @@ keywords: ['listview', 'returning', 'only']
33
slug: /listview-returning-only-one-item
44
title: ListView Returning Only One Item
55
---
6-
# ListView Returning Only One Item
6+
# Fix ListView Only Returning One Item
77

8-
If your **ListView** is only returning one item in FlutterFlow, check the following possible causes:
8+
If your **ListView** is only showing one item, this guide will walk you through the common reasons and how to resolve the issue.
99

10-
- **Use a Dynamic Widget**: Ensure you are using a dynamic widget such as **ListView**, **GridView**, **Row**, or **Column** to dynamically generate multiple children.
10+
:::info[Prerequisites]
11+
- A working Firebase or CMS integration.
12+
- A dynamic layout widget such as `ListView`, `GridView`, or `Column`.
13+
- At least two documents in your Firestore collection for testing.
14+
:::
1115

12-
- **Query for a List**: Confirm that your query retrieves a **list of documents** rather than a single record.
16+
Follow the steps below to resolve the issue:
1317

14-
- **Check Filters**: If you're applying filters, make sure that your Firestore database contains **multiple records** that satisfy the filter conditions.
18+
1. **Use a Dynamic Widget**
19+
Make sure you're using a widget like `ListView`, `GridView`, or `Column` that supports dynamic content.
1520

16-
- **Sufficient Records**: Verify that your Firestore collection has **enough records** to display multiple items.
21+
2. **Confirm the Query Type**
22+
Ensure the query is set to return a **list of documents**, not a single document.
1723

18-
- **List Type Field**: If you are querying a single field, ensure that it’s defined as a **ListType field** in both FlutterFlow and Firebase.
24+
3. **Review Applied Filters**
25+
If you are using filters, check that multiple records in your database satisfy those filter conditions.
1926

20-
By carefully reviewing these areas, you should be able to resolve the issue of your ListView returning only one item.
27+
4. **Check Firestore Data**
28+
Open your Firestore collection and verify that it contains **multiple records**.
29+
30+
5. **Verify List Type Fields**
31+
If querying a single field, confirm it's defined as a **List** in both Firebase and FlutterFlow.
32+
33+
:::tip
34+
To test your setup, remove all filters temporarily and use a basic list query. This helps isolate whether the issue is with filtering or the query type.
35+
:::

docs/troubleshooting/backend-issues/resolving_firebase_configuration_issues.md

Lines changed: 40 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -5,56 +5,67 @@ title: Resolving Firebase Configuration Issues
55
---
66
# Resolving Firebase Configuration Issues
77

8-
If you are facing issues related to the backend in FlutterFlow, follow these steps to ensure your Firebase setup is correctly configured:
8+
If you're experiencing backend errors, failed schema validation, or data sync issues, this guide will help you verify and fix your Firebase setup in FlutterFlow.
99

10-
- **Add Proper Cloud Permissions**
10+
:::info[Prerequisites]
11+
- You must have already connected your Firebase project to FlutterFlow.
12+
- You should have access to your Firebase console with admin rights.
13+
:::
1114

12-
Grant the following permissions to **firebase@flutterflow.io** in your Firebase project:
15+
Follow the steps below to fix firebase configuration:
1316

14-
- **Editor**
15-
- **Cloud Functions Admin**
16-
- **Service Account User**
17+
1. **Grant Required Permissions**
1718

18-
Learn how to **[assign Firebase permissions](/integrations/firebase/connect-to-firebase/#allow-flutterflow-to-access-your-project)**.
19+
Assign the following permissions to `[email protected]` in your Firebase project:
20+
- Editor
21+
- Cloud Functions Admin
22+
- Service Account User
1923

20-
- **Update Firebase Rules**
24+
Learn how to **[assign Firebase permissions](/integrations/firebase/connect-to-firebase/#allow-flutterflow-to-access-your-project)**.
2125

22-
Ensure that your Firebase Firestore security rules are updated correctly. See how to **[update Firebase rules](/integrations/database/cloud-firestore/firestore-rules/)**.
26+
2. **Update Firestore Rules**
2327

24-
After updating the rules, delete **[email protected]** from your authenticated users, redeploy the Firestore rules, and validate the schema again.
28+
Update your Firestore security rules to allow access for FlutterFlow.
2529

26-
![](../assets/20250430121532523511.png)
30+
After making changes:
31+
- Remove `[email protected]` from your authenticated users.
32+
- Redeploy your Firestore rules.
33+
- Validate your schema again.
2734

28-
- **Match Data Field Types and Names**
35+
![](../assets/20250430121532523511.png)
2936

30-
Verify that all data field types and field names match between **Firestore** and **FlutterFlow**.
37+
3. **Match Field Types and Names**
3138

32-
- **Validate Firestore Schema**
39+
Check that data field types and names match between Firestore and FlutterFlow exactly. Mismatches will cause query errors.
3340

34-
Use the **Validate** button in **Firestore → Settings** inside FlutterFlow to confirm that the Firestore collection schema matches the FlutterFlow configuration.
41+
4. **Validate Firestore Schema in FlutterFlow**
3542

36-
![](../assets/20250430121532793176.png)
43+
Use the **Validate** button under **Firestore → Settings** in FlutterFlow to confirm that your collection schema matches your Firestore structure.
3744

38-
- **Reset Firebase Setup (If Needed)**
45+
![](../assets/20250430121532793176.png)
3946

40-
If you have already completed the Firebase setup but continue to experience issues, remove existing permissions and complete the setup process from scratch.
47+
5. **Reset Firebase Setup (If Needed)**
4148

42-
Follow **[Firebase setup](/integrations/firebase/connect-to-firebase/)** instructions.
49+
If issues persist after following the steps above:
50+
- Revoke the current setup.
51+
- Reconnect your Firebase project using the **[Firebase setup instructions](/integrations/firebase/connect-to-firebase/)**.
4352

44-
- **Authorized Domains**
53+
6. **Add Authorized Domains**
4554

46-
Add `app.flutterflow.io` to your **Authorized Domains** under the **Authentication** tab in Firebase.
55+
In the Firebase console, go to **Authentication → Sign-in Method → Authorized Domains** and add: `app.flutterflow.io`
4756

48-
- **Refresh FlutterFlow**
57+
7. **Refresh FlutterFlow**
4958

50-
Make sure you are using the latest version of FlutterFlow:
59+
Make sure you're using the latest version of the platform:
5160

52-
- Press **Ctrl/Cmd + Shift + R** to refresh.
53-
- Clear your browser cache.
54-
- Log out and back into FlutterFlow.
61+
- Press `Ctrl`/`Cmd + Shift + R`
62+
- Clear your browser cache
63+
- Log out and back in to FlutterFlow
5564

56-
- **Use Blaze Plan for Cloud Functions**
65+
8. **Upgrade to Blaze Plan (If Using Cloud Functions)**
5766

58-
To use Cloud Functions like Push Notifications, Payments, and other features, ensure your Firebase project is on the **Blaze Plan**.
67+
Cloud Functions such as Push Notifications and Payments require a billing-enabled Firebase project. Make sure you’re on the **Blaze Plan**.
5968

60-
By following these steps, most backend issues in FlutterFlow can be resolved effectively.
69+
:::tip
70+
After updating Firestore rules, always validate the schema using the **Validate** button before proceeding with other fixes.
71+
:::

docs/troubleshooting/backend-issues/update_document_action_fails_during_backend_call.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ When the update action fails, the action flow stops, preventing any subsequent a
2121

2222
There are two common reasons why the update action may fail:
2323

24-
1. **Permission Issue in Firestore**
24+
- **Permission Issue in Firestore**
2525

2626
The user may not have the necessary permission to write to the document.
2727

@@ -33,7 +33,7 @@ There are two common reasons why the update action may fail:
3333
**Solution:**
3434
Review and configure your Firestore rules to grant write permission. For example, allowing write access to authenticated users is often sufficient if your app requires user authentication.
3535

36-
2. **Data Type Mismatch**
36+
- **Data Type Mismatch**
3737

3838
The values you are attempting to write may not match the expected field types.
3939

0 commit comments

Comments
 (0)