[Webkit-unassigned] [Bug 196294] New: Many bugs introduced in Safari push notifications

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Wed Mar 27 07:51:57 PDT 2019


https://bugs.webkit.org/show_bug.cgi?id=196294

            Bug ID: 196294
           Summary: Many bugs introduced in Safari push notifications
           Product: WebKit
           Version: Safari 12
          Hardware: Macintosh
                OS: Unspecified
            Status: NEW
          Severity: Major
          Priority: P2
         Component: New Bugs
          Assignee: webkit-unassigned at lists.webkit.org
          Reporter: collimarco91 at gmail.com

In the last version of Safari (12.1) you have introduced many bugs related to push notifications. I contact you from Pushpad, since you have broken thousands of website without any previous notice. 

1. Calling "window.safari.pushNotification.requestPermission" on page load now throws an exception:
"Unhandled Promise Rejection: Push notification prompting can only be done from a user gesture."

This is something that *breaks most websites*. 

Also this is something that should be discussed publicly, it is not something that you can change during the night, without any previous notice. Your behavior is unprofessional and not respectful towards developers that have built large SDKs upon your APIs. 

Moreover this change will not improve the UX since most websites will start using 2 step prompts as described here:
https://github.com/wicg/interventions/issues/49

Also note that there is a reason if Google, Mozilla, etc. still allow the notification prompt on page load: this issue still needs further discussion to find the right solutions. You can't simply break the existing APIs. You can't simply ignore that, after this change, websites will start using 2 step prompts and floating widgets, which offer an even worse UX.

2. Even worse, when you now call "window.safari.pushNotification.permission()" to check if the permission already exists, you get "undefined" (from the console) or the code stops executing. This is a bug in any case, because we are not displaying a prompt to the user here. Probably this happens if you have previously called requestPermission and the promise is rejected: requestPermission leaves the permission in an inconsistent state.

This means for example that you are also breaking the following:
a. the user allows notifications after an interaction with the page
b. after some time, on another page, you need to get the subscription details on page load, for example because you want to send the subscription to the server with some new tags
c. when you call "window.safari.pushNotification.permission()" or "window.safari.pushNotification.requestPermission" to simply get the existing subscription it doesn't work


Please consider reverting this changes (at least until a better alternative is found).

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-unassigned/attachments/20190327/9df010bf/attachment.html>


More information about the webkit-unassigned mailing list