-1

I am trying to create an add-on for firefox which would bypass the server side authentication while logging into a website. However, after creating the zipped .xpi file (containing manifest.json and webrequest.js files), when I try to add it on firefox, I get the error on firefox : The add-on could not be installed because it appears to be corrupt . I have set 'xpinstall.signatures.required' as false on firefox about:config page.attached is the zipped .xpi file created

Kindly advise on what could be the possible issue here

1 Answers1

1

The file you have uploaded has the following content:

FFExtn.js
FFExtn.json

There isnt any manifest.json.

Inside FFExtn.json:

{
    "name": "Webrequest API",
    "version": "1.0",
    "description": "Extension to handle Authentication window",
    "permissions": [
        "webRequest",
        "webRequestBlocking",
        "<all_urls>"
    ],
    "background": {
        "scripts": ["webrequest.js"]
    },
    "manifest_version": 2
}

There isnt any webrequest.js.

Change:
FFExtn.json -> manifest.json
webrequest.js -> FFExtn.js

erosman
  • 7,094
  • 7
  • 27
  • 46
  • the manifest.json file got renamed after creating the .zip file (containing manifest.json and webrequest.js files) and renamed it as .xpi file. How do I rename the .json file as suggested after creating the zip file? – Shashank Shekhar Dec 09 '19 at 08:34
  • Zipping does not rename files. Are you using a script to create it? You can also rename files inside the zip by opening the zip with zipping utility. – erosman Dec 09 '19 at 15:09