[Bug]: iOS crash during dev reload — NavModule event emitters called with invalid bridge
I maintainer di solito rispondono entro 5 giorni
Valutazione
Questa issue non è ancora stata valutata.
Descrizione
Bug Description
During React Native development reloads (e.g. CMD+R or fast refresh), the app crashes on iOS because callback methods in NavModule.mm attempt to emit events through the React Native bridge after it has been invalidated/torn down.
The crash occurs because navigation callbacks (onLocationChanged, onArrival, onRemainingTimeOrDistanceChanged, onRouteChanged, onReroutingRequestedByOffRoute, onStartGuidance, onTurnByTurn) continue to fire after the bridge is destroyed during reload, and the emit* calls throw exceptions when the bridge is unavailable.
Steps to Reproduce
- Start a React Native app using
@googlemaps/react-native-navigation-sdkon iOS - Begin an active navigation session (so callbacks are firing)
- Trigger a development reload (CMD+R or save a file with fast refresh)
- App crashes
Expected Behavior
The app should gracefully handle the bridge being unavailable during reload without crashing.
Suggested Fix
Wrap each emit* call in the INavigationCallback methods in NavModule.mm with a try-catch block to silently ignore exceptions when the bridge is invalid during reload. The affected methods are:
onLocationChanged:onArrival:onRemainingTimeOrDistanceChangedWithNavigator:onRouteChangedonReroutingRequestedByOffRouteonStartGuidanceonTurnByTurn:
Example fix for one method:
- (void)onLocationChanged:(NSDictionary *)mappedLocation {
try {
[self emitOnLocationChanged:@{@"location" : mappedLocation}];
} catch (...) {
// Bridge may be invalid during dev reload - ignore to prevent crash
}
}
The same pattern applies to all 7 callback methods listed above.
Environment
- SDK version: 0.14.1
- Platform: iOS
- React Native: 0.76+
- Lingua principale
- TypeScript
- Stelle
- 226
- Fork
- 39
- Merge medio
- 1g 20h
- PR unite (30g)
- 7
Preparare l'ambiente
- Nessun Dockerfile né file Docker Compose
- Ha un modello di pull request
- Leggi la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di googlemaps/react-native-navigation-sdk
-
[Support Request]: Status of Expo config plugin release (prebuild fails on 0.19.0)Forse già presa @jokerttu l’ha presa 1 giorno fa. Aperta
googlemaps/react-native-navigation-sdk#711 · 1 assegnatario ·
I maintainer di solito rispondono entro 5 giorni
-
[Bug]: In-navigation notification can't be stoppedForse già presa @jokerttu l’ha presa 8 giorni fa. Apertatriage me type: bug
googlemaps/react-native-navigation-sdk#696 · 1 assegnatario ·
I maintainer di solito rispondono entro 5 giorni
-
[Bug]: [iOS] Navigation SDK init/quota retry loop pins the main thread; React Native's Settings module and addMarker's temporary GMSMarker add to the costForse già presa @illuminati1911 l’ha presa 14 giorni fa. Apertatriage me type: bug
googlemaps/react-native-navigation-sdk#687 · 1 assegnatario ·
I maintainer di solito rispondono entro 5 giorni
-
[Bug]: iOS crash in GMSObjectDataCache Core Data save (fatal optimistic locking failure)Forse di nuovo libera @illuminati1911 l’ha presa 60 giorni fa e non c’è nessuna pull request aperta. Apertanative sdk issue
googlemaps/react-native-navigation-sdk#647 · 1 commento · 1 assegnatario ·
I maintainer di solito rispondono entro 5 giorni
-
[Bug]: CarPlay map view never sets GMSMapViewOptions.screen, so the navigation header and footer are sized for the phoneForse di nuovo libera @jokerttu l’ha presa 73 giorni fa e non c’è nessuna pull request aperta. Aperta
googlemaps/react-native-navigation-sdk#640 · 4 commenti · 1 reazione · 1 assegnatario ·
I maintainer di solito rispondono entro 5 giorni
Tutte le issue di googlemaps/react-native-navigation-sdk
Issue simili
-
pending close triaging
Difficoltà 1/5 1-3 ore Idoneità per principianti 74/100
anomalyco/opencode#63090 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
ai-driven-qa bug claude Cosmetic
Difficoltà 2/5 1-3 ore Idoneità per principianti 74/100
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 76/100
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 76/100
I maintainer di solito rispondono entro 1 giorno
-
ai-driven-qa bug claude Minor
Difficoltà 2/5 1-3 ore Idoneità per principianti 76/100
linagora/twake-mail-admin#609 ·
I maintainer di solito rispondono entro 1 giorno