Include the above component in a React Native 0.76 app with the new architecture enabled. Then build and run the app for Android. When prompted, give the app permission to access your location.
Then observe the following problems:
The onLocationUpdate callback only gets called once and is never updated when the location changes
The location pin on the map also doesn't update when the location changes
The following error message appears in the console:
Mapbox [error] ViewTagResolver | view: null found with tag: 428 but it's either null or not the correct type
Expected behavior
The onLocationUpdate callback should be called every time there is a new location (i.e. about once every second). The location pin displayed on the map should update accordingly.
Notes / preliminary analysis
If you set newArchEnabled=false in android\gradle.properties and rebuild the app, everything will work properly.
Mapbox Implementation
Mapbox
Mapbox Version
default
React Native Version
0.76.1
Platform
Android
@rnmapbox/maps
version10.1.33
Standalone component to reproduce
Observed behavior and steps to reproduce
Include the above component in a React Native 0.76 app with the new architecture enabled. Then build and run the app for Android. When prompted, give the app permission to access your location.
Then observe the following problems:
onLocationUpdate
callback only gets called once and is never updated when the location changesExpected behavior
The
onLocationUpdate
callback should be called every time there is a new location (i.e. about once every second). The location pin displayed on the map should update accordingly.Notes / preliminary analysis
If you set
newArchEnabled=false
inandroid\gradle.properties
and rebuild the app, everything will work properly.Additional links and references
Minimal reproducible example app: https://github.com/EmilJunker/RNMapboxTestApp