OneSignal / react-native-onesignal

React Native Library for OneSignal Push Notifications Service
Other
1.56k stars 371 forks source link

airplane mode ON: notifications lost? #1654

Open pierroo opened 4 months ago

pierroo commented 4 months ago

What happened?

Some of my users complain that once they turn back off the airplane mode (they left ON during the night) they don't get all the notifications that were sent to them during the night.

Apparently only for my app, other apps it's working fine.

What should we do with onesignal for those pending notifications to not be lost entirely when airplane mode is on?

Steps to reproduce?

1- turn airplane mode ON
2- go to sleep
3- wake up
4- turn airplane mode OFF
5- cry that your friend didn't message you during the night
6- realize you actually got messages but no notifications

What did you expect to happen?

When we turn back off the airplane mode, all pending notifications should be received

React Native OneSignal SDK version

4.5.2

Which platform(s) are affected?

Relevant log output

No response

Code of Conduct

jkasten2 commented 4 months ago

@pierroo Are you able to reproduce the issue on your own device or emulator? Are they all not displayed or do you only get the most recent one?

If you set the notification as high priority in OneSignal does it prevent the issue?

pierroo commented 4 months ago

they are all not displayed (like none of the notifications sent to users while they were in airplane mode are areceived)

yes I am able to reproduce it on my own device as well, just tried it

I could try the high priority, but isn't it supposed to be only for... high priority notif? like being called / emergency etc? Isn't it bad practice to use it? or do every apps do that? (unless you ask just for testing?)

Edit: I checked the meaning of high priority, unfortunately as stated in your doc there is a limit from the device for how many we can send per day. In my case it's a chatting app, I obviously will go beyond this limit; isn't it bad practice? shouldn't normal priority still be pending while waiting for airplane mode to turn off?

also, apparently my channel is already set to high importance: image

and yet it doesn't work after airplane mode, what else should I test @jkasten2 ?

sorasful commented 2 months ago

I am very interested by this issue @pierroo did you manage to get your notifications sent while your users were in airplane mode ?