I have recently upgraded to developer edition 1.12 and I have encountered a bug which prevents one of my custom widgets from loading part of the time. I have traced the error back to jimuMapView evaluating as null despite the fact that it is actually loaded.

The following works 100% of the time in 1.11, but only about 75% of the time in 1.12. My widget is loaded within a section that is not the active view when the page is loaded. The most reliable way to trigger the bug is to launch the page from the Preview in the builder mode. Reloading the Preview usually loads the widget correctly. Using the buttons within my custom widget will also clear the error and cause the rest of the widget to load correctly.
const viewManager = MapViewManager.getInstance()
const jimuMapView = viewManager.getJimuMapViewById(viewManager.getAllJimuMapViewIds()[0])
useEffect(() => {
console.log('using effect')
console.log('jimuMapView', jimuMapView)
if (jimuMapView) {
console.log('jimuMapView exists')
reactiveUtils.whenOnce(() => jimuMapView.view.ready)
.then(() => {
setMapReady(true)
}
)
})
}
}, [jimuMapView])The mapReady state variable triggers the child components which load a custom basemap gallery from the API.