I was testing the update mechanism for WebExtensions.
https://developer.mozilla.org/en-US/Add-ons/Updates
The documentation says: If your add-on is not hosted on AMO, you must specify the location of your update manifest in your add-on. For WebExtensions, add the following to your manifest:
"applications": {
"gecko": {
"update_url": "https://example.com/updates.json"
}
}
However, after adding an “update_url” I can’t install the XPI any more. I tested it with FF Nightly 49.0a1 (2016-06-06). My jsconsole says:
[Exception... "Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsIURI.hostPort]" nsresult: "0x80004005 (NS_ERROR_FAILURE)" location: "JS frame :: resource://gre/modules/PopupNotifications.jsm :: PopupNotifications_refreshPanel/< :: line 667" data: no]
PopupNotifications_refreshPanel/<()PopupNotifications.jsm:667
forEach()self-hosted
PopupNotifications_refreshPanel()PopupNotifications.jsm:616
PopupNotifications_showPanel()PopupNotifications.jsm:728
PopupNotifications_update()PopupNotifications.jsm:844
PopupNotifications_show()PopupNotifications.jsm:394
gXPInstallObserver.observe()browser-addons.js:365
notifyObservers()amWebInstallListener.js:51
Installer.prototype.checkAllDownloaded()amWebInstallListener.js:151
Installer()amWebInstallListener.js:81
extWebInstallListener.prototype.onWebInstallRequested()amWebInstallListener.js:335
buildNextInstall()extensions.js:1276
gViewController.commands.cmd_installFromFile.doCommand/buildNextInstall/<()extensions.js:1286
safeCall()AddonManager.jsm:179
AddonManagerInternal.getInstallForFile/<.nextObject/<()AddonManager.jsm:1955
this.XPIProvider.getInstallForFile/<()XPIProvider.jsm:3877
makeSafe/<()XPIProvider.jsm:1986
AddonInstall.prototype.initLocalInstall/</<()XPIProvider.jsm:5302
makeSafe/<()XPIProviderUtils.js:168
getRepositoryAddon()XPIProviderUtils.js:149
this.XPIDatabase.getAddon/<()XPIProviderUtils.js:1119
Handler.prototype.process()Promise-backend.js:937
this.PromiseWalker.walkerLoop()Promise-backend.js:816
bound walkerLoop()self-hosted
bound bound walkerLoop()self-hosted
You can try this with any WebExtension. Download Bookmark-It, add “update_url” to the manifest.json, zip the files, rename it to .xpi and try to install it.
Any ideas on that?