Warning: file_get_contents(/data/phpspider/zhask/data//catemap/0/amazon-s3/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Google chrome 在firefox中处理清单时出错_Google Chrome_Firefox_Google Chrome Extension_Firefox Addon - Fatal编程技术网

Google chrome 在firefox中处理清单时出错

Google chrome 在firefox中处理清单时出错,google-chrome,firefox,google-chrome-extension,firefox-addon,Google Chrome,Firefox,Google Chrome Extension,Firefox Addon,我开发了一个主要针对chrome的扩展,它可以工作,但现在我也需要该扩展在firefox中工作,所以我通过转到“关于:调试页面和加载临时插件”加载扩展进行了检查。目前,我发现了一个错误。我遇到了类似这样的错误 读取清单:错误处理选项\u页:意外错误 在WebExtension清单中找到属性 读取清单:处理oauth2时出错:意外属性 在WebExtension清单中找到 读取清单:处理密钥时出错:出现意外属性 在WebExtension清单中找到 这是我的清单文件的样子(我删除了选项页面) ma

我开发了一个主要针对chrome的扩展,它可以工作,但现在我也需要该扩展在firefox中工作,所以我通过转到“关于:调试页面和加载临时插件”加载扩展进行了检查。目前,我发现了一个错误。我遇到了类似这样的错误

读取清单:错误处理选项\u页:意外错误 在WebExtension清单中找到属性

读取清单:处理oauth2时出错:意外属性 在WebExtension清单中找到

读取清单:处理密钥时出错:出现意外属性 在WebExtension清单中找到

这是我的清单文件的样子(我删除了选项页面)

manifest.json

{
    "version": "1.0",
    "name": "Browser Extension",
    "manifest_version": 2,
    "description":
        "This extension allow the user to select the text and redirect to the application",
    "page_action": {
        "default_title": "Select Text",
        "default_popup": "index.html"
    },
    "icons": {
        "16": "img/browser16.png",
        "48": "img/browser48.png",
        "128": "img/browser128.png"
    },
    "background": {
        "scripts": ["extension/js/background.js"],
        "persistent": true
    },
    "content_scripts": [
        {
            "matches": [
                "https://mail.google.com/mail/*/*",
                "http://mail.google.com/mail/*/*"
            ],
            "js": ["extension/js/jquery.min.js", "extension/js/content.js"],
            "css": ["extension/css/main.css"],
            "run_at": "document_end"
        }
    ],
    "permissions": [
        "contextMenus",
        "tabs",
        "storage",
        "webNavigation",
        "notifications",
        "cookies",
        "identity",
        "*://mail.google.com/mail/*/*",
        "https://www.googleapis.com/*",
        "https://*.googleusercontent.com/*"
    ],
    "web_accessible_resources": ["img/browser128.png", "img/ios-link.svg"],
    "oauth2": {
        "client_id":
            "114446495690-8ejpdgvmn8vc9pblteupetas.apps.googleusercontent.com",
        "scopes": ["profile", "https://www.googleapis.com/auth/gmail.readonly"]
    },
    "key":
        "MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAnqFjzbt+LtejD1JhOyMUbejOHdLoemzryr+ZQHK2CEKuI0yVVYToFs7eNusH/hfxhnyF27G4BU8apsTc695EpVQGD0ANKdt6BjubRnA/4VcdkmfdD3D9nsdCc+fHkINRU5e05grfs/BETWW/JAUULduaNWGfhT7"
}

如何解决上述问题以使其与firefox兼容?

删除“键”,使用“选项”\u ui。至于“oauth2”,它不受支持,还有getAuthToken方法,请参阅。如果我需要使用gmail api,那么它就不能与firefox插件兼容。因为我需要OAuth2作为Gmail API。如果你在这里没有答案,请考虑在BugZILA网站上打开一个问题。谢谢你的建议。当然,我会的