Bug 248463 - Safari Notification.permission can not be reset
Summary: Safari Notification.permission can not be reset
Status: NEW
Alias: None
Product: WebKit
Classification: Unclassified
Component: New Bugs (show other bugs)
Version: Safari 16
Hardware: Mac (Apple Silicon) macOS 13
: P2 Normal
Assignee: Nobody
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2022-11-29 03:15 PST by Beren Ceylan
Modified: 2023-01-10 15:02 PST (History)
5 users (show)

See Also:


Attachments
Notification list is empty yet permission state is denied. I cant reset. (94.99 KB, image/png)
2022-11-29 03:15 PST, Beren Ceylan
no flags Details
dump_safari_push_state.sh (933 bytes, text/plain)
2023-01-10 14:57 PST, Ben Nham
no flags Details
dump_safari_push_state.sh (936 bytes, text/plain)
2023-01-10 15:00 PST, Ben Nham
no flags Details
dump_safari_push_state.sh (950 bytes, text/plain)
2023-01-10 15:02 PST, Ben Nham
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Beren Ceylan 2022-11-29 03:15:59 PST
Created attachment 463784 [details]
Notification list is empty yet permission state is denied. I cant reset.

I was expecting to find a way to reset the permission state so that i can follow same opt-in scenario from scratch for testing purposes. But i'm not able to make permission state to "default" once it is set. At first i was able to see and delete the website in settings->websites->notifications list but after some time and couple of trials it shows nothing and it becomes impossible to reset the permission state.

I tried to flush all the safari's cache, updating the version and restart the browser. But i couldn't find a way to reset this setting to be able to do tests from scratch. The list under settings->websites->notifications is still empty.

Tried safari Version 16.0 16.1 and 16.2 they all acted the same.
Comment 1 Radar WebKit Bug Importer 2022-12-08 12:33:48 PST
<rdar://problem/103141647>
Comment 2 Ben Nham 2023-01-10 14:57:10 PST
Created attachment 464446 [details]
dump_safari_push_state.sh
Comment 3 Ben Nham 2023-01-10 14:59:25 PST
WebKit delegates notification permission handling to Safari. `Notification.permission` and related JS methods basically just call back into Safari via various delegate methods and callback functions. Safari is in charge of showing the notification permissions in its settings panel, persisting those permissions, and responding to those callbacks.

Based on your screenshot, this seems like a Safari bug of some sort.

Unfortunately, to debug this further, we'll probably need some more info from your machine. Try running the attached dump_safari_push_state.sh from Terminal:

```
$ ./dump_safari_push_state.sh
```

This should produce a file called `/tmp/SafariPushState.tgz`, which you can attach to a Feedback Assistant report (https://feedbackassistant.apple.com/).

Attach SafariPushState.tgz file along with a sysdiagnose to the Feedback Assistant report. To help expedite routing the bug, you can try leaving the Feedback Assistant number in this bugzilla (it will look something like FB123456).

Since this bug is likely in Safari and not in the open-source WebKit project, and because SafariPushState.tgz and sysdiagnoses contain private info, the best next step is to file a Feedback Assistant with the info requested above. Thanks for your bug report!
Comment 4 Ben Nham 2023-01-10 15:00:41 PST
Created attachment 464447 [details]
dump_safari_push_state.sh
Comment 5 Ben Nham 2023-01-10 15:02:58 PST
Created attachment 464448 [details]
dump_safari_push_state.sh