Closed Bug 744833 Opened 12 years ago Closed 12 years ago

extensions.bootstrappedAddons gets out of sync when an addon's location changes

Categories

(Toolkit :: Add-ons Manager, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla15

People

(Reporter: mkaply, Assigned: mossop)

References

Details

Attachments

(1 file)

Currently the preferences extensions.bootstrappedAddons and extensions.installCache hardcode paths to the add-ons. For example:

{
    "onepassword@agilebits.com": {
        "version": "3.9.4",
        "type": "extension",
        "descriptor": "H:\\.se\\browser\\profile\\extensions\\onepassword@agilebits.com"
    }
}

This means that if a profile is moved, the extension won't reload properly.

This can happen when changing network drives, loading from a flash drive, moving between operating systems, etc.

Operating system paths should not be in preferences.
Have you actually seen this causing a problem? I thought we verified the paths and rebuilt when necessary already.
The checking code was added in bug 619607
Yes. 

We have a product that is on a USB key.

When we switch between Mac and Windows, the restartless add-on is present, but not enabled properly. If you enable then disable it appears (toolbarbutton).
That bug seems to only deal with extensions.bootstrappedAddons.

What about extensions.installCache?
(In reply to Michael Kaply (mkaply) from comment #3)
> Yes. 
> 
> We have a product that is on a USB key.
> 
> When we switch between Mac and Windows, the restartless add-on is present,
> but not enabled properly. If you enable then disable it appears
> (toolbarbutton).

You mean disable then enable?

This is odd, switching OS like that ought to cause a complete rebuild of the add-ons DB anyway so I'd fully expect everything to be right. What do you see in the error console if extensions.logging.enabled is on when you startup Firefox on the new OS?
(In reply to Michael Kaply (mkaply) from comment #4)
> That bug seems to only deal with extensions.bootstrappedAddons.
> 
> What about extensions.installCache?

As soon as the directories for installed extensions change installCache gets rebuilt, it is there precisely to allow us to detect directory changes like this and is what triggers us to load up the database and apply any changes that have happened.
yep, installCache did get updated.

bootstrappedAddons is empty though ({})

If I disable and reenable and then restart, I get a bootstrappedAddons value with the correct apths.
It looks like the right things are happening on the console:

LOG addons.xpi: Add-on onepassword@agilebits.com moved to H:\.se\browser\profile\extensions\onepassword@agilebits.com

LOG addons.xpi: Updating database with changes to installed add-ons

LOG addons.xpi: Updating add-on states


And that add-on is enabled in add-ons manager, it's just not running.


To give more info on the bootstrappedAddons pref (maybe I just don't know what it is for).

After switching from Mac to Windows machine (or vice versa).
Pref has no value on start (and add-on doesn't work).
Disable and enable in add-ons manager, pref still has no value (but add-on now works)
Restart the browser
bootstrappedAddons is populated with information about the addon and the add-on works.
Assignee: nobody → dtownsend+bugmail
Status: NEW → ASSIGNED
Try run for 985253068655 is complete.
Detailed breakdown of the results available here:
    https://tbpl.mozilla.org/?tree=Try&rev=985253068655
Results (out of 42 total builds):
    exception: 15
    success: 10
    warnings: 16
    failure: 1
Builds (or logs if builds failed) available at:
http://ftp.mozilla.org/pub/mozilla.org/firefox/try-builds/dtownsend@mozilla.com-985253068655
This is a regression from the fast path we added in bug 655254. It correctly updates the location of the add-on but doesn't rebuild the bootstrap entry when necessary.
Blocks: 655254
Attached patch patch rev 1Splinter Review
This fixes it and adds a test for this case
Attachment #623163 - Flags: review?(bmcbride)
Summary: extensions.bootstrappedAddons and extensions.installCache should not hardcode paths to the add-ons → extensions.bootstrappedAddons gets out of sync when an addon's location changes
Attachment #623163 - Flags: review?(bmcbride) → review+
https://hg.mozilla.org/mozilla-central/rev/ff13f7157159
Status: ASSIGNED → RESOLVED
Closed: 12 years ago
Resolution: --- → FIXED
Blocks: abp
Depends on: 774990
You need to log in before you can comment on or make changes to this bug.