我正在将现有的 Chrome 扩展程序移植到 Microsoft Edge。当我将它作为 Edge 中的临时扩展加载时,该扩展就可以工作。
现在我想打包并签名。包已成功生成。但是,当我尝试使用 Windows 应用程序认证工具包对其进行签名时,它会失败并出现以下错误:
Edge extension manifest.json
Error Found: The JSON schema validation test detected the following errors:
Validation failed: Data does not match any schemas from "anyOf"
Schema location: /allOf/1/dependencies/background/anyOf
Manifest location:
Validation failed for extension manifest: Extension\manifest.json
Impact if not fixed: Microsoft Edge extensions that violate the Windows Store certification requirements can’t be submitted to the Windows Store.
How to fix: Extension’s manifest.json must include valid entries for all required and specified fields. Please resolve the entries and conflicts above.
我用来打包扩展的命令:
manifoldjs -l debug -p edgeextension -f edgeextension -m EdgeExtension\manifest.json
manifoldjs -l debug -p edgeextension package Test\edgeextension\manifest\
我的清单文件:
{
"author": "Test",
"background": {
"page": "Agent/Ext/bg-loader.html",
"persistent": false
},
"content_scripts": [
{
"matches": [
"<all_urls>"
],
"js": [
"Agent/Content/contentLoader.js"
],
"run_at": "document_start",
"all_frames": true
}
],
"content_security_policy" : "script-src 'self'; object-src 'self'",
"default_locale" : "en",
"description": "Test Web Applications Using Google Chrome",
"name": "Test",
"permissions": [
"nativeMessaging",
"webNavigation",
"webRequest",
"webRequestBlocking",
"tabs",
"cookies",
"browsingData",
"debugger",
"<all_urls>",
"notifications",
"unlimited_storage"
],
"version": "1.0.0.0",
"-ms-preload": {
"backgroundScript": "backgroundScriptsAPIBridge.js",
"contentScript": "contentScriptsAPIBridge.js"
},
"minimum_edge_version" : "33.14281.1000.0"
}