将Chrome扩展程序上传到Chrome网上应用店时,“清单文件无效”

时间:2022-04-19 18:55:19

I have been developing a chrome extension locally. I just finished it and wanted to upload it to the Chrome Web Store. When I uploaded it and it told me:

我一直在本地开发chrome扩展。我刚刚完成它并希望将其上传到Chrome网上应用店。当我上传它并告诉我:

An error occurred: Invalid manifest. If your manifest includes comments, please remove them as our gallery does not support them yet.

I checked the JSON to make sure it it was valid and as far as I can tell it is fully valid. I tried naming it differently and uploading it and it still didn't work. I also tried changing the encoding and that did not work. The Manifest is below

我检查了JSON以确保它是有效的,据我所知,它是完全有效的。我尝试以不同的方式命名并上传它仍然无法正常工作。我也试过改变编码,但没有用。清单在下面

{
    "name": "Name",
    "version": "0.0.0.0.1",
    "manifest_version": 2,
    "description": "Description",
    "browser_action": {
        "default_icon": "icon.png",
        "default_popup": "popup.html"
    },
    "icons": { "128": "icon.png"},
    "permissions": [
        "tabs",
        "http://*/*",
        "webNavigation",
        "history",
        "storage"
    ],
    "content_scripts": [{
        "matches": ["http://*/*", "https://*/*"],
        "js": ["js/jquery.min.js", "js/tab.js"]
    }],
    "background": {
        "page": "background.html"
    }
}

Does any one have any clue what the problem is? It is really frustrating to get this after finally finishing the extension.

有没有人知道问题是什么?在最终完成扩展后得到这个真的很令人沮丧。

2 个解决方案

#1


5  

Used your manifest.json, got this error.

使用你的manifest.json,得到了这个错误。

Could not load extension from '/Users/jjperezaguinaga/samples/ext'. Required value 'version' is missing or invalid. It must be between 1-4 dot-separated integers each between 0 and 65536.

无法从'/ Users / jjperezaguinaga / samples / ext'加载扩展程序。必需值“版本”缺失或无效。它必须在1-4个点分隔的整数之间,每个整数在0到65536之间。

I removed some 0's from your version and I was able to load it.

我从你的版本中删除了一些0,我可以加载它。

#2


0  

replace

"version": "0.0.0.0.1"

with

"version": "1.0"

#1


5  

Used your manifest.json, got this error.

使用你的manifest.json,得到了这个错误。

Could not load extension from '/Users/jjperezaguinaga/samples/ext'. Required value 'version' is missing or invalid. It must be between 1-4 dot-separated integers each between 0 and 65536.

无法从'/ Users / jjperezaguinaga / samples / ext'加载扩展程序。必需值“版本”缺失或无效。它必须在1-4个点分隔的整数之间,每个整数在0到65536之间。

I removed some 0's from your version and I was able to load it.

我从你的版本中删除了一些0,我可以加载它。

#2


0  

replace

"version": "0.0.0.0.1"

with

"version": "1.0"