WebExtensions - This add-on could not be installed because it appears to be corrupt

I’m trying out the basic WebExtension example outlined at:

https://wiki.mozilla.org/WebExtensions

i’m running FireFox 41.0b5 on OSX

whenever i try to install the add-on in firefox, i receive the following message:
“This add-on could not be installed because it appears to be corrupt”

The browser console logs the following two cryptic messages that i can’t decipher:

1440797880020 addons.xpi WARN Invalid XPI: [Exception… “Component returned failure code: 0x80520006 (NS_ERROR_FILE_TARGET_DOES_NOT_EXIST) [nsIZipReader.getInputStream]” nsresult: “0x80520006 (NS_ERROR_FILE_TARGET_DOES_NOT_EXIST)” location: “JS frame :: resource://gre/modules/addons/XPIProvider.jsm :: loadManifestFromZipReader :: line 1114” data: no] Stack trace: loadManifestFromZipReader()@resource://gre/modules/addons/XPIProvider.jsm:1114 < next()@self-hosted:623 < TaskImpl_run()@resource://gre/modules/Task.jsm:314 < TaskImpl()@resource://gre/modules/Task.jsm:275 < createAsyncFunction/asyncFunction()@resource://gre/modules/Task.jsm:249 < AI_loadManifest()@resource://gre/modules/addons/XPIProvider.jsm:5467 < next()@self-hosted:623 < TaskImpl_run()@resource://gre/modules/Task.jsm:314 < TaskImpl()@resource://gre/modules/Task.jsm:275 < createAsyncFunction/asyncFunction()@resource://gre/modules/Task.jsm:249 < AI_initLocalInstall()@resource://gre/modules/addons/XPIProvider.jsm:5131 < AI_createInstall()@resource://gre/modules/addons/XPIProvider.jsm:6142 < XPI_getInstallForFile()@resource://gre/modules/addons/XPIProvider.jsm:3991 < callProviderAsync()@resource://gre/modules/AddonManager.jsm:248 < getInstallForFile_nextObject()@resource://gre/modules/AddonManager.jsm:1982 < AOC_callNext()@resource://gre/modules/AddonManager.jsm:375 < AsyncObjectCaller()@resource://gre/modules/AddonManager.jsm:355 < AMI_getInstallForFile()@resource://gre/modules/AddonManager.jsm:1980 < AM_getInstallForFile()@resource://gre/modules/AddonManager.jsm:3004 < buildNextInstall()@extensions.js:1263 < cmd_installFromFile_doCommand()@extensions.js:1269 < gVC_doCommand()@extensions.js:1427 < initialize/<()@extensions.js:94 < <file:unknown>

1440797880106 addons.xpi WARN Download of file:///Users/abeal/Desktop/Test.xpi failed: [Exception… “Component returned failure code: 0x80520006 (NS_ERROR_FILE_TARGET_DOES_NOT_EXIST) [nsIZipReader.getInputStream]” nsresult: “0x80520006 (NS_ERROR_FILE_TARGET_DOES_NOT_EXIST)” location: “JS frame :: resource://gre/modules/addons/XPIProvider.jsm :: loadManifestFromZipReader :: line 1114” data: no] Stack trace: loadManifestFromZipReader()@resource://gre/modules/addons/XPIProvider.jsm:1114 < next()@self-hosted:623 < TaskImpl_run()@resource://gre/modules/Task.jsm:314 < TaskImpl()@resource://gre/modules/Task.jsm:275 < createAsyncFunction/asyncFunction()@resource://gre/modules/Task.jsm:249 < AI_loadManifest()@resource://gre/modules/addons/XPIProvider.jsm:5467 < next()@self-hosted:623 < TaskImpl_run()@resource://gre/modules/Task.jsm:314 < TaskImpl()@resource://gre/modules/Task.jsm:275 < createAsyncFunction/asyncFunction()@resource://gre/modules/Task.jsm:249 < AI_onStopRequest()@resource://gre/modules/addons/XPIProvider.jsm:5776 < <file:unknown>

I believe you currently need to use Firefox 42 or 43 to install WebExtensions.

Thanks,
Blake.

yeah turns out https://wiki.mozilla.org/WebExtensions is pointing to the nightly build but instead should refer to the developer build.

thanks!

Well, you may still want to use Nightly, since it will have more up-to-date code, with sometimes-important bugfixes. :wink:

Hi,

I get the same error message when I try to install https://developer.chrome.com/extensions/samples#search:omnibox.

I downloaded simple-example.zip file, created an xpi and then dragged the xpi to both Nightly and Developer Edition with no success in both cases. What am I doing wrong?

Thanks,
Panagiota

1 Like

Hey, I solved the problem. I was missing following from manifest.json:

  "applications": {
     "gecko": {
          "id": "something@mozilla.org"
     }
  }
3 Likes

I just stumbled on this, and it worked for me after I wasted half a day trying other things.
Thank you.

Two years later… worked for me too. I was missing the “applications” key. Thank you !