My add-on ships with the installation package. During installation, the extension is added to FF by means of registry - by creating a new key in the HKCU/Software/Mozilla/Firefox/Extensions. Naturally I want to be able to update my extensions independently from main application. To achieve just that I’ve setup update.rdf and hosted in on https server, adding updateURL to my extension’s package.json.
As a result I see that Firefox tries to read my update.rdf and finds update. But unable to update locally installed add-on! Logs:
1464888839764 addons.update-checker DEBUG Requesting https://path/update.rdf
1464888840017 addons.update-checker DEBUG Found an update entry for <My Addon Name> version 1.2.3
1464888840022 addons.xpi DEBUG Found an existing AddonInstall for <My Addon Name>
1464888840024 addons.manager DEBUG Found update for add-on <My Addon Name>
1464888840026 addons.manager DEBUG onUpdateFinished for <My Addon Name>
On the other hand when MyAddonName.xpi installed manually it updates beautifully.
Is there a solution to this? May be I can install add-on differently?
On https://developer.mozilla.org/en-US/Add-ons/Installing_extensions it is stated
Note: Extensions installed using this method are visible in all profiles for the given application, new and pre-existing. However, no automatic updates are performed for these extensions. Since the extension’s files are installed by an external tool, the application expects the external tool to handle performing updates. However, automatic compatibility checks are still performed.
But it is counter-intuitive! The only obvious reason to self-host add-on is when it’s bundled with application. But there is no way to install XPI during installation in such manner that automatic updates will be available.
Any help is appreciated.
Bumping for more visibility
Not really. There are plenty of self-hosted add-ons that use the regular web install method. They are probably the majority of self-hosted ones.
I can’t think of a workaround, given what the documentation already states.
I see it that way:
- Bundled extension is installed using registry method. Auto-update won’t work that way
- Application asks a user to install extension manually. Auto-update works
- There is no other way?
If I understand correctly it all boils down to registering local extension in AddonManager.jpm
Can it be considered as a new feature? I would gladly add appropriate request to bugzilla.