title: Firefox add-ons: how to install my own local add-on (extension) permanently in Firefox?
body: <p>I have my own browser extension with some personal website customizations. Works fine in Chrome, but doesn't work in Firefox. </p>
  
  <p>Unlike Chrome, it seems Firefox can't install unpacked extensions or add-ons. Only in debug mode I can do <code>Load Temporary Add-on</code>, select the folder with my extension, and that works OK. Except that's just temporary.</p>
  
  <p>When I pack the extension by putting the files in a .zip (not within a subdirectory or anything, the archive just directly contains the files) and rename it to .xpi, and then choose <code>Install Add-on from file</code> and select my .xpi, it says:</p>
  
  <blockquote>
    <p>The add-on downloaded from this site could not be installed because it appears to be corrupt. </p>
  </blockquote>
  
  <p>While troubleshooting, I made a minimal dummy extension which doesn't do anything, consisting only of a <code>manifest.json</code> and <code>dummy.js</code> file. Then pack that from the command line using <code>7z a -tzip test.xpi</code> in that directory, which creates my zip file called <code>test.xpi</code> containing the two files. Loading that extension in Firefox give the error above.</p>
  
  <p>For your reference here is my manifest.json:</p>
  
  <pre><code>{
    "manifest_version": 2,
    "name": "Test Extension",
    "version": "1.0",
    "description": "Dummy Text Extension",
    "content_scripts": [
      {
        "matches": [ "*://*/" ],
        "js": ["dummy.js"]
      }
    ]
  }
  </code></pre>
  
  <p>And the content of dummy.js is:</p>
  
  <pre><code>// this file is intentionally left blank
  </code></pre>
  
  <p>Again: works fine in Chrome, works fine in Firefox when loading as temporary add-on in debug mode (i.e. by loading the files, in the open dialog I select the manifest.json file). But loading the .xpi to install this extension permanently results in the "appears to be corrupt" error.</p>
  
  <p>FYI: I'm using the latest versions of Chrome and Firefox on macOS 10.15.5.</p>
  
  <p>For testing purposes, here is the exact <a href="http://www.mediafire.com/file/qs741qmnmuo8psi/test.xpi/file" rel="noreferrer">test.xpi</a> file I created, but packing it manually as decribed above will give the same result.</p>