Closed Bug 1401161 Opened 9 years ago Closed 9 years ago

Legacy add-ons don't always get installed correctly without restart

Categories

(Toolkit :: Add-ons Manager, defect)

defect
Not set
major

Tracking

()

RESOLVED INVALID
Tracking Status
firefox57 --- affected

People

(Reporter: standard8, Unassigned)

Details

I'm working on a system add-on that might not be shipped as part of Firefox, but maybe as a shield study, or something. It is a simple add-on, with a frame script, two .jsm files and bootstrap.js. Whatever I do, when I first install it, it appears that chrome.manifest is not being read, or registered or something like that, as nothing apart from bootstrap.js will load. For example, if I: 1) Set the extensions.legacy.enabled to true 2) Install add-on via drag and drop of xpi on add-ons manager. or I: 1) Set the pref 2) Use about:debugging to install the add-on. or I: 1) Set the pref 2) Use a symlink in the profile directory. All of these end up with the same result - the .jsm files and the frame script can't be loaded on first install, and you have to restart. This is obviously making handling and testing of system add-ons a lot harder. I'm slightly concerned this could affect OTA updates of new system add-on roll-outs as well.
A clarification about terminology: "legacy extensions" means any type of extension that isn't a webextension, including xul overlays, sdk extensions, bootstrapped extensions. "system add-ons" means extensions that are distributed with the browser and udpated through a different mechanism than regular extensions in a user profile. This bug doesn't actually seem to have anything to do with system add-ons, it is just about a bootstrapped extension. In any case, can you attach an extension that exhibits the problem?
Flags: needinfo?(standard8)
Summary: Legacy system add-ons don't always get installed correctly without restart → Legacy add-ons don't always get installed correctly without restart
A regression window would also be helpful... we do have at least a few tests that ensure that the chrome.manifest and resources loaded from it work from bootstrapped add-ons (test_ChromeManifestParser.js, test_bug675371.js, test_registerchrome.js) We've had a lot of addons manager changes over the last few releases, the only one that comes to mind here is bug 1384689.
So in creating a more minimised extension I realised what the problem was - the initialisation had been added to the install function as well as the startup function, and hence at install stage not everything was available and therefore it failed. Hence, I'm marking this as invalid. The point of mentioning the system add-on part, is that bootstrapped add-ons will still need to be a primary development route for a lot of system add-ons (outside of the browser) that we need to keep working.
Status: NEW → RESOLVED
Closed: 9 years ago
Flags: needinfo?(standard8)
Resolution: --- → INVALID
You need to log in before you can comment on or make changes to this bug.