Unable to get property "TOLOWERCASE" of undefined or null reference in init.js

4204
10
11-06-2013 08:31 PM
viteboardviteboard
New Contributor
Hello ,

   I am using arcgis api 3.5 in my application I have attached the image what issue I am facing. I have observed that this is coming up only in IE and that too when I perform other actions at some other pages and come back to this page. And this issue will hang
IE browser


Can anybody suggest in which way I can resolve this issue.
0 Kudos
10 Replies
BrianLott
New Contributor

I'm having the same issue in 3.10 - has anyone found a solution to this problem?

0 Kudos
KellyHutchins
Esri Frequent Contributor

Do you have a reproducible test case that shows the issue? In your code are you using the toLowerCase() method? If so perhaps the string value you are trying to convert to lower case isn't defined when you use the method. Providing a small test case that shows the problem will help us figure out why  you are seeing the error.

0 Kudos
BrianLott
New Contributor

I will try to find a small test case, though it will be difficult - the problem seems to be intermittent.

I do not use the toLowerCase() method at all in my code. The error is raised in the esri .init.js javascript file.

0 Kudos
Kathleen_Crombez
Occasional Contributor III

I am running into this issue in version 3.6 also. The error occurs in IE only.

The error message is as follows:

Unhandled exception at line 34, column 95354 in http://js.arcgis.com/3.6/init.js

0x800a138f - JavaScript runtime error: Unable to get property 'toLowerCase' of undefined or null reference

I have a lot of trouble reading these minified javascript files, but I think it is triggered by the mouse down event.

Here is a screenshot of the break point in visual studio.

And here is line in error with the prior line that attaches a mouse down event if using IE browser.

(doc){if(has("ie")){_320.document.body.attachEvent("onmousedown",_323);var _324=function(evt){var tag=evt.srcElement.tagName.toLowerCase();if(tag=="#document"||tag=="body"){return;}

The code should test if evt.srcElement.tagName is null before applying the toLowerCase() method.

Maybe they could do something like this:

var tag=evt.srcElement.tagName;if(tag==null||tag.toLowerCase()=="#document"||tag.toLowerCase()=="body"){return;}

I hope the ESRI Development Team is able to resolve the issue for all versions of the API. Because I do not want to store a local copy of the API on my server.

0 Kudos
KellyHutchins
Esri Frequent Contributor

Which version of IE?

0 Kudos
Kathleen_Crombez
Occasional Contributor III

I am using IE version 11.0.9600.17041

0 Kudos
Kathleen_Crombez
Occasional Contributor III

This error just started happening for me in the last week or two.

After doing more testing this morning, it seems this error occurs only when I am debugging my site in Visual Studio.

And I am not able to reproduce this error when I am not in debug mode.

It is very strange...

My site is an ASP site (written in C#) using the html5 DOCTYPE.

I also use the following meta tag to fix a bunch of display issues that occur in IE.

<meta http-equiv="X-UA-Compatible" content="IE=9">

0 Kudos
Kathleen_Crombez
Occasional Contributor III

my apologies, the event that is fired that causes this error is the "focusin" event. (not mousedown)

this fails when the srcElement is an Object with null id and tagName.

I am uncertain which elements would cause the tagName to be null.

0 Kudos
JoshVan_Kylen
New Contributor III

I'm currently seeing this error in IE11. It occurs intermittently, but more often than I would like.  It happens while the page is loading and it occurs when accessed from both in and outside the office, but occurs more often when outside.   

I tried adding the content="IE=9" designation, but it did not make a difference. 

IE version 11.0.9600.17843

I've tried CDN versions 3.17 and 3.18 as well as a locally hosted 3.17.   

File: 3.17, Line: 28, Column: 138 

b.apply(null,s):b;a.result=void 0===h&&a.cjs?a.cjs.exports:h;D.shift(a);ha(a)}return a.result},oa=0,ja=function(a){try{oa++,a()}catch(c){throw c;}finally{oa--}bb()&&C("idle",[])},ga=function(){oa||ja(function(){G();for(var a,c,b=0;b<Q.length;)a=Ga,c=Q,ia(c),a!=Ga?(G(),b=0):b++})};r("dojo-undef-api")&&(q.undef=function(a,c){var b=W(a,c);ca(b);g(b,{def:0,executed:0,injected:0,node:0,load:0})});void 0===r("dojo-loader-eval-hint-url")&&r.add("dojo-loader-eval-hint-url",1);var ra="function"==typeof b.fixupUrl?

This web map rarely shows this error. MCDOT Projects 

This project description page gets it more often. 

http://www.mcdot.maricopa.gov/Projects/Project?ID=835 

Here is a version of the project description page in HTML without page layout that I have seen also gets this error. But much less frequently.

http://gis.mcdot.maricopa.gov/Projects/project.html?ID=835 

Some other ID values that should also return results: 

797, 799, 801, 828, 844, 990, 828, 829, 863, 884, 964, 2099, 2120, 2180

0 Kudos