ArcGIS API 4.17 client side feature layer rendering issues

6555
11
Jump to solution
10-27-2020 04:03 PM
JesseWilliams
New Contributor

I am using a feature layer with client side features. I am using applyEdits to modify the client side features. I had done this before in 4.16 and it was working fine, but after bumping the version to 4.17, the applyEdits call doesn't update the view. I have verified that the edits are correctly applied by querying the layer in the console and all of the updated features are there, but the view does not update. I have dug deeper and realized that once applyEdits has been called, the layer view for the feature layer to get stuck in the updating state (ie the layerView.updating property is stuck on true, as well as the mapView.updating property). It also seems to be running the CPU and eating up memory while doing this (I have even seen my page crash due to an out of memory error). It seems to me that this is a bug in the 4.17 version. I know there were a lot of updates to feature layers in this version, and it seems like maybe along with that some handling of client side feature layers may have been broken. Has anyone else run into this issue?

My Basic environment setup:

esri-loader 2.16.0 (loading arcgis api 4.17)

Vue.js 2.6.12

0 Kudos
1 Solution

Accepted Solutions
mgeorge
Esri Contributor

Hi Jesse Williams

Sorry you're running into this - yes this is indeed a bug that happens when applyEdits is called multiple time simultaneously, unfortunately we were missing some automated test coverage for this. We just installed a fix for this in our master branch, should be on /next sometime next week. 

Can you try the workaround in https://codepen.io/matt9222/pen/GRqWYNo and see if that fixes your issue? Calling the `applyEditsToLayer(layer, edits)` function instead of layer.applyEdits directly should force the edits to be serialized. 

View solution in original post

11 Replies
MarcoBoeringa
MVP Regular Contributor

Definitely one to report to ESRI, seems like a clear bug as you concluded based on your description.

0 Kudos
mgeorge
Esri Contributor

Hi Jesse Williams

Sorry you're running into this - yes this is indeed a bug that happens when applyEdits is called multiple time simultaneously, unfortunately we were missing some automated test coverage for this. We just installed a fix for this in our master branch, should be on /next sometime next week. 

Can you try the workaround in https://codepen.io/matt9222/pen/GRqWYNo and see if that fixes your issue? Calling the `applyEditsToLayer(layer, edits)` function instead of layer.applyEdits directly should force the edits to be serialized. 

rogenjh
New Contributor III

Hey @mgeorge ... I was wondering if this one has been fixed? I've been running into issues on 4.18 where my labels are not updating after calling applyEdits, but my other symbols are. I downgraded to 4.16, and it works fine there. Thanks!

0 Kudos
wasimraja1
New Contributor II

Hello,

As per release note of 4.18, this issue is resolved but the labels at client-side are still  not  getting updated when featurelayer is updated.  Any idea how to achieve this ?

0 Kudos
mgeorge
Esri Contributor

Hi guys - sorry for the lack of reply, my notifications seem to not be working. We installed a fix for applyEdits in 4.19 that should fix both issues with labels not updating & for high-frequency edits (e.g. on cursor move).

wasimraja1
New Contributor II

When ESRI Plans to release JS API 4.19 ?

0 Kudos
mgeorge
Esri Contributor

I think 4.19 should be releasing in 2-3 weeks.

0 Kudos
mgeorge
Esri Contributor

@wasimraja1if you have a repro I can make sure there are no other issues for your workflow.

DougPowers
New Contributor

I'm at 4.19 and can confirm that this issue remains.  When I revert to 4.16 the issue goes away. 

When I add multiple graphics at once using applyEdits, the graphics are added, but the labels do not render 90% of the time.  There seems to be some sort of race condition at play.