Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Developer Chrome extension: Package is invalid. Details: "Could not uzip extension'

I have developed a chrome extension. I made some small updates, and suddely the extension can't be installed through chrome web-store. I get the error

Package is in valid. Details: 'Could not unzip extension'

enter image description here

It appears that there is something wrong with the zip file. As far as i understand when uploading a zip file to chrome web store, it gets encrypted to a crx-file. Could it be a hiccup happening there?

When installing the the extension locally through 'load unpackaged extension' or with dragging a crx file it works fine. So there is nothing wrong with the manifest. I've also checked for invalid filenames. I even created a version with all files stripped away.

I tried the solutions from this SE post as well.

What surprises me is that i can find no support from google on chrome extension. No email or anything i can contact for help.

Any help is appreciated.

like image 499
Arne Jenssen Avatar asked Dec 15 '22 13:12

Arne Jenssen


1 Answers

I had this same problem just yesterday. What apparently fixed it for me (I tried a lot of things, probably did all the same web searches as you) was zipping the files at top level and not zipping the directory that contains them. That is, the zip listing looks like this:

$ unzip -l extension.zip 
Archive:  extension.zip
  Length     Date   Time    Name
 --------    ----   ----    ----
     659  03-05-13 14:12   manifest.json
...

And not like this:

$ unzip -l extension.zip 
Archive:  extension.zip
  Length     Date   Time    Name
 --------    ----   ----    ----
        0  03-05-13 15:41   extension/
      641  03-05-13 15:41   extension/manifest.json
...

Even though I swear the latter packaging worked for me earlier.

like image 75
rhashimoto Avatar answered Feb 16 '23 02:02

rhashimoto