react-native-maps: [EXPO SDK 52] Markers randomly do not appear on Android
Summary
After updating to expo 52, my working code for showing markers do not work anymore. My markers on android do not appear. If I change coordinates and reload they appear but after restarting the server they are gone again. I tested multiple things but could not find the cause for disappearance.
Reproducible sample code
import React, { useState } from 'react'
import { View } from 'react-native'
import MapView, { Marker } from 'react-native-maps'
const mapdemo = () => {
const [location, setLocation] = useState({ lng: 20.3443, ltd: 25.435 })
return (
<View >
<MapView style={{
width: "100%",
height: "100%"
}}
initialRegion={{
latitude: location.ltd,
longitude: location.lng,
latitudeDelta: 0.00922,
longitudeDelta: 0.00421
}}
>
<Marker
key={Date.now()}
coordinate={{ latitude: location.ltd, longitude: location.lng }}
></Marker>
</MapView>
</View>
)
}
export default mapdemo
Steps to reproduce
Start the development server on Expo Go and test on my device with Expo Go.
Expected result
Markers to appear on Android map view.
Actual result
No markers appear on map on Android.
React Native Maps Version
1.18.0
What platforms are you seeing the problem on?
Android
React Native Version
0.76.2
What version of Expo are you using?
SDK 52
Device(s)
Samsung Galaxy Z Flip6
Additional information
No response
About this issue
- Original URL
- State: closed
- Created 2 years ago
- Reactions: 15
- Comments: 38
If you use it this way, it doesn’t work in Expo Go, but it works when you export the apk: “android”: { “newArchEnabled”: false, “experimental”: { “enableFabricRenderer”: false } }
see https://github.com/react-native-maps/react-native-maps/issues/5206
we will need to solve this among other issues to be able to support new arch fully, (currently in progress)
i went throught the changelog doc of expo for SDK 52 and found this
they are losing support for google maps in SDK52 and are asking to make those changes in the dev build instead, maybe that’s why they didn’t care about the marker prb
Same issue here, new arch disabled and still not working.
Getting a combination of “Invalid view returned from registry, expecting AIRMap, got: (null)”, markers not appearing, or certain markers appears and disappearing randomly on render.
+1 +1 +1+1 +1 +1+1 +1 +1+1 +1 +1+1 +1 +1
@edgarscr This has do with SDK’s compatibility, although I agree with your point but I feel they didn’t care about the backward compatibility, since they are losing support anyway, just like other libraries. also I seldom think if expo would release a fix.
using it, it works in the apk version, but it still has problems in expo go: “newArchEnabled”: false, “experimental”: { “enableFabricRenderer”: false }