question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

@arcgis/core: Error loading OS MasterMap vector tiles - console shows multiple: "Cannot read properties of undefined (reading 'getAttributeLocations')"

See original GitHub issue

@arcgis/core version Using version: @arcgis/core@4.21.2. I have also tested with version 19, 20 and the ‘next’ version (22).

Framework and build tools Using Angular 13.0.0 with Node 14.17.16. I have also tried different Angular versions (12.x.x) and Node combinations.

Describe the bug When loading the OS MasterMap Vector layer (https://www.ordnancesurvey.co.uk/business-government/products/vector-tile-api) the tiles will not render on the map and the following error is produced in the console:

core.mjs:6495 ERROR TypeError: Cannot read properties of undefined (reading 'getAttributeLocations') at l._loadWGLResources (WGLBrushVTLBackground.js:5) at l.drawMany (WGLBrushVTLBackground.js:5) at m.renderObjects (Painter.js:5) at p._renderBackgroundLayers (VectorTileContainer.js:5) at p._doRender (VectorTileContainer.js:5) at p.renderChildren (VectorTileContainer.js:5) at p.doRender (WGLContainer.js:5) at p.doRender (VectorTileContainer.js:5) at processRender (DisplayObject.js:5) at n.renderChildren (Container.js:5)

This error occurs with the 2d MapView but works OK with the 3d SceneView. (update: just tested with SceneView and I get the same error in the console - although the tiles render ok).

This error is from the Chrome console but the same error occurs on different browsers i.e. Firefox and Edge. It appears to be a rendering issue with WebGL although I am unable to find the source of the error or a resolution.

When checking the network tab in the console the data is being returned and with 200 OK status code and the application loads the OS MasterMap Raster tiles successfully, so the OS services are working correctly.

Are you able to reproduce the bug in a vanilla JS app? It works ok in the a standard Esri JavaScript API application.

Expected behavior Vector OS MasterMap tiles to loads in mapView using @arcgis/core.

Reproduce the issue I am unable to provide an example of the application producing the error as access to the OS MasterMap API is via subscription and API key. We have also experienced the same error on a different Angular application using @arcgis/core.

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:5 (1 by maintainers)

github_iconTop GitHub Comments

1reaction
jyou-bgscommented, Nov 17, 2021

Hi @ubatsukh I have just updated the @arcgis/core version with npm install @arcgis/core@next and it moved the version to 4.22.0-next.20211116 and I can confirm that the OS MasterMap vector layer is now working as expected. Thanks for your help!

0reactions
ubatsukhcommented, Nov 17, 2021

Did not mean to close the issue. Please close it out if you are able to verify.

Read more comments on GitHub >

github_iconTop Results From Across the Web

ESRI Error | Cannot read property 'displayId' of undefined
I got this error when enabling featureReduction for a featureLayer. new FeatureLayer({ objectIdField: 'OBJECTID', geometryType: 'point' ...
Read more >
Uncaught TypeError: Cannot read properties of undefined ...
When I clicked the layer, it shows the following error, Uncaught TypeError: Cannot read properties of undefined (reading 'lat') at ...
Read more >
Fix 'cannot read properties of undefined (reading map)' in JS
Learn what is the cause, and how you can fix 'Uncaught TypeError: Cannot read properties of undefined (reading 'map')' errors in JavaScript.
Read more >
loading OS MasterMap Topography data into ArcGIS - YouTube
A webinar recording about using the UK Data Loader from ESRI UK load OS MasterMap Topography data into the ArcGIS Platform, ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found