简体   繁体   English

安装Chrome扩展程序时,“清单文件无效”?

[英]`Manifest file is invalid` when installing my chrome extension?

This is my manifest.json 这是我的manifest.json

{

  "name": "Environment Quick Switch",

  "version": "1.0",

  "description": "Quick switch around develop environments.",

  "browser_action": {

    "default_icon": "icon.png",
    "popup": "action.html"

  },

  "permissions": [

    "tabs", "http://*/*", "https://*/*"

  ]

}

I load it's folder in develop mode is OK, but after I packaged it and try to install the .crx file, comes the Manifest file is invalid problem . 我在开发模式下加载它的文件夹是可以的,但是打包并尝试安装.crx文件后,出现Manifest file is invalid问题。

Is anyone knows how to deal with this? 有人知道如何处理吗?

I got this error too when I updated my extension. 更新扩展程序时也出现了此错误。 I think it happens sometimes when your extension is propagating to various servers. 我认为有时会在您的扩展扩展到各种服务器时发生。 I came and looked at this thread and then went back to the store and tried again and it was fine. 我来看看这个线程,然后回到商店再次尝试,一切都很好。

我终于解决了这个问题,这仅仅是因为我的开发文件夹的路径包含汉字,将其移动到英文路径可以解决此问题。

I had the same problem. 我有同样的问题。 The zip-file was accepted in the developer dashboard, but I got an error message saying that my manifest-file was invalid when installing from the webstore. 该zip文件已在开发人员仪表板中接受,但我收到一条错误消息,说从网上商店安装时我的清单文件无效。

No Chineese characters on my end, it seemed like the problem was with character encoding. 我没有中文字符,看来问题出在字符编码上。

I saved the manifest.json-file as ANSI - not UTF8 - and the package was accepted by the chrome webstore. 我将manifest.json文件另存为ANSI,而不是UTF8,并且该包已被chrome网站商店接受。

I got this error too , I think maybe your resources under a SkyDrive folder or some team code Management soft folder . 我也收到了此错误,我想您的资源可能位于SkyDrive文件夹或某些团队代码管理软文件夹下。 Try to copy the resources to another path, such as desktop. 尝试将资源复制到另一个路径,例如桌面。 package your plugin with the new path , then your may success ! 用新路径打包您的插件,那么您可能会成功!

I just had this problem with a version number. 我刚遇到版本号问题。 forgetting to prefix my pre-1.0 release with a 0 as in "0.95" allowed it to upload and pass to publish, but fail to install. 忘了在我的1.0之前版本之前加上“ 0.95”中的0作为前缀,允许它上载并传递到发布,但无法安装。

In summary: ".95" bad, "0.95" good 总结:“。95”不好,“ 0.95”好

My mistake for forgetting to install locally (was a migration), but still should probably be caught by the uploader. 我忘记在本地安装的错误(是迁移),但仍然应该由上传者发现。

For anyone having issues with this 对于任何对此有疑问的人

To find the error in the manifest file I did the following: 为了在清单文件中找到错误,我执行了以下操作:

  1. went into the new developer dashboard 进入新的开发人员仪表板
  2. clicked on the "package" section where you can upload a new package 点击“包”部分,您可以在其中上传新包
  3. clicked the CRX File main.crx download link for the Published package. 单击“发布包”的CRX文件main.crx下载链接。

The site then gives a path for the error in an error message in the top of the page. 然后,该站点在页面顶部的错误消息中提供错误的路径。

My error was in the exclude_matches list, i had an excluded path with invalid match syntax. 我的错误是在exclude_matches列表中,我有一个具有无效匹配语法的排除路径。 The index in the exclude_matches part of the error message showed which entry that had errors ( exclud_matches[1] , 0-indexed, so second entry had an error). 错误消息的exclude_matches部分中的索引显示哪个条目有错误( exclud_matches [1] ,索引为0,因此第二个条目有错误)。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM