Hello,
I have developed a custom widget using ArcGIS Experience Builder Developer Edition.
The widget works correctly:
Locally (Developer Edition)
In Experience Builder Live View on the Portal
However, after publishing the app and opening it in Preview, the widget no longer works. I receive the following error:
Cannot read properties of null (reading 'view')
It appears that JimuMapView is null after publishing.
Here is the relevant code where I initialize the map view:
I’m unsure why JimuMapView becomes null only after publishing, while it works correctly in Live View and locally.
Has anyone experienced this behavior or knows what might cause this difference between Live and Published modes?
Thank you in advance for your help.
are you using a class based widget or functional based widget?
I presume you set the map in a map widget settings before publishing right?
We might need to see a bit more code than those two methods.
My gut says its an issue with life cycle of the widget. When you do it in live mode vs preview does it act the same or does preview also do something similar with an error?