Skip to content

firebase_messaging: Normal Push Notifications appear silently or not at all when the flutter app is terminated #2603

Closed
@royibernthal

Description

@royibernthal

My flutter doctor is perfect.

I'm using firebase-admin on nodejs to send push notifications to users:
https://firebase.google.com/docs/admin/setup

I'm using firebase_messaging 6.0.13 on flutter:
https://pub.dev/packages/firebase_messaging

I'm trying to send a push notification with the highest priority on both android and ios.

    firebase.messaging(firebaseApp).send({
    	token,
    	notification,
    	android: { priority: 'high' },
    	apns: { headers: { 'apns-priority': '10' }, payload: { aps: { sound: 'default' } } },
    	data
    }

On my development devices it works like a charm both when the app is in the background and when it's terminated.

I'm receiving push notifications that visibly pop and make a sound 100% of the time, on both android and ios.

The issue is on other devices -

If the app is in the background, I can sometimes see an actual push notification visibly pop, and make a sound as it should. Sometimes not.

If the app is terminated, a push notification is received - but it doesn't visibly pop nor make a sound, I can only see it if I scroll down the menu from the top of the screen, it's listed as a received push notification.
Sometimes the notification is not receieved at all.

I tried to change the priority of notifications from my app to high on the actual device as well, but it didn't change anything.

My users keep complaining that they're not receiving push notifications - I'm guessing they either actually don't receieve them or simply don't see them since they're recieved silently as I described above.

I literally have no idea what's going on and why it doesn't work as it should on devices other than my own development devices.

Any ideas?

Metadata

Metadata

Assignees

No one assigned

    Labels

    impact: crowdAffects many people, though not necessarily a specific customer with an assigned label. (P2)plugin: messagingtype: bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions