You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Setup works initially the first time the user accepts/allows the browser notification setting. However, when I manually disable the browser notification and decided to re-enable it again after some time (a few minutes), and calling OneSignal.registerForPushNotifications() does not re-subscribe the player ID.
What browsers are you seeing the problem on?
Chrome (Chromium)
What operating system are you running?
Windows 11 Pro 23H2 22631.2861
Steps to reproduce?
1. Setup
var OneSignal = OneSignal || [];
OneSignal.push(["init", {
appId: '<appidhere>',
autoRegister: false,
notifyButton: {
enable: false /* Set to false to hide */
},
,welcomeNotification: {
"title": "You're almost done!",
"message": "Please click here to log in to your account and configure your notifications.",
"url": "https://mydomain.com/welcome-message"
}
}]);
2. Make sure browser notification setting is allowed, then visit the page with the setup above.
3. Note the player/subscription ID from console: OneSignal.getUserId().then(r=>console.log(r))
4. Verify the player ID Subscription Status in dashboard.onesignal.com App > Audience > Subscription (should show check mark)
5. Disable / disallow browser notification setting. Reload.
6. Wait some time.
7. Verify the player ID Subscription Status in dashboard.onesignal.com App > Audience > Subscription (should show Not Subscribed)
8. Enable / Allow browser notification setting. Reload. Wait some time.
9. Verify the player ID Subscription Status in dashboard.onesignal.com App > Audience > Subscription (still showing Not Subscribed)
10. In browser console run: OneSignal.registerForPushNotifications(). Wait some time.
11. Verify the player ID Subscription Status in dashboard.onesignal.com App > Audience > Subscription (still showing Not Subscribed)
What did you expect to happen?
I expected the player ID status to be subscribed (check mark under "Subscription Status")
Relevant log output
No response
The text was updated successfully, but these errors were encountered:
I also called OneSignal.setSubscription(true) manually in the web console after OneSignal.registerForPushNotifications(), and still the status is "Not Subscribed".
@jpdelmundo Thanks for reporting this issue. I confirmed this happens in v15 of the OneSignal SDK. I also tested in v16 and can confirm this is no longer an issue.
What happened?
Setup works initially the first time the user accepts/allows the browser notification setting. However, when I manually disable the browser notification and decided to re-enable it again after some time (a few minutes), and calling OneSignal.registerForPushNotifications() does not re-subscribe the player ID.
What browsers are you seeing the problem on?
Chrome (Chromium)
What operating system are you running?
Windows 11 Pro 23H2 22631.2861
Steps to reproduce?
What did you expect to happen?
I expected the player ID status to be subscribed (check mark under "Subscription Status")
Relevant log output
No response
The text was updated successfully, but these errors were encountered: