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

前端 未结 3 1047
走了就别回头了
走了就别回头了 2021-01-13 12:34

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

Packa

相关标签:
3条回答
  • 2021-01-13 12:54

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

    0 讨论(0)
  • 2021-01-13 12:58

    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.

    0 讨论(0)
  • 2021-01-13 13:03

    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.

    0 讨论(0)
提交回复
热议问题