Issue metadata
Sign in to add a comment
|
Cancelling push notification permissions dialog causes subsequent notification subscription attempts to fail silently
Reported by
trondkje...@appear.in,
Jun 20 2016
|
||||||||||||||||||||||
Issue description
UserAgent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_10_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/52.0.2743.41 Safari/537.36
Steps to reproduce the problem:
1. Setup the service worker
2. Run the ServiceWorkerRegistration.pushManager.subscribe({ userVisibleOnly: true }) function
3. Dismiss the permission dialog by clicking the cross (note that the promise resolves with an endpoint)
4. Run the ServiceWorkerRegistration.pushManager.subscribe() function (note that the {userVisibleOnly: true} is optional now)
5. No permission dialog spawning, and the subscribe function resolves with the same endpoint as earlier. But because you haven't approved push notifications, you won't receive the push notifications.
What is the expected behavior?
What went wrong?
After a user cancels the push notifications permissions dialog, subsequent attempts at running ServiceWorkerRegistration.pushManager.subscribe() will fail silently.
Did this work before? Yes Chrome 51
Chrome version: 52.0.2743.41 Channel: beta
OS Version: OS X 10.10.5
Flash Version: Shockwave Flash 22.0 r0
,
Jun 20 2016
,
Jun 21 2016
,
Jul 29 2016
I also just ran into this, and can confirm the behavior listed here. I was able to work around the different behavior by: 1. Checking the permission after pushManager.subscribe() resolves to quit if the permission isn't granted. 2. Calling Notification.requestPermission() which still brings up the permission prompt when pushManager.subscribe() won't.
,
Aug 1 2016
Same thing! It comes with 52.0.2743.82 (64-bit) linux fedora 21
,
Aug 3 2016
Also seems to occur in Chrome 53 dev.
,
Aug 8 2016
> 1. Checking the permission after pushManager.subscribe() resolves to quit if the permission isn't granted. > 2. Calling Notification.requestPermission() which still brings up the permission prompt when pushManager.subscribe() won't. Won't this just get permission to send the simple kind of notifications, the kind that requires the browser tab to be open to function? Notification.requestPermission() just resolves with a permission state string, and not the GCM endpoint address that pushManager.subscribe() will.
,
Aug 8 2016
This has been fixed for Chrome 52 onward— it may not yet be in your builds, but it'll get there. Thank you for the report!! :) |
|||||||||||||||||||||||
►
Sign in to add a comment |
|||||||||||||||||||||||
Comment 1 by trondkje...@appear.in
, Jun 20 2016