0

I'm developing a browser extension, and for some reason Chrome will not load the source map for the extension's script. This is the specific error:

DevTools failed to load source map: Could not load content for chrome-extension://kjfipmhmjjgociljdeefnicimgmmadei/content/index.js.map: System error: net::ERR_BLOCKED_BY_CLIENT

This is not a duplicate of this question because I'm not using an ad blocker. In fact, I'm not using any extensions except for the web-ext reload manager.

Here are some potentially relevant facts:

  • I'm using Chrome 112.0.5615.86 on Windows 10.
  • Firefox is able to use the same source map without issues.
  • I am using web-ext to build and serve a local copy of my extension on a dedicated browser profile.
  • My build process uses ESBuild and TypeScript.
  • I have source maps enabled.
  • The Chrome build of this extension uses Manifest V3 (builds for some other browsers use V2).
  • The issue occurs even in Incognito Mode.
  • I can click on the URL given by the error message and view the source map in the browser just fine.
  • When I view the minified code in the Sources tab, Chrome gives me a "Source map detected" notice.
  • I was able to use source maps with Chrome last night. I don't know what I changed to break this.
JesseTG
  • 2,025
  • 1
  • 24
  • 48
  • 1
    content/index.js.map must be listed in web_accessible_resources. – wOxxOm Apr 19 '23 at 05:50
  • @wOxxOm I'll be damned, that did it! Thank you. If you post that as a full answer, I'll accept it and give you the rep you deserve. – JesseTG Apr 19 '23 at 15:10

0 Answers0