I've created a web map and web application using Developer WAB, when I swapped layers using the Admin Tools (find/replace layers using url), the web app broke (See image below for web app and console error). However the web map still works when launched independently.
The only workaround I have found is to make a copy of the map and switch the web map id in the application. However this is not ideal as we would have to do this everytime we need to swap layers.
Has anyone experienced anything similar and found a fix?
The likely issue is that the wab app is maintaining one or more references to a particular layer that was in the web map that is not now. In WAB dev try removing the layerlist widget and the legend widget and readding them. You will need to do the same for any other widgets that have a specific reference to the web map layers (i.e. query widget, filter widget, etc).
Thanks for the quick response! I am using the admin tools to swap my layers and am not removing any layers or changing any layer id's. Since I am simply changing the urls for the layers to reference a new urls. I don't believe this should have any references in the web application? Is that correct?