Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Missing manifest.json when uploading Firefox Add-on to AMO

I'm unable to upload my firefox extension using the form provided by mozilla. I'm constantly getting the error 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 manifest.json.

The manifest.json looks like this:

{
"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 to work?

like image 245
user7259296 Avatar asked Dec 06 '16 21:12

user7259296


People also ask

Where is Firefox manifest json?

There is an easier way, go to about:debugging , and press button This Firefox, and look up for your extension in Extensions tab, then just find below extension - Manifest URL and open link that will be around it. Save this answer.

Where is the manifest json?

The manifest file can have any name, but is commonly named manifest. json and served from the root (your website's top-level directory). The specification suggests the extension should be . webmanifest , but browsers also support .

Do I need a manifest JSON file?

The manifest. json file is the only file that every extension using WebExtension APIs must contain. Using manifest.

What is build manifest json?

The manifest. json file specifies how to launch your application. Optionally, you can include the runtime version and other parameters. manifest.json Syntax.


3 Answers

I was running into the same problem but all of these instructions didn't solve it. What i always did was to pack the whole folder, hence the manifest.json was not on the first level, when unpacked.

SOLUTION FOR ME

Select all files, instead of the folder, and then pack them as one .zip file and it should work. At least it did for me.

Here is a link to the MDN Documentation.

like image 125
Oliver Sauter Avatar answered Oct 19 '22 18:10

Oliver Sauter


The very simple answer to this is that its unable to find the manifest in your zip file. This is caused because when you take a file and zip it using the default compressor in windows it takes the file and throws it into a sub folder of the zip file you created...

before compressing

folderYouWantCompressed -FileInFolder.html -Manifest.json

after compressing it will look like this

nameOfZip.zip -folderYouWantCompressed -FileInFolder.html -Manifest.json

but what you want is

nameOfZip.zip -FileInFolder.html -Manifest.json

the reason Oliver Sauter answer works is because when you select all the files within the "folderYouWantCompressed" it compresses without the sub folder meaning you dont run into this problem and it has no problem finding the manifest file.

for what I can tell the "correct answer" seems to be signing the add-on itself and is able to get the manifest file properly, so it does work but just seems like a 3rd party way of doing it (I did not look into it too deeply)

Note: that I originally had my issue solved by looking at Oliver Sauter post I just wanted to make it clear for future people looking at this post.

like image 39
Aidan Avatar answered Oct 19 '22 18:10

Aidan


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

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

like image 25
Andy Avatar answered Oct 19 '22 17:10

Andy