Select to view content in your preferred language

Map unable to load after upgrading from ArcGIS Javascript API from version 4.25 to 4.29

1920
11
07-06-2023 11:41 PM
wzence
by
Emerging Contributor

After upgrading to ArcGIS Javascript API 4.26.4, the map on our application is unable to load. It shows a black screen. The error message in the browser console is:

Uncaught (in promise) TypeError: i is not a function
at I.enforceState (RenderingContext.js 5:1)
at I.configure (RenderingContext.js 5:1)
at new I (RenderingContext.js 5:1)
at new P (Stage.js: 5:1)
at p._startup (MapView.js 5:1)
at View.js: 5:1
at u (reactiveUtils.js: 5:1)
at watch.js: 5:1
at s (trackingUtils.js:5:1)
at c (trackingUtils.js:5:1)
at s [as _notify] (trackingUtils.js:5:1)
at s.onCommitted (SimpleTrackingTarget.js:5:1)
at l.onCommitted (Property.js:5:1)
at l.onCommitted (Property.js:5:1)
at l.onCommitted (Property.js:5:1)
at l.onCommitted (Property.js:5:1)
at a.commit (Property.js:5:1)
at O.setAtOrigin (Property.js:5:1)
at O._internalSet (Property.js:5:1)
at O.internalSet (Property.js:5:1)
at p._set (Accessor.js:5:1)
at Loadable.js:5:1

The ArcGIS server we are using is ArcGIS enterprise version 10.41. We are not using knowledgeGraphService in our application, so not sure if it is necessary to upgrade the server to enterprise version 11.1 as mentioned in the breaking changes.


0 Kudos
11 Replies
wzence
by
Emerging Contributor

The subject should be "Map unable to load after upgrading from ArcGIS Javascript API from version 4.25 to 4.26"

0 Kudos
-Smita-
New Contributor

Hi,

Could you share a snippet or create a CodePen to have a look at the code?

0 Kudos
wzence
by
Emerging Contributor

Hi,

Its a large codebase. The code is working using API v4.25, but once it is upgraded to 4.26.4, the map is unable to load. I suspect there could be some problem in loading the MapView in v4.26:

mapView = new MapView({
   container: 'map-view-container',
   map: MapParams.main.map
   spatialReference: ...
   center: ...
   zoom: 15
   constraints: {
          minZoom: 11,
   },
   hightlightOptions: {
      haloCapacity: 1,
      fillOpacity: 0.1,
   },
   popup: {
      dockOptions: {
         buttonEnabled: false,
      },
    }
});

Not sure is it the ArcGIS server also need to be upgraded.

0 Kudos
David_McRitchie
Esri Contributor

Unfortunately it is going to be difficult to tell where this is going wrong without a sample but looking at the network traffic log and responses will hopefully provide some results.

 

David

Esri UK -Technical Support Analyst
0 Kudos
jsfr0st
New Contributor

Hi David,

I am having the same issue.

Here are some things that I had tried and does not work:

1. Upgrade graphics driver to ensure usage of up to version OpenGL 2 to 3+
2. Under browser configuration example chrome://gpu, i enabled WebGL, and ANGLE to use OpenGL (i've tried all options as well)
3. Downgrade Chrome browser to older version
4. Tried using Chrome, Firefox, Opera different browsers all having same issue.
5. Upgrade to 4.26 and 4.27 shows slightly different error but all pointing to WebGL issue
6. Tried updated browserslist in package.json to use latest browser version, not IE v11 etc.

The following picture shows what I had encounter for Arcgis v4.27

jsfr0st_0-1689131872734.png

I am suspecting this is an underlying issue with ArcGIS libraries (js-api), incompatible with the latest browsers and maybe GPU as well.

Hope you can find something out from it and let us know, because this issue can snowballed into something bigger if it does not get resolves before v4.28.

Thank you!

Tags (4)
0 Kudos
D_McRitchie
Emerging Contributor

Hey thank you for letting me know you're also encountering this.

I have not seen this issue reported yet, nor is it occurring in any of the samples so I think there will be something more specific causing this.

In this case we really would need to see a sample app to test this. From looking at the change notes however it could one of the Breaking changes at 4.26 where 3D Scenes now require a WebGL2-compatible device. Could you therefore test the following website to confirm this is not the case?

Many thanks,

David

 

 

 

0 Kudos
JSFrost
Emerging Contributor

My app does not have any 3D items neither using any 3D apis. I tested with the website you gave and yes my browser is webgl2 compatible.

JSFrost_0-1689233793107.png

0 Kudos
David_McRitchie
Esri Contributor

Thank you for checking and confirming. In this case I am unsure so I would recommend raising a Support case with your distributor if possible. If you are also on ArcGIS Server 10.4.1 then it would be best to upgrade this as this version is now unsupported.

Many thanks,

David

 

Esri UK -Technical Support Analyst
0 Kudos
JSFrost
Emerging Contributor

Hi David,

Just to update, so had tried upgrade server to v11 and using arcgis 4.26, the issue remains. It might not be server issue.

0 Kudos