Description
Mapbox Implementation
Mapbox
Mapbox Version
10.1.33
React Native Version
0.76.6
Platform
Android
@rnmapbox/maps
version
10.1.33
Standalone component to reproduce
Index page (for navigation test : index <-> map):
import React from 'react';
import {View,Text} from 'react-native';
import { Link } from 'expo-router';
export default function EventList() {
return (
<View>
<Link href={{pathname: "/map"}}>
<Text>TEST MAP</Text>
</Link>
</View>
);
}
Map page
import React from 'react';
// importa Mapbox and set token
import Mapbox from '@rnmapbox/maps';
// (token is defined here, but commented for your rule) Mapbox.setAccessToken('xxxxxxxxxxxxxxx');
import { MapView } from '@rnmapbox/maps';
import { View } from 'react-native';
export default function Map() {
return (
<View style={{flex: 1}}>
<MapView style={{flex: 1}}/>
</View>
);
};
Observed behavior and steps to reproduce
The error “Mapbox [error] ViewTagResolver | view: null found with tag: xxxx but it's either null or not the correct type” appears randomly as soon as you arrive on the map, sometimes yes, sometimes no.
Note that the “with tag” increases as the error is encountered (may help debugging).
See captures taken one by one. And the console for more details.
After a round-trip index-map
After a round-trip index-map
After a round-trip index-map
After a round-trip index-map
After a round-trip index-map
Expected behavior
Do not display this error.
Notes / preliminary analysis
The “with tag: xxx” increases as the error is encountered.
If the error doesn't appear, go to the map, zoom in or out, then back to the index, then back to the map.
It can take 4 or 5 round trips before there's an error, sometimes 0, sometimes more.
My package.json :
{
"name": "projectname",
"main": "expo-router/entry",
"version": "1.0.1",
"scripts": {
"start": "expo start",
"reset-project": "node ./scripts/reset-project.js",
"android": "expo run:android",
"ios": "expo run:ios",
"web": "expo start --web",
"test": "jest --watchAll",
"lint": "expo lint"
},
"jest": {
"preset": "jest-expo"
},
"dependencies": {
"@expo/vector-icons": "^14.0.2",
"@react-native-async-storage/async-storage": "1.23.1",
"@react-navigation/bottom-tabs": "^7.2.0",
"@react-navigation/native": "^7.0.14",
"@rnmapbox/maps": "^10.1.33",
"@tanstack/react-query": "^4.36.1",
"axios": "^1.7.9",
"expo": "~52.0.27",
"expo-blur": "~14.0.3",
"expo-checkbox": "~4.0.1",
"expo-font": "~13.0.3",
"expo-image-picker": "~16.0.4",
"expo-linear-gradient": "~14.0.2",
"expo-linking": "~7.0.5",
"expo-router": "~4.0.17",
"expo-splash-screen": "~0.29.21",
"expo-status-bar": "~2.0.1",
"expo-system-ui": "~4.0.7",
"react": "18.3.1",
"react-dom": "18.3.1",
"react-native": "^0.76.6",
"react-native-gesture-handler": "~2.20.2",
"react-native-reanimated": "~3.16.1",
"react-native-safe-area-context": "4.12.0",
"react-native-screens": "~4.4.0",
"react-native-web": "~0.19.13",
"react-native-webview": "13.12.5"
},
"devDependencies": {
"@babel/core": "^7.25.2",
"@react-native-community/cli": "^15.1.3",
"@types/jest": "^29.5.12",
"@types/react": "~18.3.12",
"@types/react-test-renderer": "^18.3.0",
"jest": "^29.2.1",
"jest-expo": "~52.0.3",
"react-test-renderer": "18.3.1",
"typescript": "^5.3.3"
},
"private": true
}
My device :
Android Emulator - OUKITEL_API_31:5554
Additional links and references
No response