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

6150
36
04-10-2020 02:02 PM
davetinkle
New Contributor III

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
AndrewMurdoch1
Occasional Contributor II

Not yet, apparently ESRI doesn't want to admit it exists or offer a proper solution.  This might be related to the Port Closed Error  that I also get from time to time.  It would be nice if ESRI actually responded!

0 Kudos
mgeorge
Esri Contributor

Hi all,

Sorry for the lack of response on this. If you are experiencing this issue, are you able to provide a link to a repro on codepen? Are you seeing this in IE only or in other browsers?

AndrewMurdoch1
Occasional Contributor II

Thank you for the reply.

I don't have one handy, but I might be able to build on later tonight, I can't replicate this error with any consistency but it seems to be something in the dojo.lite library.   I've experienced this on Firefox, Chrome and Brave, I don't run IE, and it happens on Linux, not sure about Windows.


It might be related to this error, which I run into more frequently: 

Thanks

0 Kudos
mgeorge
Esri Contributor

Strange. I actually use Linux + chrome for my daily driver but have not yet seen this -- if you are able to provide me a repro I can take a look at this personally. The error is related to setting up the shared memory region that eventually gets pushed to the GPU (via a texture) to pass per-feature information (visual variables, filter states, etc). Does this happen when loading?

0 Kudos
AndrewMurdoch1
Occasional Contributor II

Yes, it's always well loading.

In our use case we're stacking multiple GIS layers on top of each other which are rendered from WKT parsed into GeoJSON, I'll see what I can do to get you a repo that fails on my local system and if I can run into this issue I'll try to grab a HAR capture.

Thanks!


0 Kudos
AndrewMurdoch1
Occasional Contributor II

We haven't ran into this for the last few days, if we do I'll try to log it.

0 Kudos
mgeorge
Esri Contributor

Thanks Andrew Murdoch‌, I'll be looking out for this as well. 

0 Kudos
AndrewMurdoch1
Occasional Contributor II

Good Day

This issue disappeared for months but now it's popping up, but I can't seem to figure out any pattern.  Would it be possible to edit the error message to show what's happening to help debugging, or catch the error in dojo-lite and discard it?  I haven't been able to make a source repo that demonstrates the problem. 

Thanks

0 Kudos
mgeorge
Esri Contributor

Andrew Murdoch‌ do you see any adverse affects in your apps when you see the above error (i.e., the "infinite-loop" bug in the OP), or just the error? 

Likely this is a race that has to do with a layer being added/removed very quickly (probably with 100 ms of being added). When you create a FeatureLayer, that spins up a connection to a worker which communicate over a message port. The error "Can't invoke, port is closed" coming from the AttributeStore means that while the worker was trying to setup the shared memory region (which happens immediately when the connection is established), the connection was closed. We can potentially move this error behind a flag, as this likely shouldn't have any adverse consequences. 

Does this sound about right for your case? Does your app add/remove a layer very quickly? 

0 Kudos
AndrewMurdoch1
Occasional Contributor II

Yes, that's very likely for our use case, as we store the data in the the browser and fetch it from IndexDB when we need it.  Is there a way I can listen for the connect to be ready / set before I go to create the feature layer?

0 Kudos