Arne Jenssen
Arne Jenssen

Reputation: 1323

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.

Upvotes: 4

Views: 11897

Answers (3)

Antony Sargent
Antony Sargent

Reputation: 872

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".

Upvotes: 1

R. Hill
R. Hill

Reputation: 3620

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.

Upvotes: 1

rhashimoto
rhashimoto

Reputation: 15859

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.

Upvotes: 10

Related Questions