[Bug]: iOS crash during dev reload — NavModule event emitters called with invalid bridge
メンテナーはふだん 5 日以内に返信
評価
この issue はまだ評価されていません。
説明
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+
- 主要言語
- TypeScript
- スター
- 226
- フォーク
- 39
- 平均マージ
- 1日 20時間
- マージ済み PR(30日)
- 7
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートあり
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
googlemaps/react-native-navigation-sdk のほかの issue
-
[Support Request]: Status of Expo config plugin release (prebuild fails on 0.19.0)対応中かも @jokerttu が 1 日前に担当しました。 オープン
googlemaps/react-native-navigation-sdk#711 · 担当者 1 名 ·
メンテナーはふだん 5 日以内に返信
-
[Bug]: In-navigation notification can't be stopped対応中かも @jokerttu が 8 日前に担当しました。 オープンtriage me type: bug
googlemaps/react-native-navigation-sdk#696 · 担当者 1 名 ·
メンテナーはふだん 5 日以内に返信
-
[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 cost対応中かも @illuminati1911 が 14 日前に担当しました。 オープンtriage me type: bug
googlemaps/react-native-navigation-sdk#687 · 担当者 1 名 ·
メンテナーはふだん 5 日以内に返信
-
[Bug]: iOS crash in GMSObjectDataCache Core Data save (fatal optimistic locking failure)再び着手できるかも @illuminati1911 が 60 日前に担当しましたが、オープン中のプルリクエストはありません。 オープンnative sdk issue
googlemaps/react-native-navigation-sdk#647 · コメント 1 件 · 担当者 1 名 ·
メンテナーはふだん 5 日以内に返信
-
[Bug]: CarPlay map view never sets GMSMapViewOptions.screen, so the navigation header and footer are sized for the phone再び着手できるかも @jokerttu が 73 日前に担当しましたが、オープン中のプルリクエストはありません。 オープン
googlemaps/react-native-navigation-sdk#640 · コメント 4 件 · リアクション 1 件 · 担当者 1 名 ·
メンテナーはふだん 5 日以内に返信
googlemaps/react-native-navigation-sdk の issue をすべて見る
似ている issue
-
pending close triaging
難易度 1/5 1〜3時間 初心者へのやさしさ 74/100
anomalyco/opencode#63090 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
ai-driven-qa bug claude Cosmetic
難易度 2/5 1〜3時間 初心者へのやさしさ 74/100
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
メンテナーはふだん 1 日以内に返信
-
ai-driven-qa bug claude Minor
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
linagora/twake-mail-admin#609 ·
メンテナーはふだん 1 日以内に返信