If you think a bug might affect users in the 57 release, please set the correct tracking and status flags for Release Management.

No web notification upon allow but not "remember choice"




Notifications and Alerts
5 months ago
5 months ago


(Reporter: roger_bosman, Unassigned)


53 Branch

Firefox Tracking Flags

(Not tracked)




5 months ago
User Agent: Mozilla/5.0 (Windows NT 6.3; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/58.0.3029.96 Safari/537.36

Steps to reproduce:

Call this code on a webpage that works in other browsers:

// Let's check whether notification permissions have already been granted
if (Notification.permission === "granted") {
    // If it's okay let's create a notification

// Otherwise, we need to ask the user for permission
else if (Notification.permission !== "denied") {
    Notification.requestPermission(function (permission) {
        // If the user accepts, let's create a notification
        if (permission === "granted") {

Actual results:

Firefox prompts for permission, when clicking yes and checking "remember choice" button everything works as expected. However, when not remembering choice, permission comes back as "granted" and notification gets created, but no notification is displayed.

Expected results:

Notification should be displayed once if clicking allow but not checking "remember choice" checkbox.


5 months ago
Component: Untriaged → Notifications and Alerts
Product: Core → Toolkit

Comment 1

5 months ago
Any ideas here?  Or is there a better person to ask?  Thanks!
Flags: needinfo?(kit)

Comment 2

5 months ago
Note: omitted contents of createNotification(), but none of the suggested ways of https://developer.mozilla.org/en-US/docs/Web/API/Notifications_API/Using_the_Notifications_API work (constructor of Notification gets called just fine, no errors, just no display of notification)
Hmm, I didn't realize we shipped the checkbox to release. We treat web notifications (`new Notification(...)`) and push notifications (sent via service workers) the same way. Since service workers outlive a session, it didn't make sense to temporarily allow push notifications, so that's why 52 and earlier only showed "Always Receive" and "Always Block". In 53 and 54, though:

* Check "remember" + Don't Allow = Always block. The site can't ask again until you remove the block using the control center.
* Uncheck "remember" + Don't Allow = Blocked for now, but the site can ask again once you refresh.
* Check "remember" + Allow = Both web and push notifications work.
* Uncheck "remember" + Allow = This bug. It *looks* like permission is granted, and you can get a push endpoint, but neither web nor push notifications work.

The checkbox is gone in 55, but I don't know what we can do for 53 and 54. Johann, WDYT? Is it too late to uplift the new doorhanger with "Not Now", "Never Allow", "Allow" to 54?
Flags: needinfo?(kit) → needinfo?(jhofmann)
See Also: → bug 1341742
Yup, since that patch adds new strings it's too late unfortunately. FWIW, in bug 1341742 we offered to patch up the checkbox to be essentially a no-op (always save the permission as permanent) to fix this short term, but didn't get a positive signal on it.

Arguably it's not a big problem since research shows that virtual nobody notices that checkbox anyway https://medium.com/firefox-ux/user-study-new-privacy-permissions-panel-223e61cc7545
Flags: needinfo?(jhofmann)
You need to log in before you can comment on or make changes to this bug.