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

11,274

Solution 1

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.

Solution 2

I had a similar issue today. Solution from rhashimoto didn't work for me.

I develop on Linux, and finally I figured the problem was a file name with a reserved character in it from Windows point of view (":"). I removed the file with the problematic name, re-submitted and it worked all fine.

Incidentally, my zip archive is of the format which is said to cause problem in the above answer, and yet it worked after I fixed the file name problem.

Solution 3

Sometimes this can happen because the extension was created on OS X or Linux, and contains a file whose name is illegal in Windows. See this issue for more details.

The list given in the bug comes from MSDN, which says:

Do not use the following reserved names for the name of a file: CON, PRN, AUX, NUL, COM1, COM2, COM3, COM4, COM5, COM6, COM7, COM8, COM9, LPT1, LPT2, LPT3, LPT4, LPT5, LPT6, LPT7, LPT8, and LPT9. Also avoid these names followed immediately by an extension; for example, NUL.txt is not recommended.

So for instance, on Windows, you cannot have a file named "aux.css" or "aux.html".

Share:
11,274

Related videos on Youtube

Arne Jenssen
Author by

Arne Jenssen

Updated on September 15, 2022

Comments

  • Arne Jenssen
    Arne Jenssen over 1 year

    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.

  • Arne Jenssen
    Arne Jenssen about 11 years
    I really appreciate your explanation. I still haven't been able to make it work in chrome webstore by zip'ing from the containing folder.
  • Andy Groff
    Andy Groff about 11 years
    I had this problem just 20 minutes ago and this fixed it for me. On monday it was working normally. I guess something has changed recently on their end.
  • rhashimoto
    rhashimoto about 11 years
    Darn, I was hoping that was it. I'll tell you what didn't work for me. I had a .js file that had execute permission, but removing it didn't work. I was going to try a different zip utility but succeeded before then. I thought perhaps my zip file was corrupted somehow but unzip -t verified it. I think that's it, will edit if I think of something else. Oh, I do always delete my existing zip file before preparing a new upload.