[Bug]: Urgent Production OneSignal some users don't receive notifications
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
- For affected users:
- Login to OneSignal no longer works
- Last session in OneSignal dashboard is not updating
- Users are not receiving notifications
- For other users, everything works as expected
Debugging Steps Taken
- Added a button in the app to trigger a notification
- Logging IDs using:
-
OneSignal.user.getOneSignalID(always null) -
OneSignal.user.getExternalID(this is correct)
-
Observations
- The external ID is set correctly
- Subscription records are not updated
- Last session is not visible in the OneSignal dashboard for affected users
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
- Could calling
OneSignal.logoutduring the app's logout process be causing this issue? - Why would this only affect some users and not others?
- 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?
- [X] iOS
- [ ] Android
Relevant log output
No response
Code of Conduct
- [X] I agree to follow this project's Code of Conduct
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?
Hi @sirusbaladi thank you for reporting this. Do you have any logs available that include when
loginand/orlogoutare 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.
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
Any update here I am also experiencing this issue
Same here!
Same here, can someone please give an update?
In my case, users who installed our app with OneSignal v4 and then updated it to the version with OneSignal v5 are not receiving notifications until they open the app. So, we cannot reach users who automatically updated the app!
We need an urgent solution.
I have OneSignal.Debug.setLogLevel(LogLevel.Verbose); but I don't see any logs at login, logout.
@sirusbaladi I think something has gone wrong with login, likely the server call to log in this user has failed. This failure will result in no onesignal_id and no further updates, as you see in the dashboard. Without logs or more information, it is hard to know what is happening for these users. If you are able to reproduce, you will need logs from xcode or you will need to stream your phone to the Console app to retrieve logs for your ios device.
@mtebele your issue of notifications not received has been fixed, I believe we have followed up with you before.
@gebrown43 and @zguo123 please share any logs you have when you call login. The server call has likely failed and the logs will show the error.
We didn't hear back, but if this issue comes up again, please share logs and we can take another look.