Select to view content in your preferred language

Pre-3.0 API and Latest Chrome

2059
14
08-22-2013 08:08 AM
AllenAnselmo
Emerging Contributor
Hey all,

Not sure how much this affects any of you, but I thought I'd post it either way to get the information out there. It seems that the latest version of Chrome (29.0.1547.57 m) that came out Tuesday or so, has made some change which causes pages with older ESRI Javascript API versions (pre-3.0) to fail to load due to some sort of errors being triggered in the contenPane loading code of dojo it seems.

It doesn't seem to be affecting our pages that are more up to date (3.5+) but we have some older ones in production which lock up entirely on load in Chrome now and weren't doing so last week, whereas they load fine in the latest Firefox and IE browsers.

Anyone else running into this situation or even have any older pages in production that haven't gotten upgraded?

If so, be sure to put in a bug report to Chrome through the Menu > Tools > Report an Issue tool, since the more they get in, the more likely they are to fix whatever they broke so abruptly.
0 Kudos
14 Replies
AaronDrake
Deactivated User
I have written a web mapping application using JSAPI 2.1.  This application has been in service since 2010, and has had no issues when viewed in Chrome.  That was until Chrome updated to version 29.0.1547.57. 

My users are all receiving an error (via Developer Console):
Uncaught TypeError: Object #<Text> has no method 'getAttribute' from FormSelectWidget.xd.js 8

I can confirm that it is something with the latest Chrome version, as I rolled one of our machines back to version 28.0.1500.95, and the application worked fine.

I am not sure what changes were made from version 28 to 29, but something is definitely affecting the application in an adverse way.

Also, it should be noted that the application works fine in IE9, IE10, Opera (latest), Firefox, etc.
0 Kudos
EricHanson
Deactivated User
A Dojo blog about the issue.

Anyone know if ESRI will update its pre-3.0 apis with this fix? 

It appears to be causing issues on a number of applications.
0 Kudos
AaronDrake
Deactivated User
Good find. 

Hopefully Esri will take care of this...
0 Kudos
BetsySchenck-Gardner
Deactivated User
I really hope this gets fixed by esri. I don't feel like going back and rewriting code when there is a fix available.
0 Kudos
SuvethanVignarajah
New Contributor
I was able to make a quick fix to this issue with dojo and chrome version 29 using the suggestion given in this forum: http://productforums.google.com/forum/#!topic/chrome/wPXjwJ_Kf3M

Steps I took:

-Download just the query.js from dojo 1.6 toolkit: http://download.dojotoolkit.org/release-1.6.0/dojo-release-1.6.0/dojo/_base/query.js

-Remove the condition that checks if resource has already been loaded (dojo._hasResource["dojo._base.query"])

-On line 499, edit it so for chrome v29, _noNES is always true:
var _noNES = (navigator.userAgent.indexOf('Chrome/29') >= 0) ? true : (typeof getDoc().firstChild.nextElementSibling == "undefined");


-In your HTML, to make it efficient only load this script when the userAgent is chrome v29. So other browsers do not load this script unnecessarily:
<script type="text/javascript">
            if (navigator.userAgent.indexOf('Chrome/29') >= 0){
                document.write('<script type="text/javascript" src="/path/to/query.js"><\/script>');
            }
</script>


This is still inefficient, considering you have to load the query.js file to override ESRI's - but this fix should keep things stable till the problem gets fixed.
0 Kudos
derekswingley1
Deactivated User
We're looking into the best way to fix this.

Can everyone in this thread post the version of the JS API they're using?
0 Kudos
SuvethanVignarajah
New Contributor
We're looking into the best way to fix this.

Can everyone in this thread post the version of the JS API they're using?



Using version 2.6.

Thanks.
0 Kudos
EricHanson
Deactivated User
Various versions from 2.4 - 2.8.
0 Kudos
ChadWilcomb
Deactivated User
We are experiencing an issue with Chrome v29+ and version 2.8 of ArcGIS JSAPI

The solutions I've seen online seem to reference the query.js file whereas the JSAPI doesn't load that file but I see a similar pattern in init.js (but since it is minified I'm not sure where the actual problem code is).

Would appreciate any fixes from ESRI. We plan to upgrade the JSAPI at some point but a temporary fix would be a lifesaver.

UPDATE: The fix that svignara posted above allows the map to load, but calling getChildren() on our BorderContainer only returns 1 child element when there should be two, so it is still broken
0 Kudos