The specific icon has a black background and the "A3710B8EBB50CD3" string is wrongly displayed on the web notification when using zip package instead of installer stub
Categories
(Toolkit Graveyard :: Notifications and Alerts, defect, P3)
Tracking
(firefox-esr91 disabled, firefox-esr102 disabled, firefox62 unaffected, firefox63 unaffected, firefox64 disabled, firefox65 disabled, firefox66 disabled, firefox103 disabled, firefox104 disabled, firefox105 fixed, firefox116 verified)
People
(Reporter: cmuntean, Assigned: nrishel)
References
Details
(Keywords: regression, Whiteboard: [fidedi-notifications] )
Attachments
(2 files, 2 obsolete files)
| Reporter | ||
Comment 1•7 years ago
|
||
Comment 2•7 years ago
|
||
Updated•7 years ago
|
Comment 3•7 years ago
|
||
Comment 4•7 years ago
|
||
| Reporter | ||
Comment 5•7 years ago
|
||
Comment 6•7 years ago
|
||
Updated•7 years ago
|
Updated•7 years ago
|
Comment 7•7 years ago
|
||
Comment 9•7 years ago
|
||
Comment 10•7 years ago
|
||
Comment 11•6 years ago
|
||
Updated•6 years ago
|
Comment 12•3 years ago
|
||
There is a lot going on here; let me capture some notes while I investigate.
First, Windows native notifications require an AUMID. At one time, that AUMID could be arbitrary, but per this SO answer as of the Fall Creators Update of roughly October 2017, the AUMID needs to be "real". The Windows native notification functionality was first added to Firefox in March 2018, so this restriction has always been in place.
Second, what "real" means, exactly, we need to get to the bottom of. Not only does the AUMID need to be registered in the registry, but I believe a shortcut (.lnk) needs to be present in one of the well-known Windows locations (see this classifying code), but it may be that only some of the locations are accepted by Windows. This explains why the existing check to see that an AUMID is known is not sufficient: Firefox will happily generate an AUMID that is not present in the registry and has no corresponding shortcut.
Together, I think this means that packaged installations (those not installed by the installer) will not work at this time. We may have latitude to create shortcuts in order to make this work, but that itself is fraught -- see Bug 1672957 for the type of problems that can arise creating shortcuts.
My preference is to not create shortcuts but instead to
- disable the native notification backend when we're going to get a visible AUMID/no icon/etc, and
- to message to the user when this is the case.
Messaging could mean new about:preferences UI, or a browser console message, or popping an additional XUL notification about the fallback in this case. This is consonant with our taskbar pinning code, which doesn't try to create new shortcuts. I will note that we do have code to create shortcuts that is currently unused, so with a little work we could arrange for a shortcut to be created. But I think I'd rather message the user to pin Firefox to the taskbar in order for native notifications to work than try to keep these fiddly global shortcuts fresh.
Comment 13•3 years ago
|
||
(In reply to Nick Alexander :nalexander [he/him] from comment #12)
There is a lot going on here; let me capture some notes while I investigate.
First, Windows native notifications require an AUMID. At one time, that AUMID could be arbitrary, but per this SO answer as of the Fall Creators Update of roughly October 2017, the AUMID needs to be "real". The Windows native notification functionality was first added to Firefox in March 2018, so this restriction has always been in place.
Second, what "real" means, exactly, we need to get to the bottom of. Not only does the AUMID need to be registered in the registry, but I believe a shortcut (
.lnk) needs to be present in one of the well-known Windows locations (see this classifying code), but it may be that only some of the locations are accepted by Windows. This explains why the existing check to see that an AUMID is known is not sufficient: Firefox will happily generate an AUMID that is not present in the registry and has no corresponding shortcut.
This also explains why running post-update, which can write AUMIDs to the registry, isn't sufficient for native notifications to display correctly.
Together, I think this means that packaged installations (those not installed by the installer) will not work at this time. We may have latitude to create shortcuts in order to make this work, but that itself is fraught -- see Bug 1672957 for the type of problems that can arise creating shortcuts.
My preference is to not create shortcuts but instead to
- disable the native notification backend when we're going to get a visible AUMID/no icon/etc, and
I'll note that this is equivalent to Makoto-san's suggestion to check the shortcut log, although I would prefer to re-use or modify the enumeration code agashlin added for taskbar pinning.
Comment 14•3 years ago
•
|
||
My instinct was that we need not prioritize packaged installations (as opposed to installed-by-the-installer installations), but in fact the data seems to show about 15-25% of our Windows users are not running from an installation that ran our installer: see this query (MoCo-only). This means we should accommodate packaged builds explicitly.
| Assignee | ||
Comment 15•3 years ago
•
|
||
Some observations:
The garbage string is the aumid, which for zip builds is the install path hash.
Installed msix builds (including those in the Microsoft Store) have the same issue, albeit the string is a different form: Mozilla.Firefox[Windows app hash]![Install or Profile hash?].
We're using the aumid for the notification id, but afaict providing a non aumid string to https://searchfox.org/mozilla-central/source/widget/windows/ToastNotificationHandler.cpp#404 doesn't seem to cause any problem. I'm guessing we should instead provide a branding string here.
| Assignee | ||
Comment 16•3 years ago
|
||
Depends on D142357
Updated•3 years ago
|
| Assignee | ||
Comment 17•3 years ago
|
||
This switch fixes cases where aumid is not a friendly name, e.g. when Firefox is run from a zip and the aumid is the install hash.
Depends on D142358
Updated•3 years ago
|
| Assignee | ||
Updated•3 years ago
|
Updated•3 years ago
|
Updated•3 years ago
|
| Assignee | ||
Comment 18•3 years ago
|
||
Resolved by https://phabricator.services.mozilla.com/D151739.
Updated•3 years ago
|
| Reporter | ||
Comment 19•2 years ago
|
||
I'm cleaning up the old issues.
I have re-verified this issue with the latest Nightly 116.0a1 zip build (Build ID: 20230703204942) on Windows 10 x64 and Windows 11 x64.
- The icon for the "Copy Screenshot" notification is correctly displayed and the string code is no longer displayed.
Considering this I will mark this issue as verified - fixed.
Updated•2 years ago
|
Description
•