Opened 8 years ago

Closed 8 years ago

#14862 closed defect (duplicate)

IE9 does not detect 404 errors when script injection returns a document

Reported by: Paul Christopher Owned by: Rawld Gill
Priority: low Milestone: 1.8
Component: Loader Version: 1.7.2
Keywords: Cc:
Blocked By: Blocking:

Description (last modified by Rawld Gill)

An attempt to load a non-existing resource from a server that returns a stub document does not signal an error in ie9 like all other browsers. Therefore, the script is assumed to be a legacy script and marked as resolved since it "loaded"---at least according to IE.

The 404 error does show up on the network panel in the debugger.

Attachments (1)

index.html (847 bytes) - added by Paul Christopher 8 years ago.

Download all attachments as: .zip

Change History (6)

Changed 8 years ago by Paul Christopher

Attachment: index.html added

comment:1 Changed 8 years ago by Rawld Gill

Status: newassigned

Thanks for the good reduction.

I'm seeing a 404 in Firefox10. Please check your network panel in Firebug; perhaps your console settings are such that the 404 won't show in the console.

Also, if you're patient and wait for 15 seconds, you'll eventually see the loader cough up the error. Believe it or not, this was the old behavior which I think is not useful, but the consensus was to keep it.

IE9 is quite interesting. On my machine, the server is replying with a 404 error plus an html document that says the requested resource doesn't exist. This causes IE9 to report that the script was loaded successfully. The loader does not require scripts define a module to allow loading legacy scripts...so there is no way for the loader to know that the script actually did not load. I need to research this issue a bit more; therefore keeping ticket open.

Notice that the real dojo/dom-attr is being loaded because of another dependency.

comment:2 Changed 8 years ago by Paul Christopher

Dojo and JavaScript programming is quite new for me. You are right: In Firebug, I need to activate the networkpanel. Having done this, I do get the error in the console.

In IE9 I can see in the network panel, that the loader failed to get the resource, but there is no error in the console.

comment:3 in reply to:  2 Changed 8 years ago by Rawld Gill

Replying to Paul Christopher:

In IE9 I can see in the network panel, that the loader failed to get the resource, but there is no error in the console.

Right. That's because IE9 doesn't report the script as having failed to load like the other browsers. I'm researching if I can detect a script 404 error--particularly when the server still returns a document--in IE.

That said, I've always believed the network panel is the soln to this problem and not more code in the loader. fwiw, I never depend on the loader finding these error, but rather always rely on the network panel. Also notice that an incorrectly typed module-id detected in firefox/firebug solves the ie problem (which is to say always start debugging with firefox/firebug).

comment:4 Changed 8 years ago by Rawld Gill

Description: modified (diff)
Milestone: tbd1.8
Priority: undecidedlow
Summary: 1.7.2: AMD-Loader still failing silently?IE9 does not detect 404 errors when script injection returns a document

comment:5 Changed 8 years ago by Rawld Gill

Resolution: duplicate
Status: assignedclosed

Loader recovery from errors will be tracked on #15194.

Note: See TracTickets for help on using tickets.