-
Notifications
You must be signed in to change notification settings - Fork 105
Notifications: improved formatting, assets added, updated content, typo errors fixed #405
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
Changes from 2 commits
Commits
Show all changes
9 commits
Select commit
Hold shift + click to select a range
41e2319
improved formatting, assets added, updated content, typo errors fixed
mrdavidorok 71b73df
Merge branch 'main' into david/notifications
PoojaB26 3280b7a
changed from an intercom link to a document link.
mrdavidorok 6fb8640
Merge branch 'david/notifications' of https://github.com/FlutterFlow/…
mrdavidorok 591bc43
Merge branch 'main' into david/notifications
PoojaB26 762653b
Merge branch 'main' into david/notifications
PoojaB26 e21ca54
added "/troubleshooting/..." instead of "troubleshooting/..." in all …
mrdavidorok 5130918
fixed the build error by using the correct internal link
mrdavidorok b224b80
Merge branch 'main' into david/notifications
PoojaB26 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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.
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.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
{ | ||
"label": "Notifications" | ||
} |
99 changes: 99 additions & 0 deletions
99
docs/troubleshooting/notifications/fcm_token_generation-_roubleshooting.md
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,99 @@ | ||
--- | ||
keywords: ['push notifications', 'fcm token', 'troubleshooting', 'cloud functions'] | ||
slug: /fcm-token-generation-troubleshooting | ||
title: FCM Token Generation Troubleshooting | ||
--- | ||
|
||
# FCM Token Generation Troubleshooting | ||
|
||
When a user does not have an `fcm_token` sub-collection in their Firestore document, push notifications cannot be delivered to their device. This guide outlines the possible causes and solutions for resolving missing `fcm_token` sub-collections in FlutterFlow apps. | ||
|
||
**Understanding the Issue** | ||
|
||
Push notifications require a valid Firebase Cloud Messaging (FCM) token, which is generated when a user logs in or signs up on a physical device. This token is typically stored in the `fcm_token` sub-collection of the user document in Firestore. If this sub-collection is missing, the device cannot receive push notifications. | ||
|
||
Possible causes for missing tokens include: | ||
|
||
- Failures during FCM token generation. | ||
- Incomplete authentication flows. | ||
- Permission issues preventing token creation. | ||
- Invalid input data passed to Cloud Functions. | ||
|
||
|
||
Here are the steps to verify user eligibility for push notifications: | ||
|
||
1. Check Firestore for `fcm_token` Sub-Collection | ||
|
||
1. Open the **Firebase Console**. | ||
2. Navigate to **Firestore Database**. | ||
3. Locate the user document. | ||
4. Verify that the `fcm_token` sub-collection exists. | ||
|
||
If present, the user is eligible to receive push notifications. | ||
|
||
 | ||
|
||
|
||
### Troubleshooting Missing FCM Token Generation | ||
|
||
1. **Verify Cloud Function Execution** | ||
|
||
The `addFcmToken` Cloud Function is responsible for generating and storing FCM tokens. If token generation fails, review its logs: | ||
|
||
1. Open the **Firebase Console**. | ||
2. Navigate to **Functions**. | ||
3. Locate the `addFcmToken` function. | ||
4. Open its **Logs** to review errors or warnings. | ||
|
||
 | ||
|
||
2. **Resolve Permission Errors** | ||
|
||
Proper permissions are required to allow the Cloud Function to write FCM tokens to Firestore. | ||
|
||
**Verify Firebase Security Rules** | ||
|
||
- Ensure your Firebase security rules permit writing to the `users` collection and its sub-collections. | ||
|
||
**Verify FlutterFlow Service Account Permissions** | ||
|
||
The `[email protected]` service account must have the following roles: | ||
|
||
- `Editor` | ||
- `Cloud Functions Admin` | ||
- `Service Account User` | ||
|
||
**How to Assign Roles**: | ||
|
||
1. Open the **Firebase Console**. | ||
2. Go to **Project Settings > Users & Permissions**. | ||
3. Locate the `[email protected]` service account. | ||
4. Assign any missing roles. | ||
|
||
Refer to **[this guide](https://intercom.help/flutterflow/en/articles/6570547-setting-up-service-account-permissions-for-push-notifications)** for full instructions. | ||
|
||
3. **Validate Input Data Passed to Cloud Function** | ||
|
||
If a Cloud Function fails with status code `400`, it may be receiving invalid input data. | ||
|
||
- Verify that your authentication flow correctly retrieves the user ID before calling the function. | ||
- Ensure the user ID is not `null`, empty, or malformed. | ||
- Implement conditional validation before invoking the function. | ||
- Add logging to your authentication code and Cloud Functions to trace failures. | ||
|
||
This is especially important if you are using custom authentication logic. If you are using FlutterFlow's built-in authentication, this issue is unlikely. | ||
|
||
4. **Check for FCM Server Errors** | ||
|
||
Additional reasons FCM token generation may fail include: | ||
|
||
- FCM server downtime or temporary outages. | ||
- Incorrect or malformed requests sent from the Cloud Function to the FCM server. | ||
- Insufficient API access permissions. | ||
- Invalid or missing input data (e.g. device token). | ||
|
||
If server issues persist, consider contacting Firebase support for assistance. | ||
|
||
By following this complete troubleshooting process, you can ensure your users successfully receive push notifications. | ||
|
||
--- |
114 changes: 114 additions & 0 deletions
114
docs/troubleshooting/notifications/firebase_push_notification_troubleshooting.md
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,114 @@ | ||
--- | ||
keywords: ['firebase', 'push notifications', 'troubleshooting', 'permissions'] | ||
slug: /firebase-push-notification-troubleshooting | ||
title: Firebase Push Notification Troubleshooting | ||
--- | ||
|
||
# Firebase Push Notification Troubleshooting | ||
|
||
Push notifications are essential for keeping users informed through timely alerts and updates. However, several common configuration issues can prevent push notifications from working as expected in FlutterFlow projects. This guide outlines potential causes and solutions. | ||
|
||
:::info[Prerequisites] | ||
Before troubleshooting, ensure the following: | ||
|
||
- The FlutterFlow app is connected to Firebase. | ||
- The app is installed on a physical device (push notifications do not work on simulators). | ||
- The user is logged in to the app. | ||
- The app is not currently open when testing notifications. | ||
::: | ||
|
||
1. **Verify Firebase Blaze Plan Subscription** | ||
|
||
- Navigate to **Firebase Console > Project Settings > Usage & Billing > Details & Settings**. | ||
- Confirm that the subscription is on the **Blaze Plan**. | ||
- If the current plan is **Spark**, upgrade by selecting **Modify Plan**. | ||
|
||
 | ||
|
||
|
||
2. Verify Apple Push Notification (APN) Key Configuration | ||
|
||
- **Create an APN Key:** | ||
|
||
- Navigate to the Apple Developer Console. | ||
- Go to **Certificates, Identifiers & Profiles > Keys**. | ||
- Create a new key for push notifications if one does not exist. | ||
|
||
 | ||
|
||
Instructions for **[adding a push notification key](https://developer.apple.com/account/resources/authkeys/list)** | ||
|
||
- **Upload the APN Key to Firebase** | ||
|
||
- Navigate to **Firebase Console > Project Settings > Cloud Messaging > iOS section**. | ||
- Upload the APNs Authentication Key. | ||
|
||
 | ||
|
||
Instructions for **[uploading APN key to Firebase](https://firebase.google.com/docs/cloud-messaging/ios/certs)**. | ||
|
||
|
||
3. **Create Push Notification Identifier for Apple** | ||
|
||
- Go to the Apple Developer Console. | ||
- Navigate to **Certificates, Identifiers & Profiles > Identifiers**. | ||
- Create or verify an identifier for push notifications. | ||
|
||
 | ||
|
||
Instructions for **[creating a push notification identifier](https://developer.apple.com/account/resources/identifiers/list)**. | ||
|
||
|
||
4. **Verify Cloud Permissions for FlutterFlow Service Account** | ||
|
||
- Go to **Firebase Console > Project Settings > Users & Permissions**. | ||
- Locate the **[email protected]** service account. | ||
- Ensure the following roles are assigned: | ||
|
||
- Editor | ||
- Cloud Functions Admin | ||
- Service Account User | ||
|
||
 | ||
|
||
Instructions to **[add required cloud permissions](/integrations/firebase/connect-to-firebase/#allow-flutterflow-to-access-your-project)**. | ||
|
||
|
||
5. **Confirm Cloud Function Region Consistency** | ||
|
||
- In **FlutterFlow > Settings > Firebase > Advanced Settings**, verify the Cloud Functions Region matches the region configured in **Firebase > Project Settings > Cloud Functions Location**. | ||
|
||
 | ||
|
||
 | ||
|
||
|
||
6. **Update FlutterFlow to Latest Version** | ||
|
||
**Refresh FlutterFlow:** | ||
|
||
- On Windows: Press `Ctrl + R`. | ||
- On Mac: Press `Cmd + R`. | ||
|
||
**Clear Browser Cache:** Clear the browser cache to ensure the latest version loads properly. | ||
|
||
|
||
7. **Resolve FlutterFlow Insufficient Permissions Error** | ||
|
||
If an insufficient permissions error occurs: | ||
|
||
1. Open **Firebase Console > Project Settings > Users & Permissions**. | ||
2. Verify the **[email protected]** account exists. | ||
3. Assign the following permissions: | ||
|
||
- Editor | ||
- Cloud Functions Admin | ||
- Service Account User | ||
|
||
 | ||
|
||
4. Save changes and retry the operation in FlutterFlow. | ||
|
||
 | ||
|
||
|
37 changes: 37 additions & 0 deletions
37
docs/troubleshooting/notifications/firebase_push_notifications_on_web.md
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
--- | ||
keywords: ['firebase', 'web push', 'notifications', 'custom actions'] | ||
slug: /firebase-push-notifications-on-web | ||
title: Firebase Push Notifications on Web | ||
--- | ||
|
||
# Firebase Push Notifications on Web | ||
|
||
FlutterFlow currently does not support sending Firebase push notifications on web apps natively. However, Firebase itself supports this capability. This guide outlines alternative approaches to enable Firebase push notifications on web projects built with FlutterFlow. | ||
|
||
## Workarounds for Implementing Web Push Notifications | ||
|
||
There are two primary methods to implement Firebase web push notifications in FlutterFlow projects: | ||
|
||
- **Use Custom Actions:** | ||
|
||
- Create custom actions in FlutterFlow that utilize Firebase Cloud Messaging (FCM) to send push notifications. | ||
- This method requires writing custom code to handle notification logic and integrate it into FlutterFlow. | ||
- Custom actions offer flexibility for handling different types of notifications based on the app’s needs. | ||
- The Firebase Web SDK can be used alongside your FlutterFlow project to achieve this. | ||
|
||
Refer to official Firebase documentation for detailed steps on **[setting up web push notifications](https://firebase.google.com/docs/cloud-messaging/js/client)**. | ||
|
||
|
||
- **Use Back-End Functions:** | ||
|
||
- Implement server-side code using Firebase Functions or any other backend service. | ||
- Backend functions handle sending notifications independently of the FlutterFlow frontend. | ||
- This approach allows using the Firebase Admin SDK to programmatically send push notifications to targeted web clients. | ||
- Backend solutions also offer better scalability, error handling, and control over notification delivery. | ||
|
||
:::note | ||
- Web push notification support requires properly configured Firebase Cloud Messaging, service workers, and valid VAPID keys. | ||
- FlutterFlow may add native support for web push notifications in future updates as the platform evolves. | ||
::: | ||
|
||
|
112 changes: 112 additions & 0 deletions
112
docs/troubleshooting/notifications/fix-push_notifications_sent_to_zero_devices.md
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,112 @@ | ||
--- | ||
keywords: ['push notifications', 'firebase', 'cloud functions', 'troubleshooting'] | ||
slug: /fix-push-notifications-sent-to-zero-devices | ||
title: Fix Push Notifications Sent to Zero Devices | ||
--- | ||
|
||
# Fix Push Notifications Sent to Zero Devices | ||
|
||
Push notifications allow apps to send updates, alerts, and messages directly to users. In some cases, after triggering a push notification, FlutterFlow displays the following message: | ||
|
||
```js | ||
Push Notification sent to 0 devices | ||
``` | ||
|
||
This means that the notification was attempted, but no eligible devices received it. | ||
|
||
Here are the causes: | ||
|
||
- No registered devices have generated FCM tokens. | ||
- Target devices were offline at the time of sending. | ||
- Misconfiguration in Firebase or FlutterFlow settings. | ||
- Missing permissions or API configuration. | ||
- Recipient devices have blocked push notifications. | ||
|
||
The following steps below outline how to troubleshoot and resolve this issue: | ||
|
||
1. **Verify Firebase Functions Are Enabled** | ||
|
||
- Ensure that Firebase Functions are enabled in the Firebase Console. | ||
- Confirm that your project is on the Blaze Plan. | ||
|
||
 | ||
|
||
|
||
2. **Delete and Redeploy Firebase Cloud Functions** | ||
|
||
- Manually delete the Cloud Functions related to push notifications from Firebase. | ||
|
||
 | ||
|
||
- After deletion, redeploy Push Notifications from FlutterFlow: | ||
|
||
 | ||
|
||
3. **Verify Server Region Configuration** | ||
|
||
- Ensure that the Firebase server region matches the configuration in FlutterFlow. | ||
- For example, if the server region is `us-central1`, it must match in both Firebase and FlutterFlow. | ||
|
||
In FlutterFlow: | ||
Navigate to **Settings > Firebase > Advanced Settings** and set the correct region. | ||
|
||
 | ||
|
||
In Firebase: | ||
Verify that Cloud Functions are deployed to the same region. | ||
|
||
 | ||
|
||
4. **Check FCM API Settings in Google Cloud Console** | ||
|
||
- Open the **[Google Cloud Console](https://console.cloud.google.com/)**. | ||
- Search for `FCM API` and ensure it is enabled. | ||
|
||
 | ||
|
||
- Make sure that a valid server key is available in Firebase Console. If missing, create one through Google Cloud Console. | ||
|
||
5. **Verify Cloud Permissions for flutterflow.io Service Account** | ||
|
||
To ensure proper communication between FlutterFlow and Firebase: | ||
|
||
- Step 1: Open Firebase Console | ||
|
||
- Go to [Firebase Console](https://console.firebase.google.com/). | ||
- Select your project. | ||
|
||
- Step 2: Navigate to Users & Permissions | ||
|
||
- Open **Project Settings** via the gear icon (⚙️). | ||
- Select **Users & Permissions**. | ||
|
||
 | ||
|
||
- Step 3: Verify Existing Permissions | ||
|
||
- Locate the `[email protected]` service account. | ||
- Verify the following roles are assigned: | ||
- `Editor` | ||
- `Cloud Functions Admin` | ||
- `Service Account User` | ||
|
||
 | ||
|
||
- Step 4: Add Missing Permissions | ||
|
||
- If any roles are missing: | ||
- Click **Add Member**. | ||
- Enter `[email protected]`. | ||
- Select missing roles from the dropdown: | ||
- `Editor` | ||
- `Cloud Functions Admin` | ||
- `Service Account User` | ||
|
||
 | ||
|
||
- Step 5: Verify All Permissions Are Applied | ||
|
||
- Confirm that all required roles now appear next to the service account. | ||
|
||
Following these steps should resolve most push notification delivery issues. | ||
|
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.