Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Permission '<all_urls>' is unknown or URL pattern is malformed

I am new to the extension development
I have tried with permissions url as "<all_urls> "*" "http://*/*", "https://*/*" None of the pattern is working

Full manifest:

{
  "name": "Info",
  "description": "BS System Info",
  "version": "1.0",
  "manifest_version": 3,
  "background": {
    "service_worker": "background.js"
  },
  "content_scripts": [{
    "js": ["script.js"],
    "matches": ["http://*/*","https://*/*","<all_urls>"],
    "css" : []
}],
  "permissions": [
    "storage",
    "activeTab",
    "system.cpu",
    "system.memory",
    "system.storage",
    "system.display",
    "tabs",
    "scripting",
    "http://*/*", "https://*/*", "chrome-devtools://*/*"
],
  "action": {
    "default_popup": "index.html",
    "default_icon": {
        "16": "/images/icon_16.png",
        "32": "/images/icon_32.png",
        "48": "/images/icon_48.png",
        "128":"/images/icon_128.png"
      }
  }
}
like image 520
Rajan Gunasekaran Avatar asked Mar 29 '21 08:03

Rajan Gunasekaran


1 Answers

Site/URL permissions in ManifestV3 use a separate key: host_permissions

  "host_permissions": [
    "*://*.example.org/"
  ],
  "permissions": [
    "storage"
  ],

More info in the official migration guide, make sure to study it.

like image 121
wOxxOm Avatar answered Nov 20 '22 15:11

wOxxOm