[IOS] App crashes on Restart with NSInternalInconsistencyException
See original GitHub issue“react-native-fcm”: “15.0.2”, ios Simuator: ios version 11.2.0 (16G1314) app running in foreground
I am using wix/react-native-navigation.
the last function it is calling before app crashes is
FCM.enableDirectChannel(); FCM.on(FCMEvent.DirectChannelConnectionChanged, (data) => { console.log(
direct channel connected ${data}); }); setTimeout(() => { FCM.isDirectChannelEstablished().then((d) => console.log(d)); }, 1000); }
app crashes only in debug mode with the following error
Fatal Exception: NSInternalInconsistencyException Error when sending event: FCMDirectChannelConnectionChanged with body: true. Bridge is not set. This is probably because you've explicitly synthesized the bridge in RNFIRMessaging, even though it's inherited from RCTEventEmitter.
this is my AppDelegate.m file
Please let me know if I am missing anything.
Issue Analytics
- State:
- Created 5 years ago
- Comments:7 (3 by maintainers)
Top GitHub Comments
Sorry for the confusion, its just the screen shot continuation. I have not called it twice, first screen shot ends after return Yes, from there its the second screen shot with the same lines to follow the flow.
For myside, open notification from app killed. Please help.
Fatal Exception: NSInternalInconsistencyException Error when sending event: FCMNotificationReceived with body: { “_actionIdentifier” = “com.apple.UNNotificationDefaultActionIdentifier”; “_completionHandlerId” = “2BD076CB-76CA-4B29-A451-017CBBC05A68”; “_notificationType” = “notification_response”; aps = { alert = { body = “tuan12313: le to display the "Green Test" prefix in green.1”; title = “Visitor Message”; }; category = “SHOW_VISITOR_MESSAGES_ACTION”; }; “gcm.message_id” = “0:1556276035386472%db740235db740235”; “google.c.a.e” = 1; “opened_from_tray” = 1; }. Bridge is not set. This is probably because you’ve explicitly synthesized the bridge in RNFIRMessaging, even though it’s inherited from RCTEventEmitter.