Remove the scheduled task for Background Update in the uninstaller without using the WDBA
Categories
(Toolkit :: Application Update, task, P3)
Tracking
()
People
(Reporter: bytesized, Assigned: nshukla)
References
(Blocks 2 open bugs)
Details
(Whiteboard: [fidedi-ope])
Attachments
(2 files, 1 obsolete file)
I am currently in the process of implementing the removal of scheduled Background Update tasks. Because we have a deadline coming up, I am implementing this in a way that I can do quickly, leveraging existing, similar code in the WDBA.
However, it is likely that we will want to change this in the future. We might, for example, stop shipping the WDBA. I think, therefore, that we should consider changing this mechanism at a later time. I think it is quite likely that we will want to follow path number 3 or 4, suggested by :agashlin in Bug 1698593. I will reproduce these below:
- Write an NSIS plugin just for cleaning up scheduled tasks, similar to BitsUtils for removing BITS jobs.
- Write the whole task cleanup in NSIS. There is sample code, our usage would be even more involved as it would need to enumerate the tasks in the folder.
Reporter | ||
Updated•3 years ago
|
Reporter | ||
Updated•3 years ago
|
Updated•3 years ago
|
Reporter | ||
Comment 1•1 year ago
|
||
I just had to look into how this worked because I forgot that we remove scheduled tasks via the WDBA. I suspect that this means that, when elevation is needed to uninstall Firefox, the WDBA probably also gets run elevated. This actually probably works out well for us because I suspect that otherwise we wouldn't be able to remove tasks added by other users.
But just in case anyone is ever thinking about fixing this bug by adding the removal code to BackgroundTask_uninstall.sys.mjs
, keep in mind that the Launcher de-escalates permissions by default, which will likely prevent us from being able to remove tasks added by other users.
Updated•10 months ago
|
Assignee | ||
Comment 2•9 months ago
|
||
Updated•9 months ago
|
Comment 3•9 months ago
•
|
||
(In reply to Robin Steuber (they/them) [:bytesized] from comment #1)
But just in case anyone is ever thinking about fixing this bug by adding the removal code to
BackgroundTask_uninstall.sys.mjs
, keep in mind that the Launcher de-escalates permissions by default, which will likely prevent us from being able to remove tasks added by other users.
Would we expect this to be a problem for FirstStartup
too?
Reporter | ||
Comment 4•9 months ago
|
||
(In reply to Nick Rishel [:nrishel] from comment #3)
Would we expect this to be a problem for
FirstStartup
too?
I didn't know that this existed. I have kind of a lot of thoughts about it. The whole "First Startup" thing isn't even guaranteed to run. The flag that causes the "First Startup" behavior is added by the installer. So if you run the full installer and uncheck the box to start Firefox when the installer exits, it never runs at all. So if this is important, we probably shouldn't be doing it there in the first place.
Another thing to consider here is that our whole multi-user Background Update Task situation is currently kinda screwed up (Bug 1830071).
I'm also not fully sure why we are doing this at all. This only happens when we run Firefox. And when we run Firefox, we are also going to run maybeScheduleBackgroundUpdateTask()
, which updates the task if its definition is out-of-date.
Assignee | ||
Comment 5•8 months ago
|
||
Updated•8 months ago
|
Assignee | ||
Comment 6•7 months ago
|
||
Depends on D184143
Comment 7•7 months ago
|
||
The following patch is waiting for review from a reviewer who resigned from the review:
ID | Title | Author | Reviewer Status |
---|---|---|---|
D186186 | Bug 1710143 - Uninstall Firefox scheduled tasks without WDBA Try build r=nrishel | nshukla | nrishel: Resigned from review |
:nshukla, could you please find another reviewer?
For more information, please visit BugBot documentation.
Updated•7 months ago
|
Description
•