-
Notifications
You must be signed in to change notification settings - Fork 368
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Bug]: some of the user device is not in the subscription list #2041
Comments
@softsan is the user not shown at all on the OneSignal dashboard if you search by your external id? Or is it there but just not shown as subscribed? Is everything working as expected with Android 12 and older devices? You are not able to reproduce the issue on your test devices at all? Development or production builds? Could your users have blocked onesignal.com? They can attempt to visit https://onesignal.com to ensure something on their device isn't blocking a connection to it. |
@jkasten2 Thanks for quick reply. His subscription / External id is shown in OneSignal dashboard for web subscription, but not for Android subscription. Is everything working as expected with Android 12 and older devices? You are not able to reproduce the issue on your test devices at all? Development or production builds? Could you users have blocked onesignal.com? They can attempt to visit https://onesignal.com/ to ensure something on their device isn't blocking a connection to it. Also previously we had android mobile app developed in Xamarin and now we completely write in android kotlin so that user was getting the push notification fine with the older app. but since now this new native android app is out in production, we unpublished the legacy one. So this user was part of legacy app and then he enrolled for our beta testing and now our official prod app in Google play he is not getting any notifications. We also had several other beta users but for them everything works fine for prod app. |
Thanks for the confirming all that and providing those extra details! Do you happen to show the OneSignal Id or the Subscription Id in your app so end-users can see if they are subscribed?
A logcat or steps to reproduce is what would really help find the root issue here. I know this would be difficult to come by, so we will also keep an eye out if we notice such an issue in our testing. |
Do you happen to show the OneSignal Id or the Subscription Id in your app so end-users can see if they are subscribed? -- i am logging those details with my backend logs. So one thing i found that OneSignalId is blank for this user in my logs. For other users , it's always there. However i see ExternalUserId in my log. |
Thanks for all the details, I have undercovered some cases we are not handling login correctly and we will improve on this in the next release. I'll follow up here once it is released, then we can ask you to confirm if this gets fixed after that. |
okay thanks. Is there any work around or solution for the time being? as our user is highly dependent on the push notification and it causes them to block from using some of my app functionality. |
@softsan do you call anything other OneSignal methods before
|
This is how i use OneSignal: Initialization of OneSignal in my Application.kt OneSignal.initWithContext(applicationContext, oneSignalAppId) Then in my main activity i am asking permission like this CoroutineScope(Dispatchers.IO).launch { And then set external id using: I have a logout functionality in my user profile page from where i call the OneSignal.Logout method. No other OneSignal method used in my project. |
@softsan we released 5.1.8 which contains a fix that might be related to your issue. The symptoms match but the triggering seems different, as normally it was triggered by calling Could you try the latest version and let us know if the fixes this problem? If not could you let us know the percentage of users that seem affected by this bug? |
@jkasten2 Sure thanks for the updates, i will try and see how it goes. in my build.gradle, i have the oneSignal like this: We used |
The version range will include all 5.x.x versions, however it doesn't guarantee you will get that version, due to caching. To ensure you have the version I recommend bumping the minimum version: |
@jkasten2 So the fix is in 5.1.9 or 5.1.8? Also released the new build of my app and it is working fine for the users who were facing that issue earlier. THANK YOU for the quick fix and updates!! |
@softsan Good to hear it sounds like things are working for you now!
I can't confirm 100% if your issue is fixed in those releases, as I am not completely sure if it was the same root issue. I wasn't able to reproduce an issue with the order of OneSignal methods you were calling. @softsan let me know if you continue to have this problem and I can reopen this issue. |
@jkasten2 hi again! I have one user who is still having issue getting subscribed for OneSignal. He tried login with different user on the same device but no luck. He also tried his user on another device but it didn't work either. Also he cleared cache and data, logout and uninstalled the app and fresh install. He tried it on cellular, his comp wifi and also his home wifi but still i do not see any records of him in OneSignal subscription list. So any idea why he is the only one who has such problem? |
@softsan thanks for reporting back! Just to confirm, so 5.1.8 and 5.1.9 fixed this issue for most users? However there is a case where one user is still stuck? For this User, can they confirm they can access https://onesignal.com/ to ensure something on their device isn't blocking a connection to it. (I know we confirmed this before with other users, just not sure if you confirm it with this specific user) Other than getting a logcat with VERBOSE logging (which would be a big ask for an end-user) I don't currently have any other ideas to debug the issue for a single user. |
@jkasten2 Yes version 5.1.8 and 5.1.9 solved all user's issue except this one. I asked to open that url on user device mobile browser and it opens fine. |
@jkasten2 Further on this, i created an in-app push prompt and it does receive on that user's device but still his device is not in the subscription list. |
@softsan That is a good detail to know, this means that a OneSignal User and Subscription was created for the device. This means there is a OneSignalId and a OneSignal SubscriptionId you could capture from the device. You could send these values to your own server to get them and check the subscription status on the OneSignal dashboard. |
@jkasten2 Yeah i already logs those info in my server and i see "oneSignalId" as blank (""). ExternalId is what my userId is but "oneSignalId" is always blank for this user. Also when i searched with the ExternalId in OneSignal Dashboard, it only shows subscription for Web only(as we also use OneSignal for Web). No Mobile device is listed in that. |
@jkasten2 Further on this, now i can see user's device in subscription list but it says "Permission not granted". However I double checked and confirmed that he has provide push notification permissions. Please help. When i open that subscription, there is no "Externalid" and i am pretty sure I use that in my code: |
One of our user is facing the same issue, playerId is blank. User is having Samsung S24Ultra. Tried upgrading OneSignal dependency version as told in the comments above but didn't help. Please suggest a solution. |
What happened?
I am using OneSignal latest SDK in my Android app. We had several beta users earlier in our app. Now we did a full roll out to production. So push notifications for those few beta users are not working and there are no subscription records of those device/users in OneSignal dashboard. It works fine for other thousand of users. but not for these few users. We already asked them to clear their cache, uninstall app and freshly install the app. We double checked that they have given push permission properly.
So what could be the cause of this? Since this happens in Prod I don't have user device's OneSignal logs.
Here is some code for init, setting up external id and push permission:
Initialization of OneSignal
OneSignal.initWithContext(applicationContext, oneSignalAppId)
set external id:
OneSignal.login(userIdx)
This is how i ask permission:
Also enabled Push permission prompt for that user and he always received that and he always click on Allowed button. He tried on another device and its work fine there but not working on his regular android device. Most of them have a Samsung Galaxy Android 14 devices.
Can any one help on this?
Steps to reproduce?
What did you expect to happen?
It should subscribe and should receive push notification
OneSignal Android SDK version
5.1.7
Android version
13
Specific Android models
Relevant log output
No response
Code of Conduct
The text was updated successfully, but these errors were encountered: