Chrome 扩展问题(无效清单)
Chrome Extension Issue (Invalid Manifest)
我有一个奇怪的错误,我最近向 chrome 网上商店发布了一个 chrome 扩展,该扩展仅发布给测试人员,任何尝试安装它的人都会收到以下错误
There was a problem with the download. Please contact the developer or
try again later.
Invalid manifest
我的清单看起来不错,我可以在开发者模式下测试扩展 -
我的清单如下所示
{
"manifest_version": 2,
"name": "my chrome chrome",
"description": "the Chrome Extension",
"version": "0.1",
"permissions": [
"tabs",
"activeTab",
"http://*/*",
"https://*/*",
"storage",
"webNavigation",
"cookies"
],
"icons": [
{
"128": "app/images/icon-128.png",
"16": "app/images/icon-16.png",
"48": "app/images/icon-48.png"
}
],
"background": {
"scripts": [ "app/js/api.js", "app/js/auth.js", "app/js/shared.js", "app/js/common.js", "background.js" ],
"persistent": false
},
"content_scripts": [
{
"run_at": "document_end",
"matches": [
"https://*/*",
"http://*/*"
],
"js": [ "Scripts/jquery-1.10.2.min.js", "content-script.js" ]
}
],
"browser_action": {
"default_icon": {
"19": "app/images/browser-action-icon-19.png",
"38": "app/images/browser-action-icon-38.png"
}
},
"content_security_policy": "script-src 'self' https://ssl.google-analytics.com; object-src 'self'",
"web_accessible_resources": [
"app/images/icon-128.png",
"popup.html",
"popup.js"
]
}
我做错了什么?
仅供参考,我的浏览器是最新的
这是由于manifest.json
格式不匹配
造成的
Chrome 说:Invalid value for 'icons'
在manifest.json
中只需替换:
"icons": [
{
"128": "app/images/icon-128.png",
"16": "app/images/icon-16.png",
"48": "app/images/icon-48.png"
}
],
至:
"icons":
{
"128": "app/images/icon-128.png",
"16": "app/images/icon-16.png",
"48": "app/images/icon-48.png"
},
我有一个奇怪的错误,我最近向 chrome 网上商店发布了一个 chrome 扩展,该扩展仅发布给测试人员,任何尝试安装它的人都会收到以下错误
There was a problem with the download. Please contact the developer or try again later.
Invalid manifest
我的清单看起来不错,我可以在开发者模式下测试扩展 -
我的清单如下所示
{
"manifest_version": 2,
"name": "my chrome chrome",
"description": "the Chrome Extension",
"version": "0.1",
"permissions": [
"tabs",
"activeTab",
"http://*/*",
"https://*/*",
"storage",
"webNavigation",
"cookies"
],
"icons": [
{
"128": "app/images/icon-128.png",
"16": "app/images/icon-16.png",
"48": "app/images/icon-48.png"
}
],
"background": {
"scripts": [ "app/js/api.js", "app/js/auth.js", "app/js/shared.js", "app/js/common.js", "background.js" ],
"persistent": false
},
"content_scripts": [
{
"run_at": "document_end",
"matches": [
"https://*/*",
"http://*/*"
],
"js": [ "Scripts/jquery-1.10.2.min.js", "content-script.js" ]
}
],
"browser_action": {
"default_icon": {
"19": "app/images/browser-action-icon-19.png",
"38": "app/images/browser-action-icon-38.png"
}
},
"content_security_policy": "script-src 'self' https://ssl.google-analytics.com; object-src 'self'",
"web_accessible_resources": [
"app/images/icon-128.png",
"popup.html",
"popup.js"
]
}
我做错了什么?
仅供参考,我的浏览器是最新的
这是由于manifest.json
格式不匹配
Chrome 说:Invalid value for 'icons'
在manifest.json
中只需替换:
"icons": [
{
"128": "app/images/icon-128.png",
"16": "app/images/icon-16.png",
"48": "app/images/icon-48.png"
}
],
至:
"icons":
{
"128": "app/images/icon-128.png",
"16": "app/images/icon-16.png",
"48": "app/images/icon-48.png"
},