The default bug view has changed. See this FAQ.

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

RESOLVED FIXED in mozilla15

Status

()

Toolkit
Add-ons Manager
RESOLVED FIXED
5 years ago
5 years ago

People

(Reporter: mkaply, Assigned: mossop)

Tracking

(Blocks: 1 bug)

Trunk
mozilla15
Points:
---
Dependency tree / graph

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment)

(Reporter)

Description

5 years ago
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.
(Assignee)

Comment 1

5 years ago
Have you actually seen this causing a problem? I thought we verified the paths and rebuilt when necessary already.
(Assignee)

Comment 2

5 years ago
The checking code was added in bug 619607
(Reporter)

Comment 3

5 years ago
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).
(Reporter)

Comment 4

5 years ago
That bug seems to only deal with extensions.bootstrappedAddons.

What about extensions.installCache?
(Assignee)

Comment 5

5 years ago
(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?
(Assignee)

Comment 6

5 years ago
(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.
(Reporter)

Comment 7

5 years ago
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.
(Reporter)

Comment 8

5 years ago
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)

Updated

5 years ago
Assignee: nobody → dtownsend+bugmail
Status: NEW → ASSIGNED

Comment 9

5 years ago
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
(Assignee)

Comment 10

5 years ago
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
(Assignee)

Comment 11

5 years ago
Created attachment 623163 [details] [diff] [review]
patch rev 1

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+
(Assignee)

Comment 12

5 years ago
https://hg.mozilla.org/integration/mozilla-inbound/rev/ff13f7157159
Target Milestone: --- → mozilla15
https://hg.mozilla.org/mozilla-central/rev/ff13f7157159
Status: ASSIGNED → RESOLVED
Last Resolved: 5 years ago
Resolution: --- → FIXED
(Assignee)

Updated

5 years ago
Duplicate of this bug: 762822

Updated

5 years ago
Blocks: 467520
(Assignee)

Updated

5 years ago
Depends on: 774990
You need to log in before you can comment on or make changes to this bug.