# Push notification are not working on flutter web

**URL:** <https://community.sendbird.com/t/push-notification-are-not-working-on-flutter-web/9466>\
**Category:** Flutter\
**Tags:** push-notification\
**Created:** [April 29, 2024, 2:46pm UTC](https://community.sendbird.com/t/push-notification-are-not-working-on-flutter-web/9466 "2024-04-29T14:46:53Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![System\_Yumi](https://sea2.discourse-cdn.com/flex020/user_avatar/community.sendbird.com/system_yumi/32/5140_2.png) [@System\_Yumi](https://community.sendbird.com/u/System_Yumi)\
**Post date:** [April 29, 2024, 2:46pm UTC](https://community.sendbird.com/t/push-notification-are-not-working-on-flutter-web/9466/1 "2024-04-29T14:46:53Z")

</div>

**[Problem/Question]**  
Web notifications don’t work. I’m in HTTP V1, they work fine when I send a firebase notification (so it’s not a flutter configuration problem), everything is set-up properly on my side.

* * *

// If problem, please fill out the below. If question, please delete.  
**[SDK Version]**  
sendbird\_chat\_sdk: 4.2.10

**[Reproduction Steps]**  
1/ enable notification  
2/ add firebase messaging  
3/ try to received a notification on WEB

PS : It’s working when I send notification from firebase.

**[Frequency]**  
Always

**[Current impact]**  
Very strong

---

<div class="post-metadata">

**Author:** ![Tyler](https://sea2.discourse-cdn.com/flex020/user_avatar/community.sendbird.com/tyler/32/810_2.png) [@Tyler](https://community.sendbird.com/u/Tyler)\
**Post date:** [April 30, 2024, 2:55am UTC](https://community.sendbird.com/t/push-notification-are-not-working-on-flutter-web/9466/2 "2024-04-30T02:55:41Z")

</div>

Can you share with us your FCM implementation for push? It’s possible that FCM sends Data notifications were as Sendbird by default does not. Have you attempted to test via the Sendbird Dashboard?

---

<div class="post-metadata">

**Author:** ![System\_Yumi](https://sea2.discourse-cdn.com/flex020/user_avatar/community.sendbird.com/system_yumi/32/5140_2.png) [@System\_Yumi](https://community.sendbird.com/u/System_Yumi)\
**Post date:** [April 30, 2024, 8:54am UTC](https://community.sendbird.com/t/push-notification-are-not-working-on-flutter-web/9466/3 "2024-04-30T08:54:45Z")

</div>

Hello Tyler,  
Yes I tried throught the dashboard and I received nothing.  
I don’t know how to share my configuration, but :

- Push notifications: enabled
- Push notifications for multi-device users: Send to devices both offline and online
- Channel unread count in push notification payload: enabled
- FCM: HTTP v1 - Project ID: yumi-preprod

Template :  
Title: {channel\_name}  
Body text: {sender\_name}: {message}

How can I give you more information ?

Thanks

---

<div class="post-metadata">

**Author:** ![Tyler](https://sea2.discourse-cdn.com/flex020/user_avatar/community.sendbird.com/tyler/32/810_2.png) [@Tyler](https://community.sendbird.com/u/Tyler)\
**Post date:** [May 2, 2024, 1:45am UTC](https://community.sendbird.com/t/push-notification-are-not-working-on-flutter-web/9466/4 "2024-05-02T01:45:42Z")

</div>

Sorry, I should have been more specific. I’m looking to see your actual push implementation code.

Additionally, were you able to successfully send a push from the Sendbird Dashboard’s push tester?

---

<div class="post-metadata">

**Author:** ![System\_Yumi](https://sea2.discourse-cdn.com/flex020/user_avatar/community.sendbird.com/system_yumi/32/5140_2.png) [@System\_Yumi](https://community.sendbird.com/u/System_Yumi)\
**Post date:** [May 2, 2024, 7:12am UTC](https://community.sendbird.com/t/push-notification-are-not-working-on-flutter-web/9466/5 "2024-05-02T07:12:06Z")

</div>

Hello Tyler,

- I tried from Firebase, it’s working on my app.
- I tried from Sendbird Dashboard, it was not
- I tried from the chat itself, was not working neither.

It seems that the bridge between Sendbird and Firebase is not working, even with FCM HTTP V1 set-up.

---

<div class="post-metadata">

**Author:** ![Tyler](https://sea2.discourse-cdn.com/flex020/user_avatar/community.sendbird.com/tyler/32/810_2.png) [@Tyler](https://community.sendbird.com/u/Tyler)\
**Post date:** [May 2, 2024, 10:02am UTC](https://community.sendbird.com/t/push-notification-are-not-working-on-flutter-web/9466/6 "2024-05-02T10:02:02Z")

</div>

@System_Yumi

It looks like are a few successful push attempts but anything that fails returns the following error from FCM:

`UNREGISTERED`

Which according to FCM:

```auto
UNREGISTERED (HTTP error code = 404) App instance was unregistered from FCM. This usually means that the token used is no longer valid and a new one must be used.

```

```auto
This error can be caused by missing registration tokens, or unregistered tokens.
Missing Registration: If the message's target is a token value, check that the request contains a registration token.
Not registered: An existing registration token may cease to be valid in a number of scenarios, including:
- If the client app unregisters with FCM.
- If the client app is automatically unregistered, which can happen if the user uninstalls the application. For example, on iOS, if the APNs Feedback Service reported the APNs token as invalid.
- If the registration token expires (for example, Google might decide to refresh registration tokens, or the APNs token has expired for iOS devices).
- If the client app is updated but the new version is not configured to receive messages.
For all these cases, remove this registration token from the app server and stop using it to send messages.

```

---

<div class="post-metadata">

**Author:** ![System\_Yumi](https://sea2.discourse-cdn.com/flex020/user_avatar/community.sendbird.com/system_yumi/32/5140_2.png) [@System\_Yumi](https://community.sendbird.com/u/System_Yumi)\
**Post date:** [May 3, 2024, 8:37am UTC](https://community.sendbird.com/t/push-notification-are-not-working-on-flutter-web/9466/7 "2024-05-03T08:37:55Z")

</div>

Hello Tyler,  
Im trying to renew tokens, test and it’s still not working (but working from Firebase directly).  
Could we set-up a quick 10/15 minutes call to check what is going on please ?  
Thank you very much,  
Joyd

---

<div class="post-metadata">

**Author:** ![Tyler](https://sea2.discourse-cdn.com/flex020/user_avatar/community.sendbird.com/tyler/32/810_2.png) [@Tyler](https://community.sendbird.com/u/Tyler)\
**Post date:** [May 3, 2024, 9:02am UTC](https://community.sendbird.com/t/push-notification-are-not-working-on-flutter-web/9466/8 "2024-05-03T09:02:07Z")

</div>

@System_Yumi,

Unfortunately due to the nature of my schedule, I’m unavailable for customer calls. That being said, I took a look at the application\_ids associated with your account and I don’t see any logs from the last few days. Can you tell me what application\_id you’re using?

---

<div class="post-metadata">

**Author:** ![System\_Yumi](https://sea2.discourse-cdn.com/flex020/user_avatar/community.sendbird.com/system_yumi/32/5140_2.png) [@System\_Yumi](https://community.sendbird.com/u/System_Yumi)\
**Post date:** [May 3, 2024, 9:15am UTC](https://community.sendbird.com/t/push-notification-are-not-working-on-flutter-web/9466/9 "2024-05-03T09:15:28Z")

</div>

Im using this one : 2947902E-75F4-404D-B822-273353866E0A

Here is how I add a device :

```auto
Future<void> addDevice(UserService userService) async {
    if (dotenv.env['ACTIVATE_FIREBASE'] != "true" || sendbird.SendbirdChat.currentUser == null) {
      logger.i("Firebase integration is not activated or user is not connected.");
      return;
    }
    logger.i("Adding device token for notifications...");
    final NotificationSettings settings = await FirebaseMessaging.instance.getNotificationSettings();

    // Check if the notification permissions are granted
    if ({AuthorizationStatus.authorized, AuthorizationStatus.provisional}.contains(settings.authorizationStatus)) {
      final String? token = await FirebaseMessaging.instance.getToken(vapidKey: dotenv.env['FIREBASE_VAPID_KEY']);
      if (token != null) {
        try {
          await sendbird.SendbirdChat.registerPushToken(type: sendbird.PushTokenType.fcm, token: token);
          logger.i("Device token registered successfully.");

          userService.addDevice(token);
        } catch (e) {
          logger.e("Failed to register device token: $e");
        }
      } else {
        logger.e("Failed to retrieve the FCM token.");
      }
    } else {
      logger.i("Notification permissions are not authorized or provisional.");
    }
  }

```

---

<div class="post-metadata">

**Author:** ![Tyler](https://sea2.discourse-cdn.com/flex020/user_avatar/community.sendbird.com/tyler/32/810_2.png) [@Tyler](https://community.sendbird.com/u/Tyler)\
**Post date:** [May 3, 2024, 9:57am UTC](https://community.sendbird.com/t/push-notification-are-not-working-on-flutter-web/9466/10 "2024-05-03T09:57:00Z")

</div>

Thanks for that. I’ll have to apologize because I seem to have missed a pretty glaring aspect of this conversation in that you’re attempting to use push in Flutter Web. Sendbird has historically never supported web based push notifications.

That being said, assuming the FCM key is correct, you shouldn’t have many issues. I looked through your application and realized the user you utilize to test has a number of FCM keys associated with it. I’ve removed all but the latest token, and attempted to send a push for you. According to the results back from the FCM API, it was a success.

---

<div class="post-metadata">

**Author:** ![Tyler](https://sea2.discourse-cdn.com/flex020/user_avatar/community.sendbird.com/tyler/32/810_2.png) [@Tyler](https://community.sendbird.com/u/Tyler)\
**Post date:** [May 3, 2024, 9:58am UTC](https://community.sendbird.com/t/push-notification-are-not-working-on-flutter-web/9466/11 "2024-05-03T09:58:17Z")

</div>

I tested utilizing the Push Tester in Settings \> Chat \> Push Notifications. Can you tell me how you were testing today as the only logs I see for your application in the last few days are from the me using the push tester tool just now.

---

<div class="post-metadata">

**Author:** ![System\_Yumi](https://sea2.discourse-cdn.com/flex020/user_avatar/community.sendbird.com/system_yumi/32/5140_2.png) [@System\_Yumi](https://community.sendbird.com/u/System_Yumi)\
**Post date:** [May 3, 2024, 10:26am UTC](https://community.sendbird.com/t/push-notification-are-not-working-on-flutter-web/9466/12 "2024-05-03T10:26:09Z")

</div>

Hello Tyler!  
I don’t know how I could be more clear, we are in a flutter forum, my title is “on flutter web”.  
Also, when I discussed with your sales team + Rajan, they made perflectly clear that it was working on web.

That being said, I received your test notification :

 ![Capture d’écran 2024-05-03 à 12.21.14](https://us1.discourse-cdn.com/flex020/uploads/sendbird/original/2X/a/aec796edb0daab0a83174902cf435a1c409ecb8b.png)

For testing, I connect myself with an other user, and send a message to this user (mine).

My test are done on this channel : sendbird\_group\_channel\_367300540\_9a740216410e791c0dcfc020654a08d93d0eff32

Do I miss something here ? Why is this working with you but not with me ?  
Also, this user has a lot of tokens, because it’s been a while Im trying to make it works…

Thanks

---

<div class="post-metadata">

**Author:** ![Tyler](https://sea2.discourse-cdn.com/flex020/user_avatar/community.sendbird.com/tyler/32/810_2.png) [@Tyler](https://community.sendbird.com/u/Tyler)\
**Post date:** [May 3, 2024, 10:53am UTC](https://community.sendbird.com/t/push-notification-are-not-working-on-flutter-web/9466/13 "2024-05-03T10:53:31Z")

</div>

I totally agree with you. The title was very clear. I knew we were discussing flutter, I simply overlooked the web portion of it. That is 100% my fault there. Anyways, since you received the successful push from the Sendbird Dashboard tester, it’s important to look at the example using an actual channel.

I don’t see any inherent issues with your implementation or the configuration of the user, channel or application. That being said, I did make one change to a flag on our side. Can you give it another test?

---

<div class="post-metadata">

**Author:** ![System\_Yumi](https://sea2.discourse-cdn.com/flex020/user_avatar/community.sendbird.com/system_yumi/32/5140_2.png) [@System\_Yumi](https://community.sendbird.com/u/System_Yumi)\
**Post date:** [May 3, 2024, 11:11am UTC](https://community.sendbird.com/t/push-notification-are-not-working-on-flutter-web/9466/14 "2024-05-03T11:11:13Z")

</div>

Hello Tyler,

No problem, thanks for taking take to help me here 🙂

It seems that I received something, but I have an error :

> Unsupported URL scheme; Fallback: HTTP error: status code 404, net::ERR\_UNKNOWN\_URL\_SCHEME

---

<div class="post-metadata">

**Author:** ![Tyler](https://sea2.discourse-cdn.com/flex020/user_avatar/community.sendbird.com/tyler/32/810_2.png) [@Tyler](https://community.sendbird.com/u/Tyler)\
**Post date:** [May 3, 2024, 11:13am UTC](https://community.sendbird.com/t/push-notification-are-not-working-on-flutter-web/9466/15 "2024-05-03T11:13:17Z")

</div>

Where does this error originate? Is it from the FCM handler? Is this when you click on the push? What is the URL that you’re trying to navigate to?

---

<div class="post-metadata">

**Author:** ![System\_Yumi](https://sea2.discourse-cdn.com/flex020/user_avatar/community.sendbird.com/system_yumi/32/5140_2.png) [@System\_Yumi](https://community.sendbird.com/u/System_Yumi)\
**Post date:** [May 3, 2024, 11:18am UTC](https://community.sendbird.com/t/push-notification-are-not-working-on-flutter-web/9466/16 "2024-05-03T11:18:00Z")

</div>

This error happens when I send a message from an other account and I think its from the notification I receive, but Im not sure.

 ![Capture d’écran 2024-05-03 à 13.16.34](https://us1.discourse-cdn.com/flex020/uploads/sendbird/original/2X/5/5bcae9441e6cd22409216d1fdec4c928f46477a1.png)

---

<div class="post-metadata">

**Author:** ![System\_Yumi](https://sea2.discourse-cdn.com/flex020/user_avatar/community.sendbird.com/system_yumi/32/5140_2.png) [@System\_Yumi](https://community.sendbird.com/u/System_Yumi)\
**Post date:** [May 3, 2024, 11:18am UTC](https://community.sendbird.com/t/push-notification-are-not-working-on-flutter-web/9466/17 "2024-05-03T11:18:33Z")

</div>

![Capture d’écran 2024-05-03 à 13.16.59](https://us1.discourse-cdn.com/flex020/uploads/sendbird/original/2X/6/697050131dc95321ae14bee1d604e42a630097b3.png)

---

<div class="post-metadata">

**Author:** ![Tyler](https://sea2.discourse-cdn.com/flex020/user_avatar/community.sendbird.com/tyler/32/810_2.png) [@Tyler](https://community.sendbird.com/u/Tyler)\
**Post date:** [May 3, 2024, 11:22am UTC](https://community.sendbird.com/t/push-notification-are-not-working-on-flutter-web/9466/18 "2024-05-03T11:22:04Z")

</div>

So, these look unrelated to Sendbird. I did a quick google of the long error about the dartlang-sdk and there are many issues regarding it on the flutter github. Why the FCM payload would cause this, I’m unsure. Unfortunately, all of the github issues I’ve found are closed for inactivity.

---

<div class="post-metadata">

**Author:** ![System\_Yumi](https://sea2.discourse-cdn.com/flex020/user_avatar/community.sendbird.com/system_yumi/32/5140_2.png) [@System\_Yumi](https://community.sendbird.com/u/System_Yumi)\
**Post date:** [May 3, 2024, 11:24am UTC](https://community.sendbird.com/t/push-notification-are-not-working-on-flutter-web/9466/19 "2024-05-03T11:24:02Z")

</div>

I understand what you are saying, but when I receive notification directly from firebase it’s working ?

---

<div class="post-metadata">

**Author:** ![Tyler](https://sea2.discourse-cdn.com/flex020/user_avatar/community.sendbird.com/tyler/32/810_2.png) [@Tyler](https://community.sendbird.com/u/Tyler)\
**Post date:** [May 3, 2024, 11:26am UTC](https://community.sendbird.com/t/push-notification-are-not-working-on-flutter-web/9466/20 "2024-05-03T11:26:16Z")

</div>

Sure, and I do assume you didn’t get this error when I sent it via the Dashboar. That being said, something in the push handler must be doing something unique compared to when the other pushes were sent which is causing it to try and pull the file. I will say, all of the errors that I saw regarding this were specific to Flutter web. Can you find out specifically where in the stack this gets thrown? Add some debugging steps maybe to help us understand where in the process this breaks?

Also I’d like to note, that it’s now 830PM KST (where I’m located), so I’ll be heading out for the night.

[Next page](https://community.sendbird.com/t/push-notification-are-not-working-on-flutter-web/9466.md?page=2)
