Safari iOS 16.5: PWA Notification.permission and navigator.permissions.query inconsistent response

I have a PWA app installed on home page, and prompted user for notification permission. User granted permission, and I can see in the app section under System Settings that permission are effectively granted.

But when querying permissions, I am getting the following response for below queries:

Incorrect:

await navigator.permissions.query({name: 'notifications'})
>> { state: "prompt", .... }

Correct:

Notification.permission
>> "granted"

Any idea why the 2 are showing different values?

Failed to mention this works in Chrome / Edge / Firefox consistently.

Possibly related: it's inconsistent in Safari 16.5 on macOS as well:

await navigator.permissions.query({name: 'notifications'})

state: "granted"

Notification.permission

"denied"

When looking at Notifications in system settings Safari is enabled, as well as my staging.domain.xx.

When looking at the site settings in Safari, the domain is correctly reporting 'enabled' as well.

Removing the permission and rerequesting permission does not solve the issue.

In short: Notficiation.permission is broken in Safari.

Even on developer.apple.com I can't enable the notifications.

We're experiencing the same issue still in November '23. Did you ever figure out a workaround or raise this as a bug?

Safari iOS 16.5: PWA Notification.permission and navigator.permissions.query inconsistent response
 
 
Q