Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

[Bug]: OneSignal.Notifications's event permissionChange not always fired (160001) #1092

Open
lmeurs opened this issue Aug 18, 2023 · 2 comments

Comments

@lmeurs
Copy link

lmeurs commented Aug 18, 2023

What happened?

OneSignal.Notifications's event permissionChange is NOT always fired when denying/resetting permissions. In all occasions OneSignal.User.PushSubscription's event change IS fired.

UPDATE: added situation when user first denies and then resets permissions.

What browsers are you seeing the problem on?

Chrome (Chromium)

What operating system are you running?

W11

Steps to reproduce?

Denying permissions

1. Implement custom event handler for `permissionChange` on `OneSignal.Notifications`
2. Call `OneSignal.User.PushSubscription.optIn()` from button click
3. Deny permission: event is NOT fired

Resetting permissions

1. Execute steps from above
2. Reload the page, verify that permission still is denied
3. Click the padlock icon in the address bar (I am using Chrome 115)
4. Reset permissions: event is NOT fired

What did you expect to happen?

I expected next events to always be fired in this order when changing browser permissions:

  1. permissionChange on OneSignal.Notifications
  2. change on OneSignal.User.PushSubscription

But only the latter is fired when denying permission.

Relevant log output

No response

@lmeurs lmeurs changed the title [Bug]: OneSignal.Notifications's event permissionChange not fired when user denies permission (160001) [Bug]: OneSignal.Notifications's event permissionChange not always fired (160001) Aug 18, 2023
@jkasten2
Copy link
Member

@lmeurs Thanks for reporting!

We will be addressing both our permission and PushSubscription states together to fix these issues.

@lmeurs
Copy link
Author

lmeurs commented Aug 29, 2023

Hi @jkasten2, thank you for your comment! Do you have an update for us? Can you give an estimate when this will be picked up / fixed?

# for free to join this conversation on GitHub. Already have an account? # to comment
Projects
None yet
Development

No branches or pull requests

2 participants