欢迎各位兄弟 发布技术文章

这里的技术是共享的

You are here

jquery-migrate.min.map 404 and jquery.min.map 404 (Not Found) Trackers Items

shiping1 的头像
 

Dodge: disable sourcemaps

Instead of getting the files, you can alternatively disable JavaScript source maps completely for now, in your settings. This is a fine choice if you never plan on debugging JavaScript on this page. Use the cog icon in the bottom right of the DevTools, to open settings, then: enter image description here

来自 http://stackoverflow.com/questions/18365315/jquerys-jquery-1-10-2-min-map-is-triggering-a-404-not-found

 

How to Resolve the 404 (Not Found) "jquery-migrate.min.map" and "sprite.png" Console Errors:

 
0
 

If you see something like the image below in your console, you're not alone. Even with a clean install of Bonitasoft 6.5.1 (the latest version atm), you may be presented with these errors. The missing "jquery-migrate.min.map" file is not an actual error (more on this later). The missing "sprite.png" image is an actual error that Bonitasoft will need to correct in a future update. These errors will not cause Bonita BPM to malfunction, but they are an eye sore for developers who are debugging JavaScript.

console_errors_zpsvu8b6k4g.png

404 (Not Found) "jquery-migrate.min.map" Solution:

I'll start by saying that this error may only arise in Chrome. My instructions are Chrome specific. So if you're a fellow Chrome user, then read on. If you're using a different browser then this guide should at least point you to the right direction.

Step 1:
Run your process from the Bonita BPM Studio

Step 2:
Open Chrome Dev Tools by clicking F12 on your keyboard

Step 3:
Click the settings button on the top right (cog icon)

click_cog_zpsvnmuieuc.png

Step 4:
Uncheck the "Enable JavaScript source maps" option

uncheck_js_map_zpsrimpxcpy.png

Step 5:
Reload the page or run the process again

404 (Not Found) "sprite.png" Solution:

Before starting, make sure you have the Bonita BPM Studio running. Also note that my instructions are Chrome specific. So if you're a fellow Chrome user, then read on. If you're using a different browser then this guide should at least point you to the right direction.

Step 1:
Download "sprite.png" from http://svn.bonitasoft.org/bonita-console/branches/bonita-console-5.2.1/f...

Step 2:
Open one of your Bonita BPM Studio diagrams (or create a new one)

Step 3:
In the Bonita BPM Studio, click on the pool of your workflow

Step 4:
Click on the Application Tab and then click on the Resources Option. You'll see the resources file structure with the options to add a folder or file.

application_resources_zps8van9uat.png

Step 5:
Click the arrow icon next to the Resources/applications folder. Then click on the images folder. Then click the "Add file..." button.

add_file_zpsm1xudi8w.png

Step 6:
Locate "sprite.png" and add it.

Step 7:

Navigate to the Resources/application/css folder. Select the "bonita_form_default.css" file and click the "Edit" button. An editor will open in a new tab.

edit_css_zpswtnj7a02.png

Step 8:
Locate the ".bonita_user_xp_icon" class. Update the ".bonita_user_xp_icon" class background url from "../themeResource?theme=portal&location=images/sprite.png" to "../images/sprite.png". Save the file.

sprite_location_zpsgk10tv1a.png

sprite_css_update_zpsjt2fb2iu.png

Step 9:
Run your process.

Step 10:
After Chrome opens, click the F12 key on your keyboard. The "sprite.png" 404 (Not Found) error should no longer appear in your console log.

I hope this helps. If I've missed anything or if my instructions are unclear, feel free to comment and I'll do my best to make corrections and comment back when I have the time.

Heath Dinkins
Software Engineer II Contractor at Leidos


来自 http://community.bonitasoft.com/answers/how-resolve-404-not-found-jquery-migrateminmap-and-spritepng-console-errors

 

 

 

Stack Overflow is a question and answer site for professional and enthusiast programmers. It's 100% free, no registration required.
 

I'm seeing error messages about a file, min.map, being not found:

GET jQuery's jquery-1.10.2.min.map is triggering a 404 (Not Found)


Screenshot

enter image description here

Where is this coming from?

shareimprove this question
 
34 
Except that he immediately answered his own question. He was adding a faq to stack overflow, not actually looking for help. –  bronson Jul 24 '14 at 8:40
   
To fix my issue, I didn't follow the details of this answer. My site is only using the js file, not the map. I simply cleared my browser cache to resolve this, and restarted the browser. It started to occur when I started receiving a 500 Internal Server error on an ASP.NET Generic Handler (ExtDirectProxy.ashx) built and passed data to jquery to load the page. stackoverflow.com/questions/26135251/… –  MacGyver Oct 1 '14 at 19:33
   
change the version you need and download it from below url and rename it code.jquery.com/jquery-1.11.1.min.map –  imanabidi Oct 25 '14 at 7:00
up vote1145down voteaccepted

正确答案  If Chrome DevTools is reporting a 404 for a .map file (maybe jquery-1.10.2.min.mapjquery.min.map or jquery-2.0.3.min.map, but can happen with anything) first thing to know is this is only requested when using the DevTools. Your users will not be hitting this 404.

Now you can fix this or disable the sourcemap functionality.

Fix: get the files

Next, it's an easy fix. Head to http://jquery.com/download/ and click the Download the map file link for your version, and you'll want the uncompressed file downloaded as well.

enter image description here

Having the map file in place allows you do debug your minified jQuery via the original sources, which will save a lot of time and frustration if you don't like dealing with variable names like a and c.

More about sourcemaps here: An Introduction to JavaScript Source Maps

Dodge: disable sourcemaps

Instead of getting the files, you can alternatively disable JavaScript source maps completely for now, in your settings. This is a fine choice if you never plan on debugging JavaScript on this page. Use the cog icon in the bottom right of the DevTools, to open settings, then: enter image description here

shareimprove this answer
 
8 
I'm voting for this (even though you answered your own question) because for the first time ever I noticed it today. It was driving me a bit crazy trying to figure it out, then I noticed the same 404 error on 2 sites I was working on and the 'enable source maps' option came to mind...that's what I get for watching your dev tools talks and turning everything on at once. I'll go over the docs you provided. –  adam-asdf Aug 22 '13 at 7:51
42 
I have two things to add. 1) Downloading a jQuery map file is not enough, you will also need an uncompressed source code (otherwise you'll see an empty jquery-*.js file while debugging). 2) If you are loading jQuery from one of the CDNs then all three files (map, compressed and uncompressed source code) are in the same location and you can start debugging right away. –  Konrad Dzwinel Aug 22 '13 at 7:57
37 
Im not sure a 404 should be raised for this from DevTools, confuses people it seems. Nevertheless at least I now know how to deal with it. Also @adam-asdf just so you know you are actively encouraged to answer your own question on SO...meta.stackexchange.com/questions/17845/… –  Greg Aug 25 '13 at 15:55
9 
I agree with @Greg. Having a 404 error raised in the console for a source map (that was requested on behalf of Chrome/DevTools) doesn't seem very helpful. Especially because many people won't even understand why (or from where) that resource is being requested. –  idbehold Aug 28 '13 at 3:44
6 
@SpYk3HH Is totally fine to accept your own answer and editing 3rd party libraries is not really advisable.. because if you want to update stuff you will forget what was changed. –  Lipis Oct 13 '13 at 23:20
 

You can remove the 404 by removing the line

//@ sourceMappingURL=jquery-1.10.2.min.map

from the top part of your jQuery file.

The top part of the jQuery file will look like this.

/*! jQuery v1.10.2 | (c) 2005, 2013 jQuery Foundation, Inc. | jquery.org/license
//@ sourceMappingURL=jquery-1.10.2.min.map
*/

Just change that to

/*! jQuery v1.10.2 | (c) 2005, 2013 jQuery Foundation, Inc. | jquery.org/license */

Purpose of a source map

Basically it's a way to map a combined/minified file back to an unbuilt state. When you build for production, along with minifying and combining your JavaScript files, you generate a source map which holds information about your original files. When you query a certain line and column number in your generated JavaScript you can do a lookup in the source map which returns the original location. Developer tools (currently WebKit nightly builds, Google Chrome, or Firefox 23+) can parse the source map automatically and make it appear as though you're running unminified and uncombined files. (Read more on this here)

shareimprove this answer
 
4 
Required only when you need to debug your minified JS source code. Check 2nd paragraph here for more details html5rocks.com/en/tutorials/developertools/sourcemaps –  kiranvj Sep 2 '13 at 9:25
2 
Wish i had seen this before doing selected answer. This is much easier and SHOULD be primary answer. The op's self answer is good for info, but is definitely secondary as this is the first question that pops up when googling how to g3et rid of this annoyance. –  SpYk3HH Sep 24 '13 at 22:00
4 
Needed a quick fix. This did the trick. Thanks. –  Andrea Sep 28 '13 at 14:03
9 
Editing libraries to get rid of such things is not a good choice. Everytime you update jquery, this line will be there again. –  Arman P. Jan 28 '14 at 23:22
2 
As of January 2014, sourcemap references are not included in the jQuery distribution. –  Dan Esparza Jun 10 '14 at 15:05
  1. Download the map file and the uncompressed version of jQuery. Put them with the minified version: JavaScript

  2. Include minified version into your HTML: HTML

  3. Check in Google Chrome: Google Chrome

  4. Read Introduction to JavaScript Source Maps

  5. Get familiar with Debugging JavaScript

shareimprove this answer
 

As it is announced in jQuery 1.11.0/2.1.0 Beta 2 Released the source map comment will be removed so the issue will not appear in newer versions of jQuery.

Here is the official announcement:

One of the changes we’ve made in this beta is to remove the sourcemap comment. Sourcemaps have proven to be a very problematic and puzzling thing to developers, generating scores of confused questions on forums like StackOverflow and causing users to think jQuery itself was broken.

Anyway, if you need to use a source map, it still be available:

We’ll still be generating and distributing sourcemaps, but you will need to add the appropriate sourcemap comment at the end of the minified file if the browser does not support manually associating map files (currently, none do). If you generate your own jQuery file using the custom build process, the sourcemap comment will be present in the minified file and the map is generated; you can either leave it in and use sourcemaps or edit it out and ignore the map file entirely.

Here you can find more details about the changes.


Here you can find confirmation that with the jQuery 1.11.0/2.1.0 Released the source-map comment in the minified file is removed.

shareimprove this answer
 

The new versions of jQuery require this file http://code.jquery.com/jquery-1.10.2.min.map

The usability of this file is described herehttp://www.html5rocks.com/en/tutorials/developertools/sourcemaps/

Update:

jQuery 1.11.0/2.1.0

// sourceMappingURL comment is not included in the compressed file.

shareimprove this answer
 
2 
No, I do not believe jQuery "requires" that file. It is only required if you want to use the source map while debugging in which case both the src file and the map file are needed. –  styfle Mar 15 '14 at 0:15
   
Hi @styfle, the source map was required in version 1.10.2, but from version 1.11.0/2.1.0 must add it manually, this is because many users were affected by the error that was produced in the browser console – Andres Separ Apr 8 '14 at 14:31

As I understand the browser, Chrome at least, it doesn't disable the source mapping by default. That means your application's users will trigger this source-mapping request by default.

You can remove the source mapping by deleting the //@ sourceMappingURL=jquery.min.map from your JavaScript file.

shareimprove this answer
 

If you want to get source map file different version, you can use this link http://code.jquery.com/jquery-x.xx.x.min.map

Instead x.xx.x put your version number.

Note: Some links, which you get on this method, may be broken :)

shareimprove this answer
 

After following the instructions in the other answers, I needed to strip the version from the map file for this to work for me.

Example: Rename

jquery-1.9.1.min.map

to

jquery.min.map

shareimprove this answer
 

jQuery 1.11.0/2.1.0 the // sourceMappingURL comment is not included in the compressed file.

shareimprove this answer
 

I was presented with the same issue. The cause for me was Grunt concatenating my JavaScript file.

I was using a ;\n as a separator which caused the path to the source map to 404.

So dev tools was looking for jquery.min.map; instead of jquery.min.map.

I know that isn't the answer to the original question, but I am sure there are others out there with a similar Grunt configuration.

shareimprove this answer
 

Assuming you've checked the file is actually present on the server, this could also be caused by your web server restricting which file types are served:

shareimprove this answer
 

protected by Brad Larson Aug 27 '13 at 15:34

Thank you for your interest in this question. Because it has attracted low-quality answers, posting an answer now requires 10 reputation on this site. 

Would you like to answer one of these unanswered questions instead?

Not the answer you're looking for? Browse other questions tagged  or ask 



来自 http://stackoverflow.com/questions/18365315/jquerys-jquery-1-10-2-min-map-is-triggering-a-404-not-found



I'm using these three CDN files, as recommended on getting started in JQM documentation:

<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title></title>
  <link rel="stylesheet" href="http://code.jquery.com/mobile/1.3.2/jquery.mobile-1.3.2.min.css" />
    <script src="http://code.jquery.com/jquery-1.9.1.min.js"></script>

    <script src="http://code.jquery.com/mobile/1.3.2/jquery.mobile-1.3.2.min.js"></script>

I'm perplexed why I'm getting a 404 Not found status under the Network tab in Chrome. Seems to be looking jquery mobile min.map file. I don't see this in Firefox.

Any thoughts as to why it's looking for this file?

shareimprove this question
 

正确答案    Probably your Google Chrome DevTools has enabled the option "Enable source maps". Check your Settings menu, then General and Sources.

A source map file it's a way to map a combined/minified file back to an unbuilt state. When you build for production, along with minifying and combining your JavaScript files, you generate a source map which holds information about your original files. When you query a certain line and column number in your generated JavaScript you can do a lookup in the source map which returns the original location. Developer tools (currently WebKit nightly builds, Google Chrome, or Firefox 23+) can parse the source map automatically and make it appear as though you're running unminified and uncombined files.

More information here.

shareimprove this answer
 
1 
it works for me. thanks for answer. –  Srinivas Aug 23 '13 at 14:42
   
Later versions of Chrome have the Developer Tools settings under More Tools > Developer Tools. – Phil Ryan Feb 3 at 1:20

普通分类: