PDA

View Full Version : TreeView load - Intermittent Error on IE8



djones
29 Sep 2010, 5:32 PM
My treeview is getting a fairly consistent error loading the nodes on IE8. I'm used to stuff not working ;) but I'm having trouble getting useful details on this issue and was hoping someone has seen something like this.

My site is based on ExtJS/ASP.NET MVC and roughly 4 out of 5 tries to download the json block for the tree fails. The loadexception event includes very few details, just that there was a 'communication failure' and there is no responseText. Just pasting the request in the browser yields the expected payload 100% of the time. Also, when it does work (that 1 out of 5 requests) it renders the expected data.

**The weird thing is if I am running Fiddler, the issue never occurs!** I can sit there and F5 to my hearts content and it never shows. I turn off Fiddler and BAM, it's back again. This must be an important symptom but I just don't know what it means.

Some additional thoughts:
- issue has never occurred in firefox or chrome, in fact, site performs swimmingly on those browsers
- compatibility mode has no affect
- I've run in 'release' mode, in other words, only using a few merged scripts instead of lots of individual ones just in case script load order was an issue. This had no affect
- tried instantiating TreeLoader manually and through dataUrl property on TreePanel.
- content type of response is application/json
- IE Dev tools seem pretty useless!
- page layout uses viewport
- layout based on series of classes/controls, each using xtype/config objects in items[] to load each subsequent layer, treepanel is part of this hierarchy. I rely on the treeloader to autoload.
- tried viewing site as localhost and using a dummy domain mapped to localhost.

edit: one more thing, 1 out of 10-20 requests yields a slightly different loadexception event, instead I get a response code of 200 and the statusText is OK. The response text and xml are still empty and of course, the treepanel is still throwing the loadexception event.


Any ideas on how I can debug this?
Has anyone seen an intermittent issue like this with IE before?

I appreciate any help you provide. Apologies if I've left out any crucial details.

Dave

djones
8 Oct 2010, 4:50 PM
Shameless pg. 18 bump. Anyone have any advice on an alternate method of debugging this or insight into why the issue does not occur when using Fiddler to track the traffic?

Dave

plalx
8 Oct 2010, 7:18 PM
No idea... but, what says firebug? Do you see the response there? Try to put a static server response and check if the error always occur...? Are you putting " " around your property names in the json return? It's better to always put double quotes around property names in the json string returned from the server because IE might trhow an error if you are using reserved words, like 'class'...

Condor
8 Oct 2010, 10:33 PM
Include ext-base-debug.js instead of ext-base.js and put a breakpoint on the "switch (httpStatus)" line.

What is the exact httpStatus when the request fails?

djones
9 Oct 2010, 1:32 AM
No idea... but, what says firebug? Do you see the response there? Try to put a static server response and check if the error always occur...? Are you putting " " around your property names in the json return? It's better to always put double quotes around property names in the json string returned from the server because IE might trhow an error if you are using reserved words, like 'class'...

Firefox does not suffer from the issue so firebug just reports the expected data. Which makes sense because...



Include ext-base-debug.js instead of ext-base.js and put a breakpoint on the "switch (httpStatus)" line.

What is the exact httpStatus when the request fails?

...the status is 12030 which appears to be an IE specific status code. It's not clear to me what it means, folks say it has something to do with IE trying to use a closed socket. One of the oft recommended remedies is to use GET rather than POST (which is what I was using). Using a requestMethod of GET does appear to resolve the issue and I think the structure of my data shouldn't be vulnerable to JSON hijacking... But it'd be nice to understand the issue a bit better. If anyone has useful insight on this, I'd appreciate the info.

Regardless, thanks for the tip on where to look Condor.

Condor
9 Oct 2010, 1:45 AM
I've found another comment on a website that claimed this error could be avoided by forcing HTTP1.0 instead of 1.1 on your HTTP server when the client is Internet Explorer.

ps. I don't have this problem myself, because I don't use XmlHttpRequests over SSL.