Closed
Bug 572322
Opened 14 years ago
Closed 13 years ago
[ACR] Compatibility Prefs require restart after changing (ACR installation)
Categories
(addons.mozilla.org Graveyard :: Compatibility Tools, defect, P2)
Tracking
(Not tracked)
RESOLVED
FIXED
ACR-1.0
People
(Reporter: kinger, Assigned: mackers)
References
Details
Steps:
I installed the Add-ons Compatibility Reporter in TB 3.1. Version to install is not public yet, you can get it at:
https://bugzilla.mozilla.org/show_bug.cgi?id=564870#c7
On restart, the extensions changes the following prefs.
extensions.checkCompatibility.3.0
extensions.checkCompatibility.3.1p
extensions.checkCompatibility.3.1pre
extensions.checkCompatibility.3.1a
extensions.checkCompatibility.3.1b
extensions.checkCompatibility.3.1
The add-ons manager shows a notification to restart Thunderbird. Incompatible add-ons are not enabled until another restart.
Expected:
Incompatible add-ons are enabled immediately when the prefs are changed after install restart.
Updated•14 years ago
|
status-thunderbird3.1:
--- → ?
Updated•14 years ago
|
status-thunderbird3.1:
? → ---
Assignee | ||
Comment 1•14 years ago
|
||
A second restart is required in both Firefox and Thunderbird to enable incompatible add-ons.
Here is what typically happens during the acr install process:
1) Open/download acr.xpi
2) User restarts Firefox
3) During start-up, Firefox installs the acr add-on
4) During acr initialization the checkCompatibility prefs are set
5) Opening the Extension Manager now shows a) "Compatibility checking is disabled" and b) "Restart to enable this add-on" on any incompatible add-ons.
6) User restarts Firefox
7) Firefox enables incompatible add-ons.
8) All incompatible add-ons appear enabled in Extension Manager.
I don't see any way around this because AFAIK during FF startup the Extension Manager stuff (enable/disable) is done before add-ons get to act on anything.
Or put another way: I don't think there is any way for an add-on to programmatically set the checkCompatibility prefs before the Extension Manager next checks should it re-enable incompatible add-ons (during the next start-up).
Reporter | ||
Comment 2•14 years ago
|
||
(In reply to comment #1)
> I don't see any way around this because AFAIK during FF startup the Extension
> Manager stuff (enable/disable) is done before add-ons get to act on anything.
Dave, we may have had this discussion elsewhere, but can you comment? Right now we are changing the prefs at 'final-ui-startup'.
Component: Preferences → Compatibility Tools
Product: Thunderbird → addons.mozilla.org
QA Contact: preferences → compatibility
Target Milestone: --- → ACR-1.0
Version: 3.1 → ACR-0.*
Comment 3•14 years ago
|
||
See also bug 576568, "Update Compatibility Reporter for XPCOM component registration changes".
Comment 4•14 years ago
|
||
(In reply to comment #2)
> (In reply to comment #1)
> > I don't see any way around this because AFAIK during FF startup the Extension
> > Manager stuff (enable/disable) is done before add-ons get to act on anything.
>
> Dave, we may have had this discussion elsewhere, but can you comment? Right now
> we are changing the prefs at 'final-ui-startup'.
I actually can't think of how to manage this now. I presume this used to work because the EM restart made your pref changes took effect, but now that is no longer there, and extensions cannot physically do anything before the extension manager does its stuff. The only think I can think of is that ACR could check for any extensions that are pending-enable at startup and if so immediately offer to restart for the user. Hardly nice and clean but it is all I have right now.
Reporter | ||
Comment 5•14 years ago
|
||
(In reply to comment #4)
> ... The only think I can think of is that ACR could check
> for any extensions that are pending-enable at startup and if so immediately
> offer to restart for the user. Hardly nice and clean but it is all I have right
> now.
Seems acceptable. Justin, thoughts?
Summary: Compatibility Prefs require restart after changing → [ACR Extension] Compatibility Prefs require restart after changing
Comment 6•14 years ago
|
||
A second restart has always been required to use incompatible add-ons. The first-run page even says to do so in the first step: https://preview.addons.mozilla.org/en-US/firefox/pages/compatibility_firstrun
If we can improve this in any way, that sounds great, but I assumed it wasn't possible since we've been living with it.
Reporter | ||
Comment 7•14 years ago
|
||
(In reply to comment #6)
> A second restart has always been required to use incompatible add-ons. The
> first-run page even says to do so in the first step:
> https://preview.addons.mozilla.org/en-US/firefox/pages/compatibility_firstrun
>
> If we can improve this in any way, that sounds great, but I assumed it wasn't
> possible since we've been living with it.
I think it's just something we'll have to live with, as we can't hook into the EM earlier. If anyone knows a way, feel free to reopen.
As for alerting the user about the 2nd restart, this is already happening in the listing of the add-ons that will be enabled (see step 5 in comment 1). Keeping with the spirit of not annoying the users too much, I think this is good enough.
Status: NEW → RESOLVED
Closed: 14 years ago
Resolution: --- → WONTFIX
Comment 8•13 years ago
|
||
I had an idea of at least a way to make this look more seamless to the user. If you have a "final-ui-startup" observer and trigger an app restart from there then the user will see no UI or anything the app will just look like it took longer to startup. You'd have to be v.careful to not restart-loop but it seems workable.
Reporter | ||
Comment 9•13 years ago
|
||
I thought about that before but ruled it out because I thought it would offend the Firefox startup gods, i.e. it would perceive longer startup time which we have been working to improve all the time.
However, once in a while (per install of ACR) is probably acceptable. Reopening to give it a go.
Assignee: nobody → dave
Status: RESOLVED → REOPENED
Resolution: WONTFIX → ---
Target Milestone: ACR-1.0 → ACR-0.9
Updated•13 years ago
|
OS: Windows Vista → All
Hardware: x86 → All
Assignee | ||
Comment 10•13 years ago
|
||
A fix for this lands in r92450
Here is the ACR install process:
1) User opens acr.xpi
2) User restarts Firefox
3) During start-up, Firefox installs the ACR add-on (no UI appears yet)
4) ACR performs initialization - we set the checkCompatibility prefs. to false (user-defined checkCompatibility prefs. are also backed-up at this point)
5) ACR now restarts the application (this is the 2nd Firefox restart)
6) Firefox now enables any add-ons that were previously incompatible
7) Firefox UI appears (with all incompatible add-ons installed and running)
During this process, the user is unaware that their browser has restarted twice and there is no noticable increase in start-up time.
Reporter | ||
Comment 11•13 years ago
|
||
Will be in upcoming 0.8.6.
Status: REOPENED → RESOLVED
Closed: 14 years ago → 13 years ago
Resolution: --- → FIXED
Comment 12•13 years ago
|
||
Works fine with ACR 0.8.6 for the installation of the add-on. But we still fail if you only enable the add-on. I will file a follow-up bug.
Status: RESOLVED → VERIFIED
Summary: [ACR Extension] Compatibility Prefs require restart after changing → [ACR] Compatibility Prefs require restart after changing (ACR installation)
Comment 13•13 years ago
|
||
About ACR 0.8.6: see also bug 659772 comment #35.
Comment 14•13 years ago
|
||
From bug 671894 and its dupes I think this is actually breaking the add-ons manager immediately after installation. I think we probably should back it out and get an updated ACR out until we can figure out what is going on.
Comment 15•13 years ago
|
||
I've disabled 0.8.6 on AMO. I too noticed the symptoms of bug 659772 this morning and emailed Brian and Dave wondering if it was related to the ACR update.
Comment 16•13 years ago
|
||
(In reply to comment #15)
> I've disabled 0.8.6 on AMO. I too noticed the symptoms of bug 659772 this
> morning and emailed Brian and Dave wondering if it was related to the ACR
> update.
What is the recommended course of action for users who updated ACR to 0.8.6 several days ago and restarted the app several times (maybe for nightly updates) since then?
(a) Don't make waves, the critical restart is the first one after installing 0.8.6, if you leave it enabled nothing more should happen,
or (b) Go back to 0.8.5, and faster than that!
Comment 17•13 years ago
|
||
(In reply to comment #16)
> (In reply to comment #15)
> > I've disabled 0.8.6 on AMO. I too noticed the symptoms of bug 659772 this
> > morning and emailed Brian and Dave wondering if it was related to the ACR
> > update.
>
> What is the recommended course of action for users who updated ACR to 0.8.6
> several days ago and restarted the app several times (maybe for nightly
> updates) since then?
> (a) Don't make waves, the critical restart is the first one after installing
> 0.8.6, if you leave it enabled nothing more should happen,
> or (b) Go back to 0.8.5, and faster than that!
With the way the change is the first install is the one that does the work that causes the problem, subsequently I'd expect there to be no problem.
Reporter | ||
Comment 18•13 years ago
|
||
Reopening to see if we can do it right.
Causes bug 659772 (and possibly others), and 0.8.6 is disabled on AMO.
Assignee: dave → briks.si
Status: VERIFIED → REOPENED
Resolution: FIXED → ---
Target Milestone: ACR-0.9 → ACR-0.8.7
Comment 19•13 years ago
|
||
We could consider a Mozmill test for at least this situation once identified.
Status: REOPENED → ASSIGNED
Reporter | ||
Comment 20•13 years ago
|
||
I've uploaded version 0.8.7 with this feature turned off for now, r92665.
Reporter | ||
Updated•13 years ago
|
Assignee: briks.si → dave
Target Milestone: ACR-0.8.7 → ACR-0.8.8
Assignee | ||
Comment 21•13 years ago
|
||
Maybe the best solution to this would be to simply display a doorhanger notification to the user:
"You must restart Firefox to enable incompatible addons. [Restart]"
By the time they read the notification and click, it will be safe to restart.
Reporter | ||
Comment 22•13 years ago
|
||
(In reply to David McNamara [:mackers] from comment #21)
> Maybe the best solution to this would be to simply display a doorhanger
> notification to the user:
>
> "You must restart Firefox to enable incompatible addons. [Restart]"
>
> By the time they read the notification and click, it will be safe to restart.
A notification message is already shown in the the listing of each add-on that will become compatible, but this would certainly be more noticable.
It doesn't mean we shouldn't give fixing this properly another shot though.
Reporter | ||
Updated•13 years ago
|
Priority: -- → P2
Target Milestone: ACR-0.8.8 → ACR-0.9.1
Assignee | ||
Comment 23•13 years ago
|
||
A possible solution is to use eAttemptQuit instead of eForceQuit in nsIAppStartup.quit
However, I believe this distinction is only concerned with what happens should there be a window open that will not close.
https://developer.mozilla.org/en/NsIAppStartup#quit%28%29
In our case, there should be no windows open yet, and the app will still quit immediately, corrupting the addons database.
I can't test this as I am unable to reproduce bug 659772.
Assignee | ||
Comment 24•13 years ago
|
||
Here are two separate builds for testing:
http://dl.dropbox.com/u/2575442/acr-bug572322-forceRestart.xpi
http://dl.dropbox.com/u/2575442/acr-bug572322-attemptRestart.xpi
** WARNING: above xpis will possibly corrupt your profile **
To test:
1) uninstall any version of the acr extension
2) reset pref "extensions.acr.postinstall"
3) install addon from link above
4) restart Firefox
ACR will silently restart the browser. For the "forceRestart" XPI, you should hopefully be able to reproduce the profile corruption seen in bug 659772
If the "attemptRestart" XPI also corrupts your profile, then this fix is not viable.
Reporter | ||
Updated•13 years ago
|
Reporter | ||
Comment 25•13 years ago
|
||
The better reference bug I think for what corruption happens is bug 671894.
I tried both builds from comment 24 and am not able to reproduce. I never was. I even tried installing some of the add-ons mentioned in bug 671894.
I suspect you are correct in saying that the Add-ons Manager makes no distinction between what flag you use (eAttemptQuit or eForceQuit), because it does not hook into it or rely on windows being available. Mossop?
David, what event are you waiting for before restarting ... "final-ui-startup" as Mossop suggested? Might there be a later one perhaps? Poking around it seems not, at least not without windows appearing.
Also poking around, I wonder if this will help us in any way:
https://developer.mozilla.org/en/Addons/Add-on_Manager/AddonManager#getStartupChanges%28%29
Comment 26•13 years ago
|
||
(In reply to Brian King (Briks) [:kinger] from comment #25)
> The better reference bug I think for what corruption happens is bug 671894.
>
> I tried both builds from comment 24 and am not able to reproduce. I never
> was. I even tried installing some of the add-ons mentioned in bug 671894.
>
> I suspect you are correct in saying that the Add-ons Manager makes no
> distinction between what flag you use (eAttemptQuit or eForceQuit), because
> it does not hook into it or rely on windows being available. Mossop?
Yeah, add-ons manager shouldn't care here. That said I also never managed to really reproduce this for myself so I'm not really sure what was going wrong.
Reporter | ||
Updated•13 years ago
|
Target Milestone: ACR-0.9.1 → ACR-1.0
Assignee | ||
Comment 27•13 years ago
|
||
Assuming the problem here is that the addon repository is not shutdown correctly causing the sqlite database to become corrupt.
r96098 has the following behaviour:
- On first restart after ACR install ("postinstall"), we send a asynchronous shutdown request to the AddonRepository module. This does the necessary storage shutdown stuff.
- ACR is notified of the shutdown by "addon-repository-shutdown". At this point we assume it is safe and restart the application.
Here is a build of the above which hopefully we can test against (notwithstanding the problem of not being able to repro. the original bug).
http://dl.dropbox.com/u/2575442/acr-r96098.xpi
Reporter | ||
Comment 28•13 years ago
|
||
Updated test build (version # 0.9.3):
http://dl.dropbox.com/u/5940796/acr/acr093.xpi
Status: ASSIGNED → RESOLVED
Closed: 13 years ago → 13 years ago
Resolution: --- → FIXED
Comment 29•13 years ago
|
||
(In reply to David McNamara [:mackers] from comment #27)
> Assuming the problem here is that the addon repository is not shutdown
> correctly causing the sqlite database to become corrupt.
Can you explain where this aassumption comes from? The errors we were seeing were coming from XPIProvider, not AddonRepository.
We're seeing a few reports trickling in again of the errors we were seeing before, at least some of which have ACR 1.0 installed. At this point it is too few to draw any real conclusions though.
Reporter | ||
Comment 30•13 years ago
|
||
(In reply to Dave Townsend (:Mossop) from comment #29)
> We're seeing a few reports trickling in again of the errors we were seeing
> before, at least some of which have ACR 1.0 installed. At this point it is
> too few to draw any real conclusions though.
Are these Nightly only reports? See:
https://bugzilla.mozilla.org/show_bug.cgi?id=698653#c14
Comment 31•13 years ago
|
||
(In reply to Brian King (Briks) [:kinger] from comment #30)
> (In reply to Dave Townsend (:Mossop) from comment #29)
> > We're seeing a few reports trickling in again of the errors we were seeing
> > before, at least some of which have ACR 1.0 installed. At this point it is
> > too few to draw any real conclusions though.
>
> Are these Nightly only reports? See:
> https://bugzilla.mozilla.org/show_bug.cgi?id=698653#c14
At least one was the 10.0a2 from aurora.
Assignee | ||
Comment 32•13 years ago
|
||
(In reply to Dave Townsend (:Mossop) from comment #29)
> Can you explain where this aassumption comes from? The errors we were seeing
> were coming from XPIProvider, not AddonRepository.
It wasn't an assumption that this was causing the bug. Rather, we were creating a test build to see if the problem was still occurring with this fix.
Assignee | ||
Comment 33•13 years ago
|
||
Added preference to allow easier control of ACR auto restart functionality.
extensions.acr.autorestart
Default is FALSE until we can satisfactorily test this solution.
Assignee | ||
Comment 34•13 years ago
|
||
Added preference to allow easier control of ACR auto restart functionality.
extensions.acr.autorestart
Default is FALSE until we can satisfactorily test this solution.
r98999
Reporter | ||
Comment 35•13 years ago
|
||
(In reply to David McNamara [:mackers] from comment #34)
> Added preference to allow easier control of ACR auto restart functionality.
>
> extensions.acr.autorestart
>
> Default is FALSE until we can satisfactorily test this solution.
I don't think this should be FALSE by default, because there are no confirmed reports of this causing breakage since the new implementation.
Reporter | ||
Comment 36•13 years ago
|
||
(In reply to Brian King (Briks) [:kinger] from comment #35)
> I don't think this should be FALSE by default, because there are no
> confirmed reports of this causing breakage since the new implementation.
I have set it to TRUE, r99366. So v1.0.2 (being released today) will still have auto restart turned on.
Comment 37•13 years ago
|
||
(In reply to Brian King (Briks) [:kinger] from comment #36)
> (In reply to Brian King (Briks) [:kinger] from comment #35)
> > I don't think this should be FALSE by default, because there are no
> > confirmed reports of this causing breakage since the new implementation.
>
> I have set it to TRUE, r99366. So v1.0.2 (being released today) will still
> have auto restart turned on.
Confirmed that this code is still causing problems, see bug 728466 which, along with add-on sync being enabled causes us to throw away all add-ons too.
Updated•9 years ago
|
Product: addons.mozilla.org → addons.mozilla.org Graveyard
You need to log in
before you can comment on or make changes to this bug.
Description
•