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.

"[esri.core.Accessor] Accessor#set Invalid property value" and "[esri.views.2d.layers.FeatureLayerView2D] TypeError: Cannot read property 'constructor' of undefined"

See original GitHub issue

Another issue with the webpack demo at https://github.com/Esri/jsapi-resources/tree/master/4.x/webpack/demo - both sample layers are returning the error message:

Logger.js:25 [esri.core.Accessor] Accessor#set Invalid property value, value needs to be one of ‘esri.symbols.SimpleFillSymbol’, ‘esri.symbols.PictureFillSymbol’, ‘esri.symbols.PictureMarkerSymbol’, ‘esri.symbols.SimpleLineSymbol’, ‘esri.symbols.SimpleMarkerSymbol’, ‘esri.symbols.TextSymbol’, ‘unknown’, ‘unknown’, ‘unknown’, ‘unknown’, ‘unknown’, ‘esri.symbols.CIMSymbol’, or a plain object that can autocast (having .type = ‘simple-fill’, ‘picture-fill’, ‘picture-marker’, ‘simple-line’, ‘simple-marker’, ‘text’, ‘line-3d’, ‘mesh-3d’, ‘point-3d’, ‘polygon-3d’, ‘web-style’, ‘cim’)

Screen Shot 2020-10-21 at 10 17 05 am

In the case of this demo the layers seem to draw OK despite the error message, but in my example I’m seeing this additional error message and the feature layers aren’t drawing at all.

[esri.views.2d.layers.FeatureLayerView2D] TypeError: Cannot read property ‘constructor’ of undefined at Object.s [as getOwnClassMetadata] (metadata.js:25)

let layer3 = new FeatureLayer({
  url: "https://services7.arcgis.com/nMBRP09Dx4VqvXeZ/arcgis/rest/services/Indigenous_Locations/FeatureServer/0/",
  renderer: {
    type: "simple",
    symbol: {
      type: "simple-marker",
      style: "circle",
      color: "#6e6e6e",
      size: "9px",
      outline: {
        color: [ 255, 255, 255 ],
        width: 1
      }
    }
  }
})
map.add(layer3)

Any suggestions? thanks

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:5

github_iconTop GitHub Comments

1reaction
COV-GIScommented, Oct 21, 2020

At 4.17 including '3d': false, as a plugin feature breaks 2D feature layer symbols.

https://github.com/Esri/jsapi-resources/blob/master/4.x/webpack/demo/webpack.config.js#L78

0reactions
sleadcommented, Oct 26, 2020

If you’re not seeing the error I’ll close this for now, as I’m actually using a different approach on my current project. Thanks for the fast responses

Read more comments on GitHub >

github_iconTop Results From Across the Web

Feature layer created from feature set in ArcGIS JS API 4.10 ...
Solved: Hi All, I am trying to display feature layer created from ... Accessor] Accessor#set Invalid property value, value needs to be one ......
Read more >
Layer will not load - Uncaught TypeError: Cannot r...
I am beginning to learn to use the ArcGIS API for Javascript. ... will not load - Uncaught TypeError: Cannot read property 'on'...
Read more >
Re: TypeError: Cannot read properties of null (rea...
Hello, I'm working with the ArcGIS API for Javascript, @arcgis/core ^4.22 inside an angular (13.1.1) application and encountering an error ...
Read more >
ESRI Error | Cannot read property 'displayId' of undefined
This error occurs when a property is read or a function is called on an undefined variable. Undefined means that a variable has...
Read more >
Uncaught (in promise) TypeError: Cannot read prope...
Hello, I am using ArcGIS api JS with a layer of polygons. ... Uncaught (in promise) TypeError: Cannot read property 'setHighlight' of null....
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