gpt4 book ai didi

google-chrome-extension - Chrome 扩展问题(无效 list )

转载 作者:行者123 更新时间:2023-12-02 02:57:12 25 4
gpt4 key购买 nike

我有一个奇怪的错误,我最近向 chrome 网上商店发布了一个 chrome 扩展,该扩展只发布给测试人员,任何尝试安装它的人都会收到以下错误

There was a problem with the download. Please contact the developer or try again later.

Invalid manifest



enter image description here

在我的 list 看起来不错的地方,我可以在开发人员模式下测试扩展 -

我的 list 如下所示
{
"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"
},

关于google-chrome-extension - Chrome 扩展问题(无效 list ),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/48638171/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com