Google Chrome Failed parsing SourceMap : css.map (Web Essential)
Problem is that WebEssentials saves files in UTF8 with BOM
, but Chrome is not able to open these files as .map
files.
As a temporary fix, you can go to your .map
file in Visual Studio and save it as a Unicode
(UTF-8 without signature) or US-ASCII
using
File -> Advanced Save Options -> Unicode (UTF-8 without signature) or US-ASCII.
It is possible that on changing the associated .css
file you will have to repeat this process. However, when I tested adding some rules to .css
the correct format was preserved for the .map
file.
I reported this on WebEssentials GitHub:
Issue 1993
And there are some other reports:
- Issue 1994
- Issue 1977
ESRI : Failed to parse source map
Chrome recently added support for source maps in the developer tools. If you go under settings on the chrome developer toolbar you can see the following two options:
If you disable those two options, and refresh the browser, it should no longer ask for source maps.
These settings can be found here:
How to suppress Chrome DevTools warning: 'DevTools failed to load SourceMap: Could not load content for...'
In DevTools (F12) -> Settings (F1) :
Disable both "enable JS source maps" and "enable CSS source maps" in "Preferences -> Sources"
Error message DevTools failed to load SourceMap: Could not load content for chrome-extension://...
That's because Chrome added support for source maps.
Go to the developer tools (F12 in the browser), then select the three dots in the upper right corner, and go to Settings.
Then, look for Sources, and disable the options:
- "Enable JavaScript source maps"
- "Enable CSS source maps"
If you do that, that would get rid of the warnings. It has nothing to do with your code. Check the developer tools in other pages and you will see the same warning.
DevTools failed to parse SourceMap error after login will redirect to that js file
I found that one solution is created a dummy file at public/js/popper.js.map
, then it will back to normal, basically just fulfil what browser developer tool required, it will not redirect to that specific file.
I believe this is browser developer tools behaviour.
I received solution from the laraStart repo owner.
This error happens when you have an error and compile your javascript
code. Later, when you fix it, it will remain in cache and happens.
Please try to compile your script again and login to see.
The solution is also working as well.
I run npm update
and npm run dev
, it is working fine.
DevTools failed to parse SourceMap: chrome-extension
I had this problem with the LastPass browser extension. I proved my theory by disabling LastPass and reloading the site in question - the warnings were gone!
I really didn't want to disable the JavaScript and CSS source maps so I have made the following change below:
Pending an update from the LastPass that addresses the issue, I have temporarily fixed this by changing one of the settings in the Extension settings for LastPass.
I had this setting previously set to On all sites, which was injecting the LastPass code on all sites blindly. With this change you need to right click on the Username/Password box to enable last pass, but on the plus side there are no warnings in the console anymore.
I consider this a temporary workaround until either Google or LastPass fix the issue.
EDIT: There is also a checkbox in the settings dialogue for the Console tab itself called Selected context only. Ticking this will remove the warnings and errors from Chrome extensions. Note this setting is not persisted - you'll have to click it each time you open the Dev Tools.
How can I fix the DevTools failed to load SourceMap: Could not load content error when adding a JavaScript library?
Newer files on JsDelivr get the sourcemap added automatically to the end of them. This is fine and doesn't throw any SourceMap-related notice in the console as long as you load the files from JsDelivr.
The problem occurs only when you copy and then load these files from your own server. In order to fix this for locally loaded files, simply remove the last line in the JavaScript file(s) downloaded from JsDelivr.
It should look something like this:
//# sourceMappingURL=/sm/64bec5fd901c75766b1ade899155ce5e1c28413a4707f0120043b96f4a3d8f80.map
As you can see, it's commented out, but Chrome still parses it.
Related Topics
CSS Is Not Working in My Angular Component
Flex-Wrap Not Working as Expected in Safari
Fix CSS <!--[If Lt Ie 8]> in Ie
Svg @Font-Face Works in Svg But Not When Included in a Page
CSS Hover on a Div, But Not If Hover on His Children
ASP.NET MVC CSSrewriteurltransform Multiple Arguments
Evenly Distribute Images Vertically Within Fixed-Height Space
CSS White Space at Bottom of Page Despite Having Both Min-Height and Height Tag
Alternating Row Colors in Bootstrap 3 - No Table
CSS Width and Max-Width Combined
Css: Flex Box Not Printing All Pages on Firefox
Change Justify-Content Value When Flex Items Overflow Container
How to Use SASS Inside a Polymer Component
Styling of Select2 Dropdown Select Boxes
How to Align Youtube Embedded Video in the Center in Bootstrap