Select to view content in your preferred language

Mapview Attribute Store errors going to browser console [infinite loop]

7730
36
04-10-2020 02:02 PM
davetinkle
Occasional Contributor

Using 4.14 API, I find immediately after calling buffer, I see about 20 errors per second reading "[esri.views.layers.2d.features.support.AttributeStore] [mapview-attribute-store]: Encountered an error during client initialization"

what's even more alarming: when I navigate away from the offending page & onto one that has absolutely no references whatsoever to the 4.14 API, the errors keep racking up! it's as if there's an open connection that won't resolve, and instead pumps to my console what is effectively a DDOS attack. The only way to get it to cease is to close my browser.

Logging off will NOT stop the flood!

What could be the root cause of this?

36 Replies
mgeorge
Esri Contributor

Oh sorry, if what I think is happening is actually what's causing the issue, it would only theoretically happen if the layer is added and removed very quickly. Just adding a feature layer shouldn't cause the problem. 

0 Kudos
AndrewMurdoch1
Frequent Contributor

I'm going to try getting a HAR capture, if I do I'll attach it.

0 Kudos
AndrewMurdoch1
Frequent Contributor

How can I upload a file or is there any email I can send the HAR file to?

0 Kudos
mgeorge
Esri Contributor

You can send it to me (mgeorge@esri.com), however I think the HAR capture likely won't help us much here. We've made a bunch of changes to the way feature layers load, as well as fixed a rare issue that could happen with the workers communication, so it might be best to wait for that and see if we can still see the problem (the changes are currently live on /next). 

0 Kudos
AndrewMurdoch1
Frequent Contributor

Okay, I'll send the HAR file and I'll test on /next to see if I can cause the same problem.  In the case I run into the error it's just from loading the Feature Layer, I'll see one of the port closed errors and then run into this:

[esri.views.layers.2d.features.support.AttributeStore]
e {name: "mapview-attribute-store", message: "Encountered an error during client initialization", details: e}
details: e
details: undefined
dojoType: "cancel"
message: "Abort job: worker closing"
name: "AbortError"
message: "Encountered an error during client initialization"
name: "mapview-attribute-store"

Which happens to then cause and info loop, which requires me to jump away from the map quickly, to prevent a total lock up.

0 Kudos
AndrewMurdoch1
Frequent Contributor

We've seen this problem across Firefox / Chromium browsers and on Windows / Linux.  I'm currently on Ubuntu 20.04 Brave.

0 Kudos
mgeorge
Esri Contributor

Ah ok so you are getting the loop. 

0 Kudos
AndrewMurdoch1
Frequent Contributor

Yes:  It seems to have something to do with stacking the data.  I've disabled the indexDB functionality so we have to load from a HTTP endpoint but I can still run into it.

0 Kudos
AndrewMurdoch1
Frequent Contributor

I ran the code on /next and it looks like the problem is "solved", I'm seeing a lot of errors but nothing is doing an inf loop:

0 Kudos
mgeorge
Esri Contributor

Thanks! I think I can repro this with https://codepen.io/matt9222/pen/rNePaLW?editors=1000. Seems to be a timing issue with removing a layer while it's still loading. 

This is on ubuntu 20/chrome (using an outdated chrome due to the latest version having super borked devtools on linux). Need to have devtools open + cache disabled (can repro maybe 30% of the time). 

I think these should be "ok" errors as they are basically just aborts - we should be catching them though (& rethrow only if not an AbortError). Taking a look.