Reputation: 19004
I'm having trouble updating a Firefox extension I wrote. It appears to download the new version, uninstall the old version, and then reinstall the old version.
I packaged the extension with the following command:
cfx xpi --update-link=https://www.myextension.com/firefox/myextension.xpi --update-url=https://www.myextension.com/firefox/myextension.update.rdf
I ran Firefox with the about:config property "extensions.logging.enabled" set to true and got the following logs:
*** LOG addons.updates: Requesting https://www.myextension.com/firefox/myextension.update.rdf
*** LOG addons.updates: Found an update entry for [email protected] version 0.1.1
*** LOG addons.xpi: Download started for https://www.myextension.com/firefox/myextension.xpi to file C:\Users\BENMCC~1\AppData\Local\Temp\tmp-mki.xpi
*** LOG addons.xpi: Download of https://www.myextension.com/firefox/myextension.xpi completed.
*** LOG addons.repository: Requesting https://services.addons.mozilla.org/en-US/firefox/api/1.5/search/guid:myextension%40myextension.com?src=firefox&appOS=WINNT&appVersion=17.0.1
*** LOG addons.xpi: Starting install of https://www.myextension.com/firefox/myextension.xpi
*** LOG addons.xpi: Addon [email protected] will be installed as a packed xpi
*** LOG addons.xpi: Calling bootstrap method shutdown on [email protected] version 0.1
*** LOG addons.xpi: Calling bootstrap method uninstall on [email protected] version 0.1
*** LOG addons.xpi: Loading bootstrap scope from C:\Users\Ben McCann\AppData\Roaming\Mozilla\Firefox\Profiles\pr7jcnq3.default\extensions\[email protected]
*** LOG addons.xpi: Calling bootstrap method install on [email protected] version 0.1
*** LOG addons.xpi: Install of https://www.myextension.com/firefox/myextension.xpi completed.
*** LOG addons.xpi: Calling bootstrap method startup on [email protected] version 0.1
It downloads the xpi to C:\Users\BENMCC~1\AppData\Local\Temp\tmp-mki.xpi but then appears to install the old version from C:\Users\Ben McCann\AppData\Roaming\Mozilla\Firefox\Profiles\pr7jcnq3.default\extensions\[email protected]. I've inspected the latter xpi and it has the wrong version number.
Any ideas what might be going on or how to debug the problem?
Upvotes: 1
Views: 239
Reputation: 19004
It turns out this was because the server was not setting the mime type of the extension files correctly.
I submitted a pull request to the Play Framework to fix it.
Upvotes: 1