maps: [Bug]: Exception in ViewTagResolver after app reloading
Mapbox Implementation
Mapbox
Mapbox Version
10.16.2
Platform
Android
@rnmapbox/maps version
#main
Standalone component to reproduce
// I could not reproduce it in the Example app
export default () => {};
Observed behavior and steps to reproduce
The issue occurs after hot reloading or reloading via terminal in debug mode. To avoid it only helps full(force) closing the app
Expected behavior
No issues
Notes / preliminary analysis
Looks like making the manager optional and adding guards when extracting it, solves the problem
private val manager : UIManager?
get() =
if (BuildConfig.IS_NEW_ARCHITECTURE_ENABLED) {
UIManagerHelper.getUIManager(context, UIManagerType.FABRIC)
} else {
UIManagerHelper.getUIManager(context, UIManagerType.DEFAULT)
}
Additional links and references
About this issue
- Original URL
- State: open
- Created 7 months ago
- Reactions: 2
- Comments: 17 (14 by maintainers)
I’m seeing this as well. First load works OK, but if you put the app into the background and then bring it back active I get an Exception in Native call from JS in ViewTagResolver.kt:51.
For info, I am NOT using new arch and I see this on both Mapbox 10 and 11.