kfir
kfir

Reputation: 820

"Broad host permissions" webstore chrome extension publish error

i try to publish to webstore chrome extension. and in the developer area of chrome i got error. i tried add to my manifest in the premission the "activeTab" but nothing changed.

this is my manifest:

{
    "name": "scan document",
    "version": "1.0",
    "manifest_version": 2,
    "description": "scan document",
    "browser_action": {
        "default_icon": {
            "16": "icon.png"
        }
    },
    "content_scripts": [{
            "matches": ["<all_urls>"],
            "js": ["contentScript.js"],
            "all_frames": true
        }],
    "background": {
        "scripts": ["background.js"]
    },
    "permissions": [
        "nativeMessaging"
    ],
    "optional_permissions": [ 
        "downloads.open",
        "<all_urls>"
    ]
}

this is the error:

Because of the following issue, your extension may require an in-depth review:
- Broad host permissions
Instead of requesting broad host permissions, consider using the activeTab permission, or specify the sites that your extension needs access to. Both options are more secure than allowing full access to an indeterminate number of sites, and they may help minimize review times.

The activeTab permission allows access to a tab in response to an explicit user gesture.

{
...
"permissions": ["activeTab"]
}
If your extension only needs to run on certain sites, simply specify those sites in the extension manifest:
{
...
"permissions": ["https://example.com/*"]
}

what can i do?

Upvotes: 1

Views: 1690

Answers (1)

Florian Callewaert
Florian Callewaert

Reputation: 424

I thinks this error is shown when your extension ask for too general permissions.

In the chrome extension that I currently coding, I had this error because of the matches of my content_scripts :

content_scripts": [
 { 
   "matches": "https://*/*", 
   "js": ["my-script.js"] 
 }
]

I replace https://*/* by https://www.example.com/* to fix it. But the script will be called only on this website.

You have the same error. In your case, this error may be also shown because of the optional_permissions all_url

"optional_permissions": [ 
  "< all_urls>"
]

Upvotes: 1

Related Questions