Skip to content

Backend Issues: Typo errors fixed, improved formatting, assets added #385

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 6 commits into from
Jun 27, 2025
Merged
Show file tree
Hide file tree
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 3 additions & 0 deletions docs/troubleshooting/backend-issues/_category_.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"label": "Backend"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,78 @@
---
keywords: ['database', 'listview', 'mode']
slug: /listview-gray-box-and-red-screen-errors
title: ListView Gray Box and Red Screen Errors
---

# ListView Gray Box and Red Screen Errors

**Issue**

When trying to load a list of items from the database, the list doesn't load and displays a gray box.

**Cause**

A gray box means the backend query failed and couldn't return any result.

**Verifying Query Functionality**

- If the query is successful and returns items, you will see the list populated.
- 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.

![](../assets/20250430121239249713.png)

:::tip
Always configure an empty state for lists. This helps differentiate between an empty dataset and a failed query.
:::

**Behavior in Different Modes**

The behavior may differ depending on whether you are in **Run** or **Test** mode:

- **Run mode**: A gray box is displayed.
- **Test mode**: A red screen with an error message appears.

**Working Query with no Results**

![](../assets/20250430121239492027.png)

**Failed query**

![](../assets/20250430121239708989.png)

**Troubleshooting Steps**

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.

Null values can cause FlutterFlow queries to fail.

![](../assets/20250430121239967301.png)

**How to Check for Null Values**

- Inspect your data in Firebase for any fields that have null values.
- If your dataset is small, you can use the FlutterFlow CMS to review the data.

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.

![](../assets/20250430121240227391.png)
![](../assets/20250430121240508011.png)

:::note
When unsure if a value is null, use **visibility rules** to hide widgets that depend on potentially null data.
:::

![](../assets/20250430121240818334.png)

:::note
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.
:::


:::info[Summary]
- A gray box means the query failed.
- A red screen means an error occurred in test mode.
- Null values in your data are a common cause.
- Always configure empty states and use visibility rules to handle null data safely.
:::

Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
---
keywords: ['listview', 'returning', 'only']
slug: /listview-returning-only-one-item
title: ListView Returning Only One Item
---
# ListView Returning Only One Item

If your **ListView** is only returning one item in FlutterFlow, check the following possible causes:

- **Use a Dynamic Widget**: Ensure you are using a dynamic widget such as **ListView**, **GridView**, **Row**, or **Column** to dynamically generate multiple children.

- **Query for a List**: Confirm that your query retrieves a **list of documents** rather than a single record.

- **Check Filters**: If you're applying filters, make sure that your Firestore database contains **multiple records** that satisfy the filter conditions.

- **Sufficient Records**: Verify that your Firestore collection has **enough records** to display multiple items.

- **List Type Field**: If you are querying a single field, ensure that it’s defined as a **ListType field** in both FlutterFlow and Firebase.

By carefully reviewing these areas, you should be able to resolve the issue of your ListView returning only one item.
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
---
keywords: ['firebase', 'issues', 'configuration']
slug: /resolving-firebase-configuration-issues
title: Resolving Firebase Configuration Issues
---
# Resolving Firebase Configuration Issues

If you are facing issues related to the backend in FlutterFlow, follow these steps to ensure your Firebase setup is correctly configured:

- **Add Proper Cloud Permissions**

Grant the following permissions to **[email protected]** in your Firebase project:

- **Editor**
- **Cloud Functions Admin**
- **Service Account User**

Learn how to **[assign Firebase permissions](/integrations/firebase/connect-to-firebase/#allow-flutterflow-to-access-your-project)**.

- **Update Firebase Rules**

Ensure that your Firebase Firestore security rules are updated correctly. See how to **[update Firebase rules](/integrations/database/cloud-firestore/firestore-rules/)**.

After updating the rules, delete **[email protected]** from your authenticated users, redeploy the Firestore rules, and validate the schema again.

![](../assets/20250430121532523511.png)

- **Match Data Field Types and Names**

Verify that all data field types and field names match between **Firestore** and **FlutterFlow**.

- **Validate Firestore Schema**

Use the **Validate** button in **Firestore → Settings** inside FlutterFlow to confirm that the Firestore collection schema matches the FlutterFlow configuration.

![](../assets/20250430121532793176.png)

- **Reset Firebase Setup (If Needed)**

If you have already completed the Firebase setup but continue to experience issues, remove existing permissions and complete the setup process from scratch.

Follow **[Firebase setup](/integrations/firebase/connect-to-firebase/)** instructions.

- **Authorized Domains**

Add `app.flutterflow.io` to your **Authorized Domains** under the **Authentication** tab in Firebase.

- **Refresh FlutterFlow**

Make sure you are using the latest version of FlutterFlow:

- Press **Ctrl/Cmd + Shift + R** to refresh.
- Clear your browser cache.
- Log out and back into FlutterFlow.

- **Use Blaze Plan for Cloud Functions**

To use Cloud Functions like Push Notifications, Payments, and other features, ensure your Firebase project is on the **Blaze Plan**.

By following these steps, most backend issues in FlutterFlow can be resolved effectively.
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
---
keywords: ['call', 'document', 'backend']
slug: /update-document-action-fails-during-backend-call
title: Update Document Action Fails During Backend Call
---
# Update Document Action Fails During Backend Call

When performing the **Update Document** action, you may encounter a situation where the loading indicator appears but then stops without completing the action. This indicates that the update was unsuccessful. If the update succeeds, the next steps in your action flow, such as displaying an alert dialog, should execute automatically.

![](../assets/20250430121241690449.gif)

![](../assets/20250430121241899370.png)

:::note
After performing the update action, always verify that the data has been correctly updated in your database. If your document is not streamed in real-time within your app, the updated data may not immediately appear. Check the data in FlutterFlow CMS or directly in Firebase to confirm the update.
:::

**Causes of Document Update Failures:**

When the update action fails, the action flow stops, preventing any subsequent actions from executing.

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

1. **Permission Issue in Firestore**

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

![](../assets/20250430121242149430.png)

**Cause:**
The Firestore security rules may not allow the current user to write (edit) documents.

**Solution:**
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.

2. **Data Type Mismatch**

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

For example, assigning a string value to a field that expects an integer will result in failure.

![](../assets/20250430121242530889.png)

**Cause:**
Attempting to write a value of the wrong type, such as assigning text to a number field.

**Solution:**
Verify that the values being written match the expected data types for each field. If the data comes from an API call or form input, consider using custom actions to convert the value to the appropriate type before performing the update.

:::note
If you want to save a text field value as a number, ensure that the text field input type is set to **Number**.
:::

:::info[Additional Troubleshooting]
You can check for error details in your browser's developer console (F12). For example, permission errors will typically appear in the console logs, as shown below:

![](../assets/20250430121242814005.png)
:::