New issue
Advanced search Search tips

Issue 621461 link

Starred by 6 users

Issue metadata

Status: Fixed
Owner: ----
Closed: Aug 2016
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Mac
Pri: 2
Type: Bug-Regression



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
 
Sorry about the title – I forgot to edit it after writing up the bug. A better title would be "Cancelling push notification permissions dialog causes subsequent notification subscription attempts to fail silently"
Components: Blink>ServiceWorker
Summary: Cancelling push notification permissions dialog causes subsequent notification subscription attempts to fail silently (was: Cancelling the push notifications permissions dialog ......)

Comment 3 by horo@chromium.org, Jun 21 2016

Components: -Blink>ServiceWorker Blink>PushAPI

Comment 4 by ja...@onesignal.com, 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.
Same thing! It comes with 52.0.2743.82 (64-bit) linux fedora 21

Comment 6 by d...@aimtell.com, Aug 3 2016

Also seems to occur in Chrome 53 dev.
> 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.


Comment 8 by peter@chromium.org, Aug 8 2016

Status: Fixed (was: Unconfirmed)
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