Closed Bug 562930 Opened 14 years ago Closed 14 years ago

Extensions containing JS components break on every update/reinstall

Categories

(Toolkit :: Add-ons Manager, defect, P1)

defect

Tracking

()

VERIFIED FIXED
mozilla1.9.3a5
Tracking Status
blocking2.0 --- beta1+

People

(Reporter: Peter6, Assigned: mossop)

References

Details

(Whiteboard: [AddonsRewriteTestday][rewrite])

Attachments

(4 files)

Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.3a5pre) Gecko/20100430 Minefield/3.7a5pre ID:20100430040256

repro:
open yesterdays build
install AdblockPlus
restart and close

open todays build
go to the new add-ons manager
check for updates
the newer Adblockplus installes
restart FF
open AM 

result:
no AdblockPlus in the list

I'm notsure this needs the kwd "regression"
Peter, which version of Adblock Plus you had installed before?
Blocks: 550048
Whiteboard: [AddonsRewriteTestday][rewrite]
I had 1.1.3 and the update was to 1.2

Oddly enough Adblock Plus was totally gone, even when I reverted to yesterdays build (before new add-ons manager)
Can you also reproduce it in a fresh profile? If yes, it would be helpful when you could attach the extensions.sqlite file.
Attached file extensions.sqlite (deleted) —
Yep, same with new profile.
Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US; rv:1.9.3a5pre) Gecko/20100430 Minefield/3.7a5pre

I installed NoSript and after restarting the addon's tab site showed on focus. There it said I had to update to the latest version so I did via the site's link. This time the addon's tab site did not appear at all, the addon was not listed on the Addons Manager Tab but I can see it's icon on the status bar!!!
NoScript is installed though, because I have the icon on the statusbar and right clicking it I get the context menu with all the options.
The same thing happened to me on the latest build (actually, yesterday's) but it didn't disappear from the list, it actually uninstalled completely. It was still there after the restart (not on the list though), but after a second restart (to see if it made a difference) it wasn't anywhere to be found.
Priority: -- → P1
Blocks: 461973
No longer blocks: 550048
I haven't been able to reproduce updates flat out uninstalling versions. I have seen a case where an update didn't properly apply, I'll take care of that in bug 564030. It's possible though I think unlikely that the two are related though.

Can people who have seen this get one of the old nightlies with the add-ons manager still in it and enable extensions.logging.enabled and see what messages are in the error console after the restart that was meant to install the updated version.
(In reply to comment #6)
> Created an attachment (id=442855) [details]
> NoSript is not listed on the Addons Manager Tab but it is installed because I
> see the icon on the status bar

This is bug 566626 I think
Peter, are you still seeing this?
Dave, my laptop died and is not fixed yet so I can't test it..
I don't want to try trunk with my underpowerd EEE.
blocking2.0: --- → beta1+
Summary: extension doesn't show up on list after update → Adblock plus does not show up in the list after the first restart after an update and then gets uninstalled after the next restart
I just reproduced this issue on a clean profile updating from https://adblockplus.org/devbuilds/adblockplus/adblockplus-1.2.0+.2010050102.xpi to latest development build - no custom settings whatsoever, Adblock Plus is the only extension installed. Restarting after update removes all extension files except chrome/adblockplus.jar. After second update this file (and the entire extension directory) is removed as well, Adblock Plus is still listed in extensions.ini however.
If it is a duplicate, the bug was not fixed.
Sorry, meant to say "After second restart" above.

@Gary: no, this bug isn't marked as fixed.
Thanks Wladimir
The same thing has just happened when I tried to update Noscript. You can see that it is in the status bar but it is not in the extension list:

[URL=http://s20.photobucket.com/albums/b243/TK-1913/?action=view&current=ns.png][IMG]http://i20.photobucket.com/albums/b243/TK-1913/th_ns.png[/IMG][/URL]
(In reply to comment #18)
> The same thing has just happened when I tried to update Noscript. You can see
> that it is in the status bar but it is not in the extension list:
> 
> [URL=http://s20.photobucket.com/albums/b243/TK-1913/?action=view&current=ns.png][IMG]http://i20.photobucket.com/albums/b243/TK-1913/th_ns.png[/IMG][/URL]

If you see NoScript reappear after switching between the themes and extensions list a few times and it isn't getting uninstalled after a restart then you are probably seeing bug 566626
Probably but I tried to do that and it did not work. It seems that these two extensions are the only ones I am having issues with. Maybe the AOM is trying to update them form-about:addons- and when it sees that there is a lower version there, it goes wacky?? Just a thought.
Attached file Errors in NoScript update (deleted) —
(In reply to comment #18)
> The same thing has just happened when I tried to update Noscript. You can see
> that it is in the status bar but it is not in the extension list:

At least for me that is the old version which was supposed to be updated. After second restart it is gone (totally uninstalled) Errors from error console are in comment 23...
I
I am using 1.3a and i have not see this problems, try to update it to 1.3a
Adrian, Use an older release of ABP, then try to update it.
(In reply to comment #22)
> Yes, NoScript is bug 566626.

Nope, both ABP and NoScript are affected by this very bug (see attachment #446713 [details]), while extensions with no JS components (like https://addons.mozilla.org/it/firefox/addon/4270 ) seem to be unaffected.

To recap, both if you reinstall the extension over itself (even the same version) or you use automatic update, the extension:
 
1) On first browser restart, breaks -- chrome from previous installation is retained but JS components are not register anymore
2) On second browser restart gets completely uninstalled
Severity: normal → major
Summary: Adblock plus does not show up in the list after the first restart after an update and then gets uninstalled after the next restart → Extensions containing JS components break on every update/reinstall
To comment 28 by Giorgio Maone. 

You are correct.
I just updated my addons and Noscript vanished once again. I had to re install it to get it back as being shown as an addon. The Icons in the status bar stayed.
This happened to me twice today. Once when I updated Noscript and once when I updated Adblock Plus. I had to reinstall both extensions.
Could you please assign this too someone to fix?
Gary, we won't ship with this serious of a bug and someone (most likely Dave Townsend) will take this bug when he has the time to work on it.
OK , I just thought that a bug that effects two of Firefox's most used extensions and are related to security, would at least be assigned to someone by now. I know that this bug will not ship and hopefully none of them will.
Attached patch patch rev 1 (deleted) — Splinter Review
This is pretty much what I expected. The extension to be updated is loading during startup which leaves some files locked so when we try to remove it to do the update we fail. This might be improved with bug 553015, but the nice thing that I've been wanting to do and fixes this anyway is to remove add-ons pending upgrade from the extensions.ini list. This means the platform will not load them on the next startup so we are free to replace their files.
Assignee: nobody → dtownsend
Status: NEW → ASSIGNED
Attachment #447790 - Flags: review?(robert.bugzilla)
Flags: in-testsuite?
Flags: in-litmus?
Comment on attachment 447790 [details] [diff] [review]
patch rev 1

>diff --git a/toolkit/mozapps/extensions/XPIProvider.jsm b/toolkit/mozapps/extensions/XPIProvider.jsm
>--- a/toolkit/mozapps/extensions/XPIProvider.jsm
>+++ b/toolkit/mozapps/extensions/XPIProvider.jsm
>...
>@@ -3261,47 +3271,55 @@ var XPIDatabase = {
> 
>   /**
>    * Synchronously calculates and updates all the active flags in the database.
>    */
>   updateActiveAddons: function XPIDB_updateActiveAddons() {
>     LOG("Updating add-on states");
>     let stmt = this.getStatement("setActiveAddons");
>     stmt.execute();
>-
>-    this.writeAddonsList();
>   },
> 
>   /**
>    * Writes out the XPI add-ons list for the platform to read.
>-   */
>-  writeAddonsList: function XPIDB_writeAddonsList() {
>+   *
>+   * @param  aPendingUpdateIDs
>+   *         A list of IDs of add-ons that are pending update and so shouldn't
>+   *         be included in the add-ons list.
s/A list/An array/

btw: cool solution.
Attachment #447790 - Flags: review?(robert.bugzilla) → review+
Landed: http://hg.mozilla.org/mozilla-central/rev/20d24f34a512
Status: ASSIGNED → RESOLVED
Closed: 14 years ago
Flags: in-testsuite?
Flags: in-testsuite+
Flags: in-litmus?
Flags: in-litmus-
Resolution: --- → FIXED
Target Milestone: --- → mozilla1.9.3a5
Looks to work fine now with Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.3a5pre) Gecko/20100530 Minefield/3.7a5pre (.NET CLR 3.5.30729)

Gary and Wladimir, can you please test again and give feedback if it also works for you? Thanks.
I cannot get to the add-on site by pressing the Get add on button.

http://i20.photobucket.com/albums/b243/TK-1913/gao.png
(In reply to comment #39)
> I cannot get to the add-on site by pressing the Get add on button.
> 
> http://i20.photobucket.com/albums/b243/TK-1913/gao.png

That doesn't seem related to this bug report, please file a new bug with more details about what your problem it.
I can confirm that everything works as expected in this build:

Mozilla/5.0 (Windows; U; Windows NT 6.1; WOW64; en-US; rv:1.9.3a5pre) Gecko/20100530 Minefield/3.7a5pre

I tried installing and updating an Adblock Plus development build as before.
Thanks for your feedback. Marking as verified fixed.
Status: RESOLVED → VERIFIED
OS: Windows XP → All
Hardware: x86 → All
Version: unspecified → Trunk
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: