Google Chrome: DevTools failed to load source map: Could not load content for XXX

System error: net::ERR_FILE_NOT_FOUND

Hey guys, how have you been?

Today, we are going to learn how to solve the following error message: DevTools failed to load source map: Could not load content for XXX

To be more specific, here's the complete error message:

DevTools failed to load source map: Could not load content for XXX: System error: net::ERR_FILE_NOT_FOUND

Current environment

Here's the snapshot of the app at the moment.

Here is the current Google Chrome's version

Path: Three vertical dots at the top right -> Help -> About Google Chrome

or via terminal

google-chrome --version

My operating system is `Deepin Os 20.7`

lsb_release -a

My operating system is Deepin OS 20.7.1, a debian-based linux distribution.

You can check yours by running the following command:

lsb_release -a

Introduction

What's Chrome DevTools?

Chrome DevTools is a set of web developer tools built directly into the Google Chrome browser.

When does the error happen?

It happens when we `inspect` Google Chrome in order to use Chrome's console. run rails server and we try to render a view page.

Google Chrome's inspect functionality is available through the CTRL + Shift + C shortcut.

Google Chrome's console can be accessed directly by pressing CTRL + Shift + J.


Solution

1 - Open Google Chrome's developer tools

CTRL + Shift + I

You should be able to see something like this


2 - Settings -> Preferences

You should get something like this


3 - Disable Enable Javascript source maps

The result should be something like this


4 - Disable Enable CSS source maps

The result should be something like this


5 - Check the result

You'll see something like this

Both values need to disabled.


6 - Test it

Reload the page or open Google Chrome again.

google-chrome

You should be able to see something like this. So, no error messages.


7 - Celebrate


Conclusion

That's all for today. I hope this article helped you. We learned how to solve the DevTools failed to load source map: Could not load content for XXX: System error: net::ERR_FILE_NOT_FOUND error message.

Let me know if you need any additional help.