I've been getting the error message "The layer, LAYER NAME, cannot be added to the map". I'm working on ArcGIS Online, not a portal.
I've created a hosted layer view by joining two hosted feature services using the ArcGIS Online analysis join tool (attribute join using one pair of fields). The layer was created successfully. It sometimes will open in web maps, but this is certainly not repeatable. I have better luck opening it in a fresh web map, with less frequent errors (but still occurring). Once opened it performs well.
Both join layers were originally published using ArcGIS Pro. The service definition of the non-target layer has recently been updated using a python script that is scheduled to run nightly – the feature service works perfectly fine, but thought this was worth mentioning in case it's somehow related to the performance issues of the join output layer.
Has anyone else experienced this, and under what circumstances?
Do we have any solutions or should I contact Esri support?
Best way to find what is causing this error is hitting F12 on your browser. This will open your browsers 'developer tools'.
Once open click on the Network Tab
Have a look and see if there are any errors coming through they will show up with a red cross.
Let me know whaterror you are getting.
Initially it wouldn't open in an existing web map, and would in a new. A couple of times it did open in the existing, and didn't in the new...
I've just tried again, removing the layer and adding it, and it's now working without any issues. I'm going to continue messing with this in the future and will keep an eye on error messages in case I can find any more info to share.
I wonder if I didn't upload the service definition of one of the layers used in the join correctly (I'm a novice with ArcGIS Python API). No errors or any other signs of issues apart from the resulting join layer not drawing consistently...