clvrobj / Pinboard-Plus

Pinboard.in Chrome extension, not official.
https://chrome.google.com/webstore/detail/mphdppdgoagghpmmhodmfajjlloijnbd
Other
144 stars 36 forks source link

DevTools failed to load SourceMap #55

Closed alexroper closed 4 years ago

alexroper commented 4 years ago

The Chrome console is reporting these warnings:

DevTools failed to load SourceMap: Could not load content for chrome-extension://mphdppdgoagghpmmhodmfajjlloijnbd/scripts/description.js.map: HTTP error: status code 404, net::ERR_UNKNOWN_URL_SCHEME

DevTools failed to load SourceMap: Could not load content for chrome-extension://mphdppdgoagghpmmhodmfajjlloijnbd/scripts/keywords_suggestions.js.map: HTTP error: status code 404, net::ERR_UNKNOWN_URL_SCHEME

If I load this script chrome-extension://mphdppdgoagghpmmhodmfajjlloijnbd/scripts/description.js, I can see a reference to the sourceMap:

//# sourceMappingURL=description.js.map

But the URL chrome-extension://mphdppdgoagghpmmhodmfajjlloijnbd/scripts/description.js.map returns an error that the file is not found.

Sielik commented 4 years ago

It is chrome or some extension bug. In my case I had to disable the lastPass extension to remove the error. Others say that addBlock make the problem. You may find some more information here: https://superuser.com/questions/1523427/google-chrome-devtools-failed-to-parse-sourcemap-chrome-extension/1524565#1524565

alexroper commented 4 years ago

Well, wether Chrome lets you load a soucemap or not, those files don't seem to be packaged with the extension. They probably shouldn't be since users don't need them.

One possible solution is to create a separate Gulp task. One that's separate from the development workflow and doesn't create sourcemaps. Call it "dist" for example.

Sielik commented 4 years ago

yea, you probably right but in my case the disabled extension resolved the problem. I found so far two extensions which cause this problem: Adblock and LastPass but then can be some other too. Unfortunately to disable extensions is not the best solution especially while you use them.

tverlaan commented 4 years ago

The problem is @Sielik that the errors you got probably were from those extensions. If I disable all my extensions except Pinboard Plus I still get this error. Because this specific extension is causing this issue. My other extensions don't have this issue.