I'm getting "Could not read source map for chrome-error://chromewebdata/:" When attempting to run my Flutter app on Chrome

19.4k views Asked by At

Here is the full error:

Could not read source map for chrome-error://chromewebdata/: Unexpected 503 response from chrome-error://chromewebdata/neterror.rollup.js.map: Unsupported protocol "chrome-error:"

I have tried clearing browsing data as suggested online but I can't seem to find any other guidance. Help much appreciated.

Expected

I was expecting for the app to launch in Chrome.

3

There are 3 answers

0
Lorenzo Delana On BEST ANSWER

Got the same in a react app upgraded to use vite ( you can get skeleton by yarn create vite repro -- --template react-ts )

The problem was because in my older app I missed index.html file that in turn contains the reference to the module "/src/index.tsx".

1
Sinos Gray On

try to run npm start in terminal

then start debugging f5 in vscode

0
Stephen Patton On

Thank you Sinos Gray! Once I saw this, I realized all I needed to do was to add a preLaunchTask setting to the configuration in launch.json:

{
  "version": "0.2.0",
  "configurations": [
    {
      "preLaunchTask": "npm: start",
    },
  ]
}

Now it runs via run (F5)

Hope this helps!!! :)