Windows notification is shown after invoking the background task 3 times and Firefox is uninstalled
Categories
(Toolkit Graveyard :: Notifications and Alerts, defect)
Tracking
(firefox-esr91 unaffected, firefox-esr102 unaffected, firefox104 unaffected, firefox105 unaffected, firefox106 verified)
Tracking | Status | |
---|---|---|
firefox-esr91 | --- | unaffected |
firefox-esr102 | --- | unaffected |
firefox104 | --- | unaffected |
firefox105 | --- | unaffected |
firefox106 | --- | verified |
People
(Reporter: Gabi, Assigned: nrishel)
References
(Blocks 2 open bugs, Regression)
Details
(Keywords: regression, Whiteboard: [fidedi-notifications])
Attachments
(3 files)
Note
- Have the messaging-system.rsexperimentloader.collection_id pref set to nimbus-preview
- Have nimbus.debug set to true
- Background update task is present in Task scheduler
Affected versions
- Nightly 106.0a1
Affected platforms
- Windows 10 x64
- Windows 11 x64
Steps to reproduce
- Install a older version of Nightly 106
- Launch Nightly with the default elevated profile
- Run the Background Update task inside the Task Scheduler
- Windows native notification is shown
- Invoke the task 3 times and click remind me later button on the notifications
- Uninstall Nightly
- Check that the background update task is deleted from the Task Scheduler
- Check if any other notifications are displayed
Expected result
- Windows native notification is not displayed after invoking the background task 3 times and uninstalling Firefox
Actual result
-
Windows native notification is shown after invoking the background task and Firefox is uninstalled
-
FirefoxToast- followed by the background task number is shown on the notification
-
See the attached screenshot
Regression range
- New feature
Additional notes
- Issue is not 100% reproducible
- Issue was reproduced also after invoking the background task one time and uninstalling Firefox, usually the notifications are shown after ~5 minutes
Comment 1•2 years ago
|
||
Gabi -- excellent catch! I always appreciate QA doing such good work.
I'm surprised this isn't 100% reproducible, 'cuz to me it should be. We:
- create a notification
- snooze it
- uninstall Firefox (and nothing here cleans up old notifications)
- Windows brings it back some time in the future
Now, what is to be done? Clearly we need to remove any notifications created by this Firefox at uninstall time. We can enumerate notifications with Firefox's notificiation AUMID fairly easily. The important question that I see is whether we should do that in default-browser-agent.exe
(potentially duplicating some code) or do it in firefox.exe --backgroundtask <some cleanup name>
(risking some locking issues if Firefox doesn't exit cleanly, etc).
I'm going to mark this as a regression from Bug 1781929, even though it's not really specific to that ticket: it's really part of the general program to start using native notifications on Windows in Firefox.
nrishel: can you take this ticket? We'd look to address this in the Nightly 106 cycle, so landing before September 15.
Updated•2 years ago
|
Updated•2 years ago
|
Comment 2•2 years ago
|
||
Set release status flags based on info from the regressing bug 1781929
Assignee | ||
Comment 3•2 years ago
|
||
Ah! Yep, this would be a problem.
Given the suggested fixes, I'm assuming we already invoke wdba on uninstall, but we don't do the same for Firefox? What's the general concern on Firefox not exiting cleanly?
Assignee | ||
Updated•2 years ago
|
Comment 4•2 years ago
|
||
(In reply to Nick Rishel [:nrishel] from comment #3)
Ah! Yep, this would be a problem.
Given the suggested fixes, I'm assuming we already invoke wdba on uninstall,
Correct: see default-browser-agent.exe uninstall
.
but we don't do the same for Firefox? What's the general concern on Firefox not exiting cleanly?
Also correct. My concern is vague: if Firefox is in a truly bad state, then it could be that it gets wedged, etc, and blocks the uninstallation process from succeeding. (Just as if Firefox was still running.) I'm not sure if that's worth worrying about.
It would certainly be easiest to just add some "clean up all notifications with the AUMID you generate" call to nsIWindowsAlertsService.idl
and then invoke it from a new task.
Assignee | ||
Comment 5•2 years ago
|
||
Non-MSIX notifications are not removed when Firefox is uninstalled. To handled this we've added a new Uninstall background task and extended nsIWindowsAlertService to deregister notifications on uninstall.
Updated•2 years ago
|
Assignee | ||
Comment 6•2 years ago
|
||
Pushed by nrishel@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/6fcec3502cb2 Pre: Comment cleanup. r=nalexander https://hg.mozilla.org/integration/autoland/rev/4cec525d92f4 Remove scheduled and Action Center notifications during uninstall. r=nalexander
Comment 8•2 years ago
•
|
||
Backed out for causing bc failures regarding unreferenced file on BackgroundTask_uninstall.jsm.
Comment 9•2 years ago
|
||
(In reply to Iulian Moraru from comment #8)
Backed out for causing bc failures regarding unreferenced file on BackgroundTask_uninstall.jsm.
Gah, I forgot about this. In the relevant test, all toolkit/
-level BackgroundTask_*.jsm
task files are ignored. We need to do that for app (browser/
)-level task files as well, like:
gExceptionPaths.push("resource://app/modules/backgroundtasks/");
Comment 10•2 years ago
|
||
Pushed by nrishel@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/d851e34b7e5c Pre: Comment cleanup. r=nalexander https://hg.mozilla.org/integration/autoland/rev/1d6c2d531eb4 Remove scheduled and Action Center notifications during uninstall. r=nalexander
Comment 11•2 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/d851e34b7e5c
https://hg.mozilla.org/mozilla-central/rev/1d6c2d531eb4
Assignee | ||
Updated•2 years ago
|
Updated•2 years ago
|
Reporter | ||
Comment 12•2 years ago
|
||
Issues is verified as fixed in Firefox 106.0b4 with Windows 10x64 and Windows 111x64.
Reporter | ||
Updated•2 years ago
|
Updated•9 months ago
|
Description
•