Chrome扩展程序 - 无效的软件包。详细信息:无法解压缩扩展名 [英] Chrome Extension - Invalid Package. Details:Can't unzip the extension

查看:3261
本文介绍了Chrome扩展程序 - 无效的软件包。详细信息:无法解压缩扩展名的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我使用chrome扩展并将其上传到chrome webstore,并且一切都很顺利,我将它安装在我的Mac和我的Ubuntu机器上,工作正常并且安装。但是,当我在Windows机器上尝试它时,下载它弹出一个错误消息,说无效的包,无法解压扩展名。



任何人都可以告诉我为什么或者什么可能是这个操作系统特定问题的原因。这与权限有关或与文件夹名称或内容有关吗?文件夹名称或扩展名没有任何特殊字符,并且以前的版本没有问题。



预先感谢。

无法解压缩扩展名)可能是因为您在zip中包含了根目录。解决方案

您应该将相同级别的manifest.json中的所有文件压缩。

示例

  -yourappfolder 
| _manifest.js
| _popup.html

在这种情况下,您应该只压缩 manifest.js popup.html ,而不是zip整个目录 yourappfolder



换句话说,在你的zip文件中,你应该 请参阅 yourappfolder 目录。

I worked on a chrome extension and uploaded it to chrome webstore and everything went well, I installed it on my Mac and on my Ubuntu machines in chrome it worked fine and installed. But when I try it on Windows machines, after download it popups a error message saying "Invalid Package, Can't unzip the extension".

Can any one tell me why or what might be the cause for this OS specific issue. Does it have anything to do with the permission or anything with respective folder name or content? The folder name or the extension name don't have any special characters and the previous version was fine.

Thanks in advance.

解决方案

Another cause of this problem (Error: could not unzip extension) might be that you include the root directory in your zip. You should zip all files in the same level of manifest.json.

Example

-yourappfolder
   |_manifest.js
   |_popup.html

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

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

这篇关于Chrome扩展程序 - 无效的软件包。详细信息:无法解压缩扩展名的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆