I am trying to sign a Manifest V3 extension using the web-ext tool. Unfortunately, I am getting contradictory errors related to the background key.
When I use background.scripts I get an error that says I must use background.page and when I switch to background.page I get an error saying I must use background.scripts.
I am using background.scripts as follows.
"background": {
"scripts": ["inspect-background-service-worker.js"],
"persistent": false
}
This results in the following errors.
“/background” must have required property ‘page’
Error: See https://mzl.la/1ZOhoEN (MDN Docs) for more information.manifest.json
“/background” must NOT have additional properties
Error: Your JSON file could not be parsed.“/background” is not a valid key or has invalid extra properties
Error: Your JSON file could not be parsed.
I am using background.page as follows.
"background": {
"page": "background-page.html",
"persistent": false
}
This results in the following errors.
"/background" must have required property 'scripts' Error: See https://mzl.la/1ZOhoEN (MDN Docs) for more information. manifest.json "/background" is not a valid key or has invalid extra properties Error: Your JSON file could not be parsed.
What is going on?
The entire manifest.json file (background.scripts version) is as follows.
{
"manifest_version": 3,
"description": "JAWS Inspect Communication",
"homepage_url": "https://www.tpgi.com/arc-platform/jaws-inspect/",
"name": "JAWSInspect",
"version": "3.1.1",
"action": {
"default_icon": {
"16": "Icons/JAWSInspectIcon-16.png",
"32": "Icons/JAWSInspectIcon-32.png",
"48": "Icons/JAWSInspectIcon-48.png",
"128": "Icons/JAWSInspectIcon-128.png",
"256": "Icons/JAWSInspectIcon-256.png"
},
"default_popup": "inspect-popup.html",
"default_title": "JAWS Inspect"
},
"background": {
"scripts": ["inspect-background-service-worker.js"],
"persistent": false
},
"browser_specific_settings": {
"gecko": {
"id": "ben.key@yekneb.com",
"strict_min_version": "115.0"
}
},
"content_scripts": [
{
"css": [
"inspect-style.css"
],
"js": [
"browser-polyfill.js",
"jquery.js",
"MD5.js",
"inspect-utilities.js",
"toolsupport.js",
"inspect-page.js"
],
"matches": [
"*://*/*"
],
"run_at": "document_start"
}
],
"devtools_page": "inspect-tools.html",
"host_permissions": [
"http://127.0.0.1:42042/*",
"http://*/*",
"https://*/*",
"<all_urls>"
],
"icons": {
"16": "Icons/JAWSInspectIcon-16.png",
"32": "Icons/JAWSInspectIcon-32.png",
"48": "Icons/JAWSInspectIcon-48.png",
"128": "Icons/JAWSInspectIcon-128.png",
"256": "Icons/JAWSInspectIcon-256.png"
},
"options_ui": {
"page": "inspect-options.html",
"open_in_tab": false
},
"permissions": [
"activeTab",
"alarms",
"storage",
"tabs"
]
}