Web notifications with images not displaying for Windows 8(.1)
Categories
(Toolkit Graveyard :: Notifications and Alerts, defect, P1)
Tracking
(relnote-firefox 112+, firefox-esr102 unaffected, firefox111 wontfix, firefox112+ verified, firefox113+ verified)
People
(Reporter: kanapa1, Assigned: nrishel)
References
(Regression)
Details
(Keywords: regression, Whiteboard: [fidedi])
Attachments
(7 files)
2.26 KB,
text/plain
|
Details | |
54.54 KB,
image/png
|
Details | |
48 bytes,
text/x-phabricator-request
|
diannaS
:
approval-mozilla-release+
|
Details | Review |
48 bytes,
text/x-phabricator-request
|
diannaS
:
approval-mozilla-release+
|
Details | Review |
48 bytes,
text/x-phabricator-request
|
diannaS
:
approval-mozilla-release+
|
Details | Review |
4.01 MB,
image/gif
|
Details | |
81.47 KB,
image/png
|
Details |
Steps to reproduce:
- Launch Firefox (at least version 111.0 stable).
- Go to this webpage: https://www.bennish.net/web-notifications.html to test the functionality of the new native Windows notifications that were introduced in Firefox 111.0.
- Press the "Authorize" button in the body of the page and then allow the website to send notifications by pressing "Allow" in the Firefox notification permission doorhanger.
- Press the "Show" (or "Show in 5s") button in the body of the page.
- See what is described in the "Actual results" section.
Actual results:
Even though the notification permission has been granted correctly (as confirmed by the text "Permission to display: granted" displayed in that mini-console in the body of the page), no notification is displayed on the screen and no notification sound is played either (native Windows 8.1 notifications have a distinctive sound effect). Since Firefox 111.0, web notifications on Windows 8.1 are simply no longer usable at all.
Expected results:
Some form of notifications should be shown, at least the old non-native one. However, ideally, since Windows 8.1 has built-in support for notifications, and native notifications have been enabled by default in Firefox 111.0 for all users, they should also work on Windows 8.1.
Additional context:
I'm pretty sure the problem is with Firefox and not with my Windows 8.1 installation because, for example, the native Windows 8.1 notifications in Telegram Desktop work correctly for me (I can send a screenshot if needed). Also, the Firefox profile used doesn't matter, I'm able to reproduce this issue every single time.
Thanks to Mozregression, I was able to find the regressor, bug 1497425 (the relevant pushlog from Mozregression).
Comment 1•2 years ago
|
||
[Tracking Requested - why for this release]:
Important functionality regressed.
Greg: Do you have any other details? Are there errors in the browser console (ctrl-shift-j, not the standard devtools console) ?
Updated•2 years ago
|
Here are all the multiprocess browser console logs from a clean Firefox profile after accessing the aforementioned website:
Loading failed for the <script> with source “https://www.bennish.net/js/awstats_misc_tracker.js”. web-notifications.html:188:1
While creating services from category 'app-startup', service for entry 'ExtensionsChild', contract ID '@mozilla.org/extensions/child;1' does not implement nsIObserver.
Some cookies are misusing the recommended “SameSite“ attribute 3
Cookie “_ga” does not have a proper “SameSite” attribute value. Soon, cookies without the “SameSite” attribute or with an invalid value will be treated as “Lax”. This means that the cookie will no longer be sent in third-party contexts. If your application depends on this cookie being available in such contexts, please add the “SameSite=None“ attribute to it. To know more about the “SameSite“ attribute, read https://developer.mozilla.org/docs/Web/HTTP/Headers/Set-Cookie/SameSite analytics.js:25:486
Cookie “_gid” does not have a proper “SameSite” attribute value. Soon, cookies without the “SameSite” attribute or with an invalid value will be treated as “Lax”. This means that the cookie will no longer be sent in third-party contexts. If your application depends on this cookie being available in such contexts, please add the “SameSite=None“ attribute to it. To know more about the “SameSite“ attribute, read https://developer.mozilla.org/docs/Web/HTTP/Headers/Set-Cookie/SameSite analytics.js:25:486
Cookie “_gat_gtag_UA_48376594_4” does not have a proper “SameSite” attribute value. Soon, cookies without the “SameSite” attribute or with an invalid value will be treated as “Lax”. This means that the cookie will no longer be sent in third-party contexts. If your application depends on this cookie being available in such contexts, please add the “SameSite=None“ attribute to it. To know more about the “SameSite“ attribute, read https://developer.mozilla.org/docs/Web/HTTP/Headers/Set-Cookie/SameSite analytics.js:25:486
Created a new notification ... web-notifications.html:147:25
Notification { onclick: onclick(), onshow: onshow(), onerror: onerror(), onclose: onclose(), title: "Notification #1", dir: "auto", lang: "", body: "This is the text body of the notification. \nPretty cool, huh?", tag: "1", icon: "images/Sexy_Ben.jpeg" }
web-notifications.html:148:25
I don't see anything related to the Notifications API here besides the entries logged by the website itself (for debugging purposes?). Perhaps I'm doing something wrong, if so, please let me know.
Comment 3•2 years ago
|
||
(In reply to Greg-21 from comment #2)
Here are all the multiprocess browser console logs from a clean Firefox profile after accessing the aforementioned website:
Loading failed for the <script> with source “https://www.bennish.net/js/awstats_misc_tracker.js”. web-notifications.html:188:1 While creating services from category 'app-startup', service for entry 'ExtensionsChild', contract ID '@mozilla.org/extensions/child;1' does not implement nsIObserver. Some cookies are misusing the recommended “SameSite“ attribute 3 Cookie “_ga” does not have a proper “SameSite” attribute value. Soon, cookies without the “SameSite” attribute or with an invalid value will be treated as “Lax”. This means that the cookie will no longer be sent in third-party contexts. If your application depends on this cookie being available in such contexts, please add the “SameSite=None“ attribute to it. To know more about the “SameSite“ attribute, read https://developer.mozilla.org/docs/Web/HTTP/Headers/Set-Cookie/SameSite analytics.js:25:486 Cookie “_gid” does not have a proper “SameSite” attribute value. Soon, cookies without the “SameSite” attribute or with an invalid value will be treated as “Lax”. This means that the cookie will no longer be sent in third-party contexts. If your application depends on this cookie being available in such contexts, please add the “SameSite=None“ attribute to it. To know more about the “SameSite“ attribute, read https://developer.mozilla.org/docs/Web/HTTP/Headers/Set-Cookie/SameSite analytics.js:25:486 Cookie “_gat_gtag_UA_48376594_4” does not have a proper “SameSite” attribute value. Soon, cookies without the “SameSite” attribute or with an invalid value will be treated as “Lax”. This means that the cookie will no longer be sent in third-party contexts. If your application depends on this cookie being available in such contexts, please add the “SameSite=None“ attribute to it. To know more about the “SameSite“ attribute, read https://developer.mozilla.org/docs/Web/HTTP/Headers/Set-Cookie/SameSite analytics.js:25:486 Created a new notification ... web-notifications.html:147:25 Notification { onclick: onclick(), onshow: onshow(), onerror: onerror(), onclose: onclose(), title: "Notification #1", dir: "auto", lang: "", body: "This is the text body of the notification. \nPretty cool, huh?", tag: "1", icon: "images/Sexy_Ben.jpeg" } web-notifications.html:148:25
I don't see anything related to the Notifications API here besides the entries logged by the website itself (for debugging purposes?).
I agree.
Perhaps I'm doing something wrong, if so, please let me know.
I think you're doing everything right, but something is clearly broken despite there not being errors in the browser console. :nrishel, are you able to take a look / suggest further triage steps?
Comment 4•2 years ago
|
||
We've probably missed a trick somewhere and the Windows 10 functionality is kicking in (and failing) on Windows <10.
Greg-21: could you run with MOZ_LOG=WindowsAlertsService:5
in your environment, as described in https://firefox-source-docs.mozilla.org/xpcom/logging.html? You could also look in the Windows Event Log and tell us what the debug logging says; see Bug 1822842 for what that means and https://www.howtogeek.com/123646/htg-explains-what-the-windows-event-viewer-is-and-how-you-can-use-it/ for some instructions on how to view that log.
Thanks!
I set the environment variables MOZ_LOG=WindowsAlertsService:5,timestamp,sync
and MOZ_LOG_FILE=%USERPROFILE%\Desktop\log.txt
(I couldn't get the logs to be written to disk without the sync
special module), and then followed my own steps to reproduce from the bug description. However, this time I triggered the notification 3 times (instead of 1) in hopes of getting better logs. I'm attaching the only log file that is not empty.
I also checked the Windows Event Viewer, but couldn't find any errors or warnings even loosely related to Firefox or notifications.
If you need any more information to better understand the issue, please let me know.
Comment 6•2 years ago
|
||
The bug has a release status flag that shows some version of Firefox is affected, thus it will be considered confirmed.
Comment 7•2 years ago
|
||
The bug is marked as tracked for firefox111 (release). However, the bug still isn't assigned.
:tspurway, could you please find an assignee for this tracked bug? Given that it is a regression and we know the cause, we could also simply backout the regressor. If you disagree with the tracking decision, please talk with the release managers.
For more information, please visit auto_nag documentation.
Assignee | ||
Comment 8•2 years ago
|
||
Will look at this first thing Monday. If it's a trivial fix we can implement that, otherwise we should probably gate native notifications to Win10+ by default.
Comment 10•2 years ago
|
||
:nrishel could you triage this to add a priority/severity?
Assignee | ||
Comment 11•2 years ago
|
||
What is happening here is that the fallback to XUL notifications is not occurring because adding an image to the notification causes an async image load, which delays notification creation/send errors until after the decision point for falling back to XUL. If e.g. you launch a notification from https://bgrins.github.io/devtools-demos/misc/notifications.html, the the fallback mechanism gets set and sites like https://www.bennish.net/web-notifications.html start working (with XUL notifications) again.
I'll discuss this with my team tomorrow and try to have a decision/patch up in the next couple days.
Assignee | ||
Updated•2 years ago
|
Assignee | ||
Updated•2 years ago
|
Assignee | ||
Updated•2 years ago
|
Reporter | ||
Comment 12•2 years ago
|
||
Do I understand correctly that the way Mozilla is taking here is to restrict the new native notifications to Windows 10+ only? Because I don't really know what to expect, and I've seen screenshots of working native notifications on Windows 8/8.1, but that was a while back, and plans may have changed.
Comment 13•2 years ago
|
||
(In reply to Greg-21 from comment #12)
Do I understand correctly that the way Mozilla is taking here is to restrict the new native notifications to Windows 10+ only? Because I don't really know what to expect, and I've seen screenshots of working native notifications on Windows 8/8.1, but that was a while back, and plans may have changed.
We don't know yet. I'll leave myself an NI to update when we know more.
Assignee | ||
Comment 15•2 years ago
|
||
We can get native notifications with text working again fairly easily. Unfortunately to the best of my research and testing notifications with images won't show the image for non-UWP applications on Windows 8 - including in older versions of Firefox. This regresses features which worked in the old XUL-style notifications.
We'll probably fix text-only notifications for people who want to explicitly enable this feature, but turn native notifications off by default for Windows 8.
Comment 16•2 years ago
|
||
:nrishel in terms of timing for the next steps on Comment 15.
Since this is P1/S2, do we expect a patch for uplift to 112, or even for a possible 111 dot release?
Reporter | ||
Comment 17•2 years ago
|
||
If it helps, I've attached a screenshot showing a native Windows 8.1 notification from Telegram Desktop, which is a regular Qt5-based program and is one of the few programs I use that offer push notifications.
From what I can see in the screenshot, the layout of the native Windows 8.1 notifications is similar to the non-native ones in Firefox. It features a headline, some detailed text with support for special Unicode characters such as emojis, a logo of the program from which the notification comes, and, most importantly, an image. In Telegram Desktop, it is rounded and forms a circle, but this is just a design choice (since profile pictures in Telegram are also circular), and it could just be a square image if they wanted to.
Assignee | ||
Comment 18•2 years ago
|
||
IToastNotification2
is not available in Windows 8, so querying it caused the toast to fail. When the content was only text, the toast would immediately fail triggering a fallback to XUL style alerts. When it contained an image, the async image load caused the toast to fail after the fallback branch had been decided.
Note: This does not fix the issue that notifications with images do not include the image. Online discussion and testing suggest images are not supported for Win32 desktop apps on Windows 8, but no definitive documentation was found. Similar projects such as Chromium don't appear to support Windows 8 Toast notifications.
Assignee | ||
Comment 19•2 years ago
|
||
Depends on D173496
Updated•2 years ago
|
Assignee | ||
Comment 20•2 years ago
|
||
:Greg-21 thanks for the information! I didn't see anything significantly different in Telegram's source code but knowing that there is that it can work for desktop applications is helpful.
:dmeehan We will want to uplift to the earliest beta upon landing changes, maybe tag along on a point release if we can make one but I don't think it's critical enough to warrant it by itself.
Updated•2 years ago
|
Assignee | ||
Updated•2 years ago
|
Assignee | ||
Comment 21•2 years ago
|
||
Use PNGs instead of BMPs for Windows toast notification images.
BMPs were isolated as the cause of Windows toasts failing to display images when provided in the src
attribute of the <image>
tag for Windows 8. The same was not observed for PNGs.
This issue only affects Windows 8(.1).
Depends on D173496
Updated•2 years ago
|
Updated•2 years ago
|
Comment 22•2 years ago
|
||
We don't have another dot release planned for 111, so marking as a wontfix for 111.
Updated•2 years ago
|
Assignee | ||
Updated•2 years ago
|
Updated•2 years ago
|
Updated•2 years ago
|
Comment 23•2 years ago
|
||
Comment 24•2 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/10cf3b915cd9
https://hg.mozilla.org/mozilla-central/rev/a68af2e5fe5b
https://hg.mozilla.org/mozilla-central/rev/a5c34268bcac
Updated•2 years ago
|
Comment 25•2 years ago
|
||
The patch landed in nightly and beta is affected.
:nrishel, is this bug important enough to require an uplift?
- If yes, please nominate the patch for beta approval.
- If no, please set
status-firefox112
towontfix
.
For more information, please visit auto_nag documentation.
Comment 26•2 years ago
|
||
Is this something we can pref off native notifications rather than uplift this? Seems a bit risky for RC
Assignee | ||
Comment 27•2 years ago
|
||
If we could pref off only for Windows 8 it would be fine; I would have strong reservations for prefing off native notifications for all versions of Windows due to it's high visibility and iiuc accessibility benefits. FWIW I don't think this change set is particularly risky as it's just gating off APIs not available in older Windows versions and swapping out a bmp writer for png.
Comment 28•2 years ago
|
||
(In reply to Nick Rishel [:nrishel] from comment #27)
If we could pref off only for Windows 8 it would be fine; I would have strong reservations for prefing off native notifications for all versions of Windows due to it's high visibility and iiuc accessibility benefits. FWIW I don't think this change set is particularly risky as it's just gating off APIs not available in older Windows versions and swapping out a bmp writer for png.
I concur on both points:
- this has been the only substantive issue found with native notifications on release; if we change release behaviour by preffing this off I expect we'd have more feedback about the change on Windows 10+ than issues on Windows <10;
- this particular change is certainly not lowest risk but I don't think it's much more than low risk: it's isolated and can be easily verified by QA in Nightly before it hits RC.
Given the small size of the Windows 8/8.1 population, we could also just leave this for a release.
Assignee | ||
Comment 29•2 years ago
|
||
Comment on attachment 9324810 [details]
Bug 1822817 - Part 1: Fix Windows 8 native notifications failing. r=nalexander
Beta/Release Uplift Approval Request
- User impact if declined: Native notifications won't work for Windows 8, and notifications with images will silently fail if XUL fallback has not previously been triggered by a image-less notification.
- Is this code covered by automated tests?: Yes
- Has the fix been verified in Nightly?: Yes
- Needs manual test from QE?: Yes
- If yes, steps to reproduce: In Windows 8 navigate to https://www.bennish.net/web-notifications.html, verify that native notification shows after authorizing and clicking show.
- List of other uplifts needed: None
- Risk to taking this patch: Low
- Why is the change risky/not risky? (and alternatives if risky): Only changes are gating APIs not available in Windows 8 and changing from writing bmp images to png.
- String changes made/needed:
- Is Android affected?: No
Assignee | ||
Updated•2 years ago
|
Updated•2 years ago
|
Comment 30•2 years ago
|
||
Hey Nick, I was able to reproduce the issue with Firefox 111.0 on Windows 8.1 by following the STR from Comment 0, but it seems that the notification is still not appearing on Firefox 113.0a1 (2023-04-04 and 05 from treeherder). Any idea?
Comment 31•2 years ago
|
||
Comment on attachment 9324810 [details]
Bug 1822817 - Part 1: Fix Windows 8 native notifications failing. r=nalexander
Approved for 112.0rc2
Comment 32•2 years ago
|
||
Comment on attachment 9324810 [details]
Bug 1822817 - Part 1: Fix Windows 8 native notifications failing. r=nalexander
Moving flags to release since we are in RC week
Updated•2 years ago
|
Updated•2 years ago
|
Assignee | ||
Comment 33•2 years ago
|
||
(In reply to Catalin Sasca, QA [:csasca] from comment #30)
Hey Nick, I was able to reproduce the issue with Firefox 111.0 on Windows 8.1 by following the STR from Comment 0, but it seems that the notification is still not appearing on Firefox 113.0a1 (2023-04-04 and 05 from treeherder). Any idea?
I just tested the STR in an updated Windows 8.1 VM for the current m.org Firefox 113.0a1 and was unable to reproduce the issue. I have noticed that sometimes notifications don't appear for a short window after Firefox is opened which would be a separate issue not specific to Windows 8.1, is this maybe what you were seeing?
Comment 34•2 years ago
|
||
Hey Nick, I'll attach a screencast with the behavior on my sistem (native, clean environment of Win 8.1 fully updated). The notification doesn't appear at all on the latest Firefox 113.0a1.
Reporter | ||
Comment 35•2 years ago
|
||
I would like to add my 2 cents if you don't mind.
Yesterday I tested Firefox Nightly 113.0 (build dated 2023-04-05) on my physical machine from which I reported this bug, and I was unable to get any notifications to appear on the screen. So I booted up a virtual machine with a completely clean Windows 8.1 Update 1 OS without any updates from Windows Update yet, and decided to test the notifications in Firefox Nightly 113.0 (build dated 2023-04-05 as well) there. To my surprise, they worked without any problems in both 64-bit and 32-bit Firefox Nightly.
Today I reinstalled Firefox Nightly (build dated 2023-04-05 as well) on my physical machine, and it turns out that... now notifications work here too. I don't know what's going on.
But there is one thing in common, single builds from Mozregression do not work either locally or in a virtual machine.
Comment 36•2 years ago
|
||
Comment on attachment 9324810 [details]
Bug 1822817 - Part 1: Fix Windows 8 native notifications failing. r=nalexander
Decided not to take this in RC and continue the investigation
Updated•2 years ago
|
Updated•2 years ago
|
Assignee | ||
Comment 37•2 years ago
|
||
:csasca Just a check, were you testing in builds without running the installer? If yes could you double check if the same behavior occurs when running from an installed exe?
:Greg-21 Same-ish question above, is there any correlation with things not working and installed vs non-installed runs?
Comment 38•2 years ago
|
||
I was testing with zip ones. Just tried with an installation of latest 113.0a1 (2023-04-06) and it seems this way the notifications will work. The issue seems to be on the zip packages.
Reporter | ||
Comment 39•2 years ago
|
||
:nrishel, I've just checked a few more configurations using the current Firefox Nightly 113.0 dated 2023-04-06, and your theory with Firefox distribution methods that are not .exe/.msi installers being the culprit here may be true.
This may also explain why I've never been able to get any notifications to appear on the screen when using builds from Mozregression (which are distributed in ZIP archives, aren't they?).
That being said, should I file another bug specifically for this new discovery? Because, in my humble opinion, this newly discovered edge case is not something that should block the uplift, as currently in the latest stable Firefox 111.0.1 (and possibly soon in 112.0) a large part of notifications do not work at all anyway.
Assignee | ||
Comment 40•2 years ago
•
|
||
:Greg-21 Agreed that portable Win8 notification issues should be a new bug; CC me when you create a new one.
Closing this as the remaining issues relate to the aforementioned separate bug.
Comment 41•2 years ago
|
||
Re-verified on a installed Firefox 113.0a1 (2023-04-09) and the notifications work as expected on Win 8.1. Closing this as verified based on the previous comments.
Reporter | ||
Comment 42•2 years ago
|
||
Is there any chance of uplifting this to 112.0/dot release since it turned out that the patch works as expected and fixes a fairly serious regression, in my opinion?
Comment 43•2 years ago
|
||
It is still currently being tracked for 112, which means yes, there is still a chance of uplift for a dot release. If there are circumstances in which it cannot/shouldn't be uplifted, the 112 status flag will change to wontfix.
Comment 44•2 years ago
|
||
Comment on attachment 9324810 [details]
Bug 1822817 - Part 1: Fix Windows 8 native notifications failing. r=nalexander
Approved for 112.0.2 dot release
Updated•2 years ago
|
Updated•2 years ago
|
Comment 45•2 years ago
|
||
bugherder uplift |
Updated•2 years ago
|
Comment 46•2 years ago
|
||
Verified that the issue is fixed and notifications work as expected on Firefox 112.0.2 under Windows 8.1.
Updated•2 years ago
|
Description
•