Open dgsunesen opened 1 year ago
@dgsunesen Thank you for reporting we will need to investigate the compatibility problem. When you send a notification from OneSignal are you able to receive events on the "Notifications.addNotificationResponseReceivedListener
" or just the OneSignal handler?
@emawby Only on the OneSignal handler
It seems the issues is only around listening to notification events, whereas e.g. requesting permission like Notifications.requestPermissionsAsync()
(https://docs.expo.dev/versions/latest/sdk/notifications/#requestpermissionsasyncpermissions) is still working.
Interesting ok we will investigate. We use something called swizzling to intercept notification events, but we forward them on so that other handlers still receive them. There could be an issue around this when using expo-notifications.
Any news on this?
Let me know if there is anything else you'd need from me in terms of more information or the like
Would be nice to get an update on this :-)
Hello unfortunately we do not have any news to share yet. Are you seeing this warning when your app is started? https://github.com/expo/expo/blob/168ee43f71f005baa11edf98e518593443e1807a/packages/expo-notifications/ios/EXNotifications/Notifications/EXNotificationCenterDelegate.m#L32
Hello unfortunately we do not have any news to share yet. Are you seeing this warning when your app is started? https://github.com/expo/expo/blob/168ee43f71f005baa11edf98e518593443e1807a/packages/expo-notifications/ios/EXNotifications/Notifications/EXNotificationCenterDelegate.m#L32
No, I don't see that warning
Ok I noticed this issue in their repo as well. I will continue trying to dig through their implementation to find the conflict.
@emawby So meanwhile I've been looking into customer.io and they seem to have some of the same issues. You can see it here — maybe you can get more insights on the issue from that.
@dgsunesen That is helpful I will see if we can make a similar fix
Any luck @emawby ?
Any breakthrough @emawby ? :)
Any breakthrough @emawby ? :)
FYI @dgsunesen I’m in the process of figuring this out also. For me, it’s only affecting iOS where as Android is working as expected. I’m going to be trying to figure out how to disable the one signal listener as I believe it’s what is causing the issue. Disabling this should allow the expo-notifications one to handle the request. Will report back this week.
Any breakthrough @emawby ? :)
FYI @dgsunesen I’m in the process of figuring this out also. For me, it’s only affecting iOS where as Android is working as expected. I’m going to be trying to figure out how to disable the one signal listener as I believe it’s what is causing the issue. Disabling this should allow the expo-notifications one to handle the request. Will report back this week.
kinda weird, since for me iOS is working as expected and Android is getting duplicate notifications...
and I'm trying to stop expo from handling notifications when the app is in the background..
I have the same issue any update or workaround or help with this issue ?
Hi,
Same issue here. Any information / news about this @emawby ?
Thanks for your help.
We also have duplicated notifications in Android.
It goes away for Android if you update to the latest version of the SDK and plugin, however, now for us the build for IOS is breaking in EAS.
I'm trying to figure out if this is really a true positive before posting an issue, but the bottom line is that for us, updating to the versions bellow made the duplicated notification go away.
"react-native-onesignal": "^5.0.4",
"onesignal-expo-plugin": "^2.0.2",
We have the same issue on iOS.
"expo-notifications": "~0.28.3",
"onesignal-expo-plugin": "^2.0.2",
"expo": "^51.0.8",
The Notifications.addNotificationResponseReceivedListener
from expo-notifications is not firing in ios when I receive a notification from a 3rd service like sendbird. The notifications are coming to the app and I am able to interact with them.
I was also wondering why we cannot just listen to onesignal notifications from Notifications.addNotificationResponseReceivedListener
and we need to implement specific onesignal listener OneSignal.Notifications.addEventListener
or why onesignal cannot listen to all the notifications coming to the app not just the ones from onesignal.
How can we help?
So I'm experiencing some issues with OneSignal (
onesignal-expo-plugin
) andexpo-notifications
running in parallel. Ever since I installed and enabled OneSignal in my app, all listeners for handling user interactions on push notifications are not working anymore. For instance, a user sents another user a message, we send a push notification (usingexpo-server-sdk
), the recipient taps the notification and is send directly to the chat.To achieve this, I would do something like
Notifications.addNotificationResponseReceivedListener(listener)
withexpo-notifications
. Unfortunately, ever since OneSignal was enabled, this is not working. Stuff like requesting permission is working just as before, only listeners seems to be broken.On the other hand, if I listen for push notifications send with OneSignal, I'm able to react to those using the below example:
Isn't it possible to have both running at the same time?
OneSignal Expo SDK version
1.3.1
Platform
No response
Relevant log output
No response
Code of Conduct