Chrome extension is not a valid package. Details: Unable to unzip extension

I worked on the chrome extension and uploaded it to the chrome webstore, and everything went well, I installed it on my Mac, and on my Ubuntu machines, Chrome worked fine and installed. But when I run it on Windows computers, after loading, I get a pop-up error message "Invalid package, cannot unzip extension."

Can someone tell me why or what could be causing this particular OS problem. Does this have anything to do with permission or anything with the corresponding name or content of the folder? The folder name or extension name does not have special characters, and the previous version was fine.

Thanks in advance.

+8
google-chrome google-chrome-extension chrome-web-store
source share
7 answers

This is because there is a file with an invalid Windows character or a damaged file inside the package. In my case, I tried to download the CouponsHelper extension, and this error was also displayed.

I downloaded the CRX file manually and opened it with 7Zip. In the folder was a file called Icon. When I try to extract using 7Zip, an error also occurs.

Pay attention to the screenshot in which there is an invalid char in the icon file and that it is equal to zero (possibly damaged).

Screenshot of 7Zip

+5
source share

Another cause of this problem (Error: cannot extract the extension ) may be that you include the root directory in your zip code. You must archive all files at the same manifest.json level.

Example

-yourappfolder |_manifest.js |_popup.html 

In this case, you should popup.html only manifest.js and popup.html instead of the zip of the entire yourappfolder directory.

In other words, in your zip file you should NOT see the yourappfolder directory.

+5
source share

So, the trick is to compress all the files in the folder, not the folder itself.

NOTE. If it is stored on Google Drive (local synchronization), this will also ruin it. The drive attaches small icons to folders that appear as unknown.

So, redo the folder outside of Google Drive. This is what was useless after fixing "only compression inside the folder."

+2
source share

I had the same problem, but the reason was different.

I found that there is an image with a long name. When I replaced the name with a shorter one and built a new package, it was successfully installed.

I hope this helps someone to face the same problem.

+1
source share

Fast Google only came up with one possible useful result , but I was not sure if that would help.

Is this error message exactly what you see (i.e. word for word)? I could not find it in the code.

Maybe I'm wrong, but I think it could be the code responsible for the error. Unfortunately, calling zip :: Unzip may not work for several reasons and provides more detailed information in the logs. I assume that the output of such logs to this place (Windows XP);

 %USERPROFILE%\Local Settings\Application Data\Google\Chrome\Application\debug.log 

None of this data can be useful to you, but I thought I would show you my investigation :)

Have you tried installing the extension again and you have administrator rights (not sure if this will have an effect here)?

0
source share

I had the same problem, but it rejected it because either the file was too large or too long (Windows ...), because I accidentally included the entire node_modules directory in the .crx file.

0
source share

I had a similar problem. My solution was:

  • unpack the CRX into a directory ... let's say it's called freddy123

  • Rename "_ manifest" to "manifest" .. i. remove the underline.

  • Chrome-> settings-> Additional tools-> Extensions (check the box "Check development mode")
  • Download Unpacked extension (select freddy123 directory)

It worked for me.

-one
source share

All Articles