Failed to load source maps via chromium devtools

The devtools cannot load the source maps, since the URL is wrong. The url refers to localhost. It’s ok, but the context is the localhost of the device. The devtools interpretes it as localhost of this computer where the chromium is running. An inline-source-map may help. Otherwise I get the error message:

DevTools failed to load SourceMap: Could not load content http://localhost/ 
Connection error: net::ERR_CONNECTION_REFUSED

Known solution:
Use inline-source-maps. But this is not yet supported by Angular. You have to use a 3rd lib to extract / modify the webpack to set devtools: 'inline-source-map'. But this is annoying since this 3rd libs are not working in my case and I don’t want to rely to such inofficial tools.

Does anyone have experience with it? Is there a way to set correct URL to this source maps. The device ip. Or another solution for inline-source-maps? …

Some background: I build the Ionic app using Angular (no Ionic CLI, because of quirks in a multi-app repo. Anyway…), also build the APK with Cordova CLI. And debug the device using chrome://inspect/#devices Works fine. But the source-maps. :frowning:


I’m also having this issue, specifically when running Chrome DevTools and inspecting the Android version of my Ionic app. It causes a ton of SourceMap-related warnings in the console, which is annoying. Anyone know of a solution?

Angular v.10
Ionic v.5


Having the same issue. I’m trying to debug an issue where the live reload works fine but I get a white screen when running against an actual build. Lots of:

DevTools failed to load SourceMap: Could not load content for http://localhost/ Connection error: net::ERR_CONNECTION_REFUSED

type errors. Did anyone manage to fix this?

Same for me with Angular 13, Capacitor 3.5 and Ionic 6.