ESRI : Failed to parse source map

JavascriptEsri

Javascript Problem Overview


I am getting this error in the Google chrome developer console.

> Failed to parse SourceMap: > http://localhost:15132/Scripts/_External/igniteui/css/themes/infragistics/infragistics.theme.css.map

How do I fix it?

Javascript Solutions


Solution 1 - Javascript

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:

Chrome Developer Tools Source Maps

If you disable those two options, and refresh the browser, it should no longer ask for source maps.

These settings can be found here:

Chrome Developer Tools Source Maps

Solution 2 - Javascript

While the chosen answer is a good answer to hide the error, it doesn't make the error go away, it's just that you can't see it in the inspector. The other way would be to download the missing map file and put it in the assets/lib directory. So, for example, I was missing angular-route.min.js.map file and I went here https://code.angularjs.org/1.5.3/ (to the correct version of angular) and downloaded the missing file. The error didn't disappear right away, possibly because of caching, but once I went to the actual file in the browser it worked. http://sitename.localhost/assets/lib/angular-route.min.js.map. Now the inspector no longer displays the error even with source maps enabled.

Solution 3 - Javascript

Further to just simply turning off Source Maps in Chrome - I've done a little digging and found that using Web Essentials to create the source maps seems to be the issue.

For whatever reason, if I use an external compiler (Koala) I can successfully create working source maps in Chrome (no errors). Whereas if I use Web Essentials, the source maps fail to parse.

Hope this helps someone.

Solution 4 - Javascript

Source code of CSS/JS we usually minified/compress. Now if we want to debug those minified files then we have to add following line at the end of minified file

/*# sourceMappingURL=bootstrap.min.css.map */

This tells compiler where is source file actually mapped.

In the case of JS its make sense
but in the case of CSS, its actually debugging of SCSS.

To Remove Warning: remove /*# sourceMappingURL=bootstrap.min.css.map */ from the end of minified file, .

Solution 5 - Javascript

I had the same problem because .htaccess has incorrect settings:

>RewriteEngine on
RewriteRule !.(js|gif|jpg|png|css)$ index.php


I solved this by modifying the file: >RewriteEngine on
RewriteRule !.(js|gif|jpg|png|css|eot|svg|ttf|woff|woff2|map)$ index.php

Solution 6 - Javascript

This may sometimes be caused by Chrome extensions you've installed. For example, AdBlock.

Unfortunately the best solution I could find was to disable the offending extension.

Solution 7 - Javascript

When I had this issue the cause was a relative reference to template files when using the ui.bootstrap.modal module.

templateUrl: 'js/templates/modal.html'

This works from a root domain (www.example.com) but when a path is added (www.example.com/path/) the reference breaks. The answer in my case was simply to making the reference absolute (js/ -> /js/).

templateUrl: '/js/templates/modal.html'

Solution 8 - Javascript

The error in the Google DevTools are caused Google extensions.

  1. I clicked on my Google icon in the browser
  2. created a guest profile at the bottom of the popup window.
  3. I then pasted my localhost address and voila!!

No more errors in the console.

Solution 9 - Javascript

For cra/react-scripts 5.0.0 it looks like there is a bug. I had to create a .env file and add the following

GENERATE_SOURCEMAP=false

Note: This is a patch. Once a fix is implemented you will want to remove the line and update to fixed patch version.

Solution 10 - Javascript

Check if you're using some Chrome extension (Night mode or something else). Disable that and see if the 'inject' gone.

Solution 11 - Javascript

I noticed that problem because of AdBlock Extension, I turned off AdBlock extension the issue got resolve.

Attributions

All content for this solution is sourced from the original question on Stackoverflow.

The content on this page is licensed under the Attribution-ShareAlike 4.0 International (CC BY-SA 4.0) license.

Content TypeOriginal AuthorOriginal Content on Stackoverflow
QuestionAhammadaliPKView Question on Stackoverflow
Solution 1 - JavascriptSteropesView Answer on Stackoverflow
Solution 2 - JavascriptChemistView Answer on Stackoverflow
Solution 3 - JavascriptVickyView Answer on Stackoverflow
Solution 4 - JavascriptWasim A.View Answer on Stackoverflow
Solution 5 - JavascriptKas ElvirovView Answer on Stackoverflow
Solution 6 - JavascriptVael VictusView Answer on Stackoverflow
Solution 7 - JavascriptrobstarbuckView Answer on Stackoverflow
Solution 8 - JavascriptRoland Brenevil JrView Answer on Stackoverflow
Solution 9 - JavascriptRoger PerezView Answer on Stackoverflow
Solution 10 - JavascriptBolonhaDevView Answer on Stackoverflow
Solution 11 - JavascriptRakshith R SalianView Answer on Stackoverflow