I get this error:
extensions::lastError:133 Unchecked runtime.lastError while running tabs.executeScript: Cannot access contents of url "data:text/html,chromewebdata". Extension manifest must request permission to access this host.
I get this error after turning off the Internet so that I can take action when the page loading failed (due to heavy load) or on the Internet.
I checked all such questions and almost the same , but still could not get it to work. Another very similar one with the comment that Chrome does not allow capturing internal pages
My permissions are as follows:
"permissions": [ "tabs","unlimitedStorage", "notifications", "history", "activeTab", "storage", "webRequest", "webRequestBlocking", "*://*/*", "http://*/*", "https://*/*" ],
I get an error when running this code:
chrome.tabs.executeScript(null, {file: "showbacklink.js"});
or
chrome.tabs.executeScript(details.tabId, {file: "showbacklink.js"});
where details.tabId is the active tab.
What am I missing?
Edited manifest. json
{ "name": "", "options_page": "options.html", "description": "", "version": "1.0", "icons": { "16": "icons/logo16.png", "48": "icons/logo48.png", "128": "icons/logo128.png" }, "permissions": [ "tabs","unlimitedStorage", "notifications", "history", "activeTab", "storage", "webRequest", "webRequestBlocking", "http://*/*", "https://*/*" ], "background": { "scripts": [ "showbacklink.js", "client_server_common.js", "common.js", "background.js" ], "persistent": true }, "content_security_policy": "script-src 'self'; object-src 'self'", "manifest_version": 2, "content_scripts": [ { "run_at": "document_end", "all_frames": true, "matches": ["https://*/*"], "css": [//REMOVED], "js": [ //other files REMOVED "myscript.js", ] }, ], "web_accessible_resources": [ //REMOVED ] }