GET chrome-extension://<chrome extension path>/<html file> net::ERR_BLOCKED_BY_CLIENT (anonymous) @ <back>.js:1

Viewed 216

When I try to inject an html file using .insertAdjacentHTML

fetch(chrome.runtime.getURL('inject.html')).then(r => r.text()).then(html => {
  document.body.insertAdjacentHTML('beforeend', html);
  // not using innerHTML as it would break js event listeners of the page
});

The console returns "ERR_BLOCKED_BY_CLIENT"

ERR_BLOCKED_BY_CLIENT error message

I have it in web-accessible resources (Manifest version 3)

"web_accessible_resources": [
      {
        "resources": [ "inject.html" ],
        "matches": [ "<all_urls>" ]
      }
    ],

I'm testing it on my own site with a simple text form. I disabled all other chrome extensions and reloaded the page, and still, the error.

Here is a link to the repo:

https://github.com/fishsticks89/Latinizer/tree/main/src

0 Answers
Related