【问题标题】:ManifestV3: "invalid value for web_accessible_resources" or "resources must be listed" errorsManifestV3:“web_accessible_resources 的无效值”或“必须列出资源”错误
【发布时间】:2022-12-02 18:44:49
【问题描述】:

This is my first attempt writing a Chrome extension. I added \"web_accessible_resources\": [\"images/icon.png\"] to manifest.json because I wanted to access the image from content script. After adding this line, I got the error \"Invalid value for \'web_accessible_resources[0]\'. Could not load manifest.\" I have checked to make sure the file path is correct, where else could I be wrong? Any help is appreciated.

{
    \"name\": \"Bookmark Checker\",
    \"version\": \"1.0\",
    \"manifest_version\": 3,
    \"permissions\": [
        \"bookmarks\",
        \"activeTab\"
    ],
    \"background\": {
        \"service_worker\": \"background.js\"
    },
    \"content_scripts\": [
        {
            \"matches\":[\"https://www.google.com/search?*\"],
            \"js\": [\"content/content.js\"]
        }
    ],
    ...
    \"web_accessible_resources\": [\"images/icon.png\"]
}

    标签: json google-chrome-extension


    【解决方案1】:
    猜你喜欢
    • 1970-01-01
    • 2023-03-14
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2016-05-13
    • 2022-10-17
    • 1970-01-01
    • 2019-03-11
    相关资源
    最近更新 更多