Missing manifest.json when loading Firefox add-on in AMO

I cannot download the firefox extension using the form provided by mozilla . I constantly get the error message Your add-on failed validation with 2 errors. No install.rdf or manifest.json foundAdd-on missing manifest Your add-on failed validation with 2 errors. No install.rdf or manifest.json foundAdd-on missing manifest , which is very misleading, because my application has a .json manifest.

The manifest.json file is as follows:

 { "manifest_version": 2, "version": 1.0, "name": "my-extension-name", "description": "Lorem ipsum dolor sit amet", "background": { "scripts": ["js/background.js"] }, "main": "popup.js", "browser_action": { "default_icon": "img/icon_grey.png", "default_popup": "popup.html", "default_title": "loremipsum" }, "engines": { "firefox": ">=38.0a1" }, "permissions": [ "activeTab", "tabs", "background", "http://*/*", "https://*/*", "notifications", "alarms", "storage", "webRequest", "webRequestBlocking", "clipboardRead" ] } 

What is missing for this?

+6
source share
4 answers

As I found a solution to my problem and would like to share it for a future reference, I answer my question:

The problem was that I did not use the web-ext command-line tool to create the .zip / .xpi package. I was able to solve the problem by installing web-ext and using web-ext build to create the extension. The result of this operation is a .xpi file containing the project, which I then could upload to the AMO service. Note that manifest.json in the newly created package is identical to manifest.json , which I originally provided. However, in addition to manifest.json , the META-INF directory was created, which contains the files mozilla.mf , mozilla.rsa and mozilla.sf .

This, however, did not completely solve my problem. After loading the extension in AMO, it cannot be installed and is said to be damaged. Apparently this is what I read somewhere on interwebz (and forgot the source code), Mozilla opens the .zip / .xpi package, which is downloaded to test it, and since my package was not signed, Mozilla was unable to provide it integrity and mark it as untrustworthy (i.e. damaged).

To solve the second problem, I had to sign the extension. This can be done using the following command:

web-ext sign --api-secret YOUR_API_SECTER --api-key YOUR_API_KEY

After that, I was able to download and install the extension.

+1
source

I ran into the same problem, but all of these instructions did not solve it. I always did this to pack the entire folder, so manifest.json was not at the first level when unpacked.

SOLUTION FOR ME

Select all the files, not the folder, and then pack them as one .zip file and it should work. At least that was for me.

Here is a link to the MDN Documentation .

+16
source

When you open the zip file of the addon package, the manifest.json file must be visible to you in order to upload it to AMO.

In your case, it looks like when you open your zip package, there is a folder and there is manifest.json inside this folder.

+1
source

For the same issue, the problem was that the file name is case sensitive:

Manifest.jason → error, manifest not found manifest.json → susscessful

0
source

Source: https://habr.com/ru/post/1012959/


All Articles