OneSignal / react-native-onesignal

React Native Library for OneSignal Push Notifications Service
Other
1.57k stars 373 forks source link

[Bug]: Urgent Production OneSignal some users don't receive notifications #1722

Open sirusbaladi opened 2 months ago

sirusbaladi commented 2 months ago

What happened?

OneSignal Login and Notification Problem for Specific Users

Description

I'm experiencing an issue with OneSignal in our production environment where login and notifications have stopped working for some users, while continuing to function normally for others.

Current Behavior

Debugging Steps Taken

  1. Added a button in the app to trigger a notification
  2. Logging IDs using:
    • OneSignal.user.getOneSignalID (always null)
    • OneSignal.user.getExternalID (this is correct)

Observations

Suspected Cause

There's a suspicion that the logout process might be causing issues. In the app's logout method, OneSignal.logout is called. So logging in after logging out might not work.

Questions

  1. Could calling OneSignal.logout during the app's logout process be causing this issue?
  2. Why would this only affect some users and not others?
  3. Is there a way to reset or reinitialize OneSignal for affected users?

Additional Context

This issue is affecting production users, and I have no clear path to resolution as it's working correctly for the majority of users.

Impact

This issue is preventing affected users from receiving important notifications, significantly impacting their experience with my app.

Steps to reproduce?

1. Initialize OneSignal with `OneSignal.setAppId`
2. Ensure permissions are granted
3. Call `OneSignal.login` with the external user ID
4. For some users, this process fails silently

What did you expect to happen?

I expected the last session to be updated as well as the subscription tab in onesignal and users to receive notifications.

React Native OneSignal SDK version

"react-native-onesignal": "^5.1.0", "onesignal-expo-plugin": "^2.0.2",

Which platform(s) are affected?

Relevant log output

No response

Code of Conduct

nan-li commented 2 months ago

Hi @sirusbaladi thank you for reporting this. Do you have any logs available that include when login and/or logout are called? By any chance, do you have Identity Verification enabled for you app?

sirusbaladi commented 2 months ago

Hi @sirusbaladi thank you for reporting this. Do you have any logs available that include when login and/or logout are called? By any chance, do you have Identity Verification enabled for you app?

I have OneSignal.Debug.setLogLevel(LogLevel.Verbose); but I don't see any logs at login, logout.

I don't have identity verification enabled.

sirusbaladi commented 2 months ago

the only idea I have for now to create a new app in onesignal and change the keys in the app. but that's a painful process given that users who don't update the app won't receive notifications

gebrown43 commented 3 weeks ago

Any update here I am also experiencing this issue