Toast notifications do not display notifications on Windows Nightly
Categories
(Toolkit Graveyard :: Notifications and Alerts, defect, P3)
Tracking
(Not tracked)
People
(Reporter: kernp25, Assigned: nrishel)
References
Details
Attachments
(4 files)
How i fixed this bug:
- Go to about:config.
- Search for "alerts.useSystemBackend".
- Set the pref to false (default true).
It maybe has something to do with this bug [1]?
Comment 3•7 years ago
|
||
I'm using the following STR (steps to reproduce):
- Start Firefox Nightly on Windows 10.
- Visit about:config?filter=alerts.useSystemBackend
- Flip the preference to true.
- Visit https://example.com and run the following code from the devtools:
Notification.requestPermission().then(() => new Notification('hello')); - A permission doorhanger appears. Approve the permission.
Expected:
- a XUL notification is shown.
After following the above steps in Firefox Nightly 66.0a1 (build ID 20190124104034) on Windows 10 x64, I see the expected notification (in the bottom-right corner) (on Linux the notification appears in the upper-right corner).
Did you accidentally activate the "Pause notifications until Nightly restarts" option? You can check whether this setting is set at about:preferences#privacy
I'm assuming that this bug is invalid, but if not, please provide the steps to reproduce.
"Pause notifications until Nightly restarts" option?
Where is this option?
I run this code:
Notification.requestPermission().then(() => new Notification('hello'));
I also did:
new Notification('hello')
nothing!
It shows me the permission doorhanger (as you said), but then nothing! (i did approved the permission ofc.)
I'm using this code in my WebExtension to display a notification:
browser.notifications.create(autocopyNotification, {
type: "basic",
/*iconUrl: browser.extension.getURL("default-64.png"),*/
title: "AutoCopy",
message,
});
Comment 6•7 years ago
|
||
(In reply to kernp25 from comment #4)
"Pause notifications until Nightly restarts" option?
Where is this option?
At about:preferences , scroll down to "Permissions" (or search for it).
It's a checkbox immediately below "Notifications".
Tested it again on a other computer with Firefox 64 stable and it worked!
Maybe there is a problem with my system notifications?
Comment 10•7 years ago
|
||
| Reporter | ||
Comment 11•7 years ago
|
||
I do not have this setting?
| Reporter | ||
Comment 12•7 years ago
|
||
Can you tell me the pref name of this setting (if possible)?
Comment 13•7 years ago
|
||
Never mind about that setting; it is only available when alerts.useSystemBackend=false (at least on Windows and Linux).
I have no idea what's happening here. There are a couple of other bugs on Bugzilla about notifications and Windows, consider checking whether they match your behavior.
The "alerts.useSystemBackend" preference has nothing to do with your bug. If any, this pref offers a work-around to see notifications despite the default implementation being broken (apparently) on your system.
| Reporter | ||
Comment 14•7 years ago
|
||
(In reply to Rob Wu [:robwu] from comment #13)
Never mind about that setting; it is only available when alerts.useSystemBackend=false (at least on Windows and Linux).
I have no idea what's happening here. There are a couple of other bugs on Bugzilla about notifications and Windows, consider checking whether they match your behavior.
The "alerts.useSystemBackend" preference has nothing to do with your bug. If any, this pref offers a work-around to see notifications despite the default implementation being broken (apparently) on your system.
But if my system notifications are broken, maybe Firefox can detect this somehow and then uses it's own notifications as a fallback?
Is that doable?
Comment 15•7 years ago
|
||
(In reply to kernp25 from comment #14)
But if my system notifications are broken, maybe Firefox can detect this somehow and then uses it's own notifications as a fallback?
Is that doable?
Maybe. I don't know. For all I know there could be a do-not-disturb setting on the system, and not showing a notification would then match the request to not show notifications.
I cannot reproduce your problem, but if you are able to identify the root cause of the hidden notification, then we can see whether it is possible to fix or work around the issue.
Comment 16•7 years ago
|
||
Can you look at the dependency tree for the native Windows notifications and see if any of the bugs sound like your problem? https://bugzilla.mozilla.org/showdependencytree.cgi?id=1497425&hide_resolved=1
| Reporter | ||
Comment 17•7 years ago
|
||
Yes! I think it must be a Firefox bug then. Because, i tested it with Vivaldi browser on my system and it worked!
I run this code on https://example.com in the Console:
Notification.requestPermission().then(() => new Notification('hello'));
What does this bug mean?
https://bugzilla.mozilla.org/show_bug.cgi?id=1502044
| Reporter | ||
Comment 18•7 years ago
|
||
Vivaldi notification.
Comment 19•7 years ago
|
||
(In reply to kernp25 from comment #17)
Yes! I think it must be a Firefox bug then. Because, i tested it with Vivaldi browser on my system and it worked!
Our support for native Windows notifications is a work-in-progress on Nightly-only so it's expected that some things don't work properly yet. The notifications should work fine in Beta and Release Firefox but they won't be Windows native ones.
I run this code on https://example.com in the Console:
Notification.requestPermission().then(() => new Notification('hello'));What does this bug mean?
https://bugzilla.mozilla.org/show_bug.cgi?id=1502044
It means the browser totally crashed (closed). That doesn't seem relevant to this bug.
Comment 20•7 years ago
|
||
I get the same issue.
System notification shows up on 67.0b10 but not on Nightly.
I'm using the following STR (steps to reproduce):
- Start Firefox Nightly on Windows 10.
- Visit about:config?filter=alerts.useSystemBackend
- Flip the preference to true.
- Visit https://example.com and run the following code from the devtools:
Notification.requestPermission().then(() => new Notification('hello'));- A permission doorhanger appears. Approve the permission.
In step 4, entered the code from web console.
Then I get the following error, so unable to go any further.
Am I doing something wrong?
The Notification permission may only be requested from inside a short running user-generated event handler.
My Nightly settings:
about:config
alerts.useSystemBackend true
Build ID
20190414214746
User agent
Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:68.0) Gecko/20100101 Firefox/68.0
Comment 21•7 years ago
|
||
To request the notification permission, you need to be inside a user gesture. This is an upcoming change in Firefox 68 - see https://blog.nightly.mozilla.org/2019/04/01/reducing-notification-permission-prompt-spam-in-firefox/
So change step 4 to:
Run the following code:
window.onclick = () => Notification.requestPermission().then(() => new Notification('hello'));
and click inside the page.
Comment 22•7 years ago
|
||
Doorhanger appeared.
But notification message does not appear.
No error message in web console nor browser console.
Comment 23•7 years ago
|
||
If I set alerts.useSystemBackend to false, notification appeared.
| Reporter | ||
Comment 24•7 years ago
|
||
Update on this bug:
The Toast notifications now display on Nightly!
Don't know what fixed this issue.
I had a problem (bug) with Nightly, so i needed to reinstall it several times.
But Nightly did not start because of the bug (nightly would not start).
So i used normal Firefox for a few days.
Using Nightly again after some days, i did noticed, that the Toast notifications now working!
Maybe it has something to do with this bug?
| Assignee | ||
Updated•4 years ago
|
Comment 26•4 years ago
|
||
I see 'hello' notification at the right bottom corner.
Version: 100.0a1
Build ID: 20220322065927
User Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:100.0) Gecko/20100101 Firefox/100.0
OS: Windows_NT 10.0 19043
| Assignee | ||
Comment 27•4 years ago
|
||
Thanks Kazz. Looks like this issue was resolved incidentally at some point.
Updated•3 years ago
|
Description
•