Javascript API 3x Map Click Event Intermittently Fails to Fire in Chrome Browser

17860
50
Jump to solution
03-25-2021 11:41 AM
Dan
by
Frequent Contributor

 

- Javascript API 3.28

- Chrome 89.0.4389.90

- https://www.bcpao.us/PropertySearch/#/account/2961057

---------------------------------------------------------------------------------------------------

Our public Javascript API  3x web map (“MapView”), in production since 2016, started intermittently failing to fire the map.on(“click”) event in Chrome browser on Windows 10 desktop for some users when inside an iframe.  Other elements within the map (checkboxes, buttons, input, search, zoom, pan, layer toggle, etc.) all work.  I can detect that map_gc is the event target every time, but map.on(“click”) doesn’t always fire. I tried loading the web map into a div instead of an iframe, but the result was the same. When the map is loaded in its own window, it seems to work every time. There are no errors in the console.

The website, map, and all resources are local on a single server.  There is another iframe in a separate tab under the web map tab that contains a Pictometry/Eagleview IPA image viewer that initially has no src, so everything is single domain at that point.  There is a resize event on the iframe to ensure the map fits inside the tabbed panel as the browser window is resized. Sometimes resizing the browser window fixes or breaks the map-click, and sometimes has no affect.  Sometimes it just works and is difficult to break.  Sometimes it breaks every time.

This doesn’t happen on all computers and doesn’t appear to happen in any other browser (Edge, IE11, Firefox, Opera, Brave, Safari, etc.)  It doesn't seem to happen on a tablet (Android or Apple) in Chrome either. 

To see this in action, from the URL included above, click the MapView button above the photo.  Maybe I’ve stared at it too long to see an obvious issue . . .

50 Replies
Dan
by
Frequent Contributor

I also notified Google that a change in their browser broke ESRI web applications across the globe.  They get a lot of notifications, so I'm not expecting much from them.

Dan
by
Frequent Contributor

From ESRI (note the "workaround"):

************************************

The status of Esri BUG-000138684 - Click events like popups are not responding in the ArcGIS API for JavaScript 3.30 and below in Chrome 89 - that you have been associated with has been changed to New.

Public Explanation:
Case Number: 02765102
Workaround: Upgrade to the ArcGIS API for JavaScript 3.31 or above.


If you would like to view additional information about this bug, please login to My Esri https://my.esri.com/#/support/bugs and enter BUG-000138684 in Quick Search.

Esri Support Services

************************************

0 Kudos
AnandMatam
Emerging Contributor

This issue actually started for us at Chrome version: 88.0.4324.190.

Our identify tool relying on map-click broke at this version.

The strangest workaround without having to upgrade to AGS JSAPI 3.3.35 was deleting the Chrome user profile and recreating it in order to make it work.

JacobRothenberger
Emerging Contributor

Our team has just experienced this issue as well.  We are running ArcGIS JS 3.21.  We can confirm that upgrading to 3.31 or later resolves the issue, but cannot push this fix to our upper environments without extensive regression testing.  Our application also only supports the Chrome web browser.  We also are seeing the map click even not register for some users, but working fine for other users on the same version of Chrome.  Here are a few details, we have also submitted an ESRI ticket: Case # 02779482.

Here are the case details in case you can't find it.

As of yesterday, our team noticed that the latest versions of Google Chrome are not registering ESRI Map on click events for the ArcGIS JavaScript 3.21 libraries. Below are some of the affected environments that are seeing this issue. The only common component is that these environments are all using Google chrome, hitting our custom web application running the ArcGIS JS 3.21 libraries. Some environments are running code that was baselined months ago, and was not seeing an issue with the Map click events until a few days ago.


Note that some users running these versions are not having issues, but others are.


(Mac) Chrome Version 89.0.4389.114 (Official Build) (x86_64)
(Windows) Chrome Version 89.0.4389.90 (Official Build) (x86_64)
(Windows) Chrome Version 88.0.4324.150 (Official Build) (32-bit)


Further research shows that there are others looking into this issue:
https://community.esri.com/t5/arcgis-api-for-javascript/javascript-api-3x-map-click-event-intermitte...


There are also some ESRI tickets that this forum claimed to have submitted, however, we cannot locate them:
BUG-000138684
BUG-00013868


It seems the fix is to upgrade to ArcGIS Javascript 3.31 or later (up to 3.35), however, we are running Production level code that cannot be quickly changed without extensive system regression tests.


We also are using this website to test to see if users are having issues, without logging into our custom application. The users having issues cannot get map clicks to work on versions 3.21 - 3.30, but on version 3.31 - 3.35 the map clicks work for all users. https://codepen.io/shadc/pen/YzNQMaO?editors=1000

Please advise on the cause of this issue and possible workarounds that do not involve updating the ArcGIS Javascript version.

0 Kudos
ZianChoy
Frequent Contributor

Has there been a bug filed against Chrome/Chromium yet?

0 Kudos
Dan
by
Frequent Contributor

Please see my previous post:

"I also notified Google that a change in their browser broke ESRI web applications across the globe. They get a lot of notifications, so I'm not expecting much from them."

Maybe Google will take notice if more people report the issue.

0 Kudos
BjornSvensson
Esri Regular Contributor

FYI - I've left a reply on another post explaining what's happening -- https://community.esri.com/t5/arcgis-api-for-javascript/no-popup-info-in-chrome/m-p/1046147/highligh... 

This is a bug/experiment with Chrome 89 - https://bugs.chromium.org/p/chromium/issues/detail?id=1192449#c28

  • The change is only rolled out to some Chrome installations, which is why it works on some machines, but fail on others.
  • This impacts version 3.10-3.30 of the ArcGIS API for JavaScript.

See also the related Esri Support issue at https://support.esri.com/en/bugs/nimbus/QlVHLTAwMDEzODY4NA==

We are currently working on having Google rollback this breaking change in the Chrome browser, as well as investigating possible alternatives for the API.

HenryKo2
Regular Contributor

Thanks, good to know the root cause.

Summary of workarounds (that worked for me anyway):

  • Make sure the monitor scaling is 100% (on Windows 10).
  • Delete the Chrome profile (backup bookmarks first): C:\Users\username\AppData\Local\Google\Chrome\User Data
  • Use another browser e.g. Edge

(all these workarounds can be found within this thread and credit to the contributors who stumbled upon them).

0 Kudos
BjornSvensson
Esri Regular Contributor

FYI - looks like Google will roll back this browser change. See https://github.com/w3c/pointerevents/issues/100#issuecomment-818870316 

DavidMinton
New Contributor

We've upgraded to 3.35 of the ArcGIS API for JavaScript but still have some external users complaining that they can't select features.  Some anecdotal solutions that users have had success with are using Incognito mode and disabling AdBlock Plus.  

0 Kudos