I've been trying to implement the UNREAD_MESSAGE_COUNT_CHANGED listener in the React Native app I'm currently working on (Bible.is), but it's crashing the app with the following error:
Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'Error when sending event: com.freshworks.freshchat_unread_message_count_changed with body: (null). Bridge is not set. This is probably because you've explicitly synthesized the bridge in RNFreshchatSdk, even though it's inherited from RCTEventEmitter.'
*** First throw call stack:
(
0 CoreFoundation 0x00007fff203fbbb4 __exceptionPreprocess + 242
1 libobjc.A.dylib 0x00007fff2019ebe7 objc_exception_throw + 48
2 Foundation 0x00007fff20750da9 -[NSMutableDictionary(NSMutableDictionary) classForCoder] + 0
3 BibleIs 0x000000010d5d24be -[RCTEventEmitter sendEventWithName:body:] + 494
4 BibleIs 0x000000010d4dc806 -[RNFreshchatSdk messageCountUpdated:] + 86
5 CoreFoundation 0x00007fff2033bedc __CFNOTIFICATIONCENTER_IS_CALLING_OUT_TO_AN_OBSERVER__ + 12
6 CoreFoundation 0x00007fff2033bea2 ___CFXRegistrationPost_block_invoke + 49
7 CoreFoundation 0x00007fff2033b404 _CFXRegistrationPost + 496
8 CoreFoundation 0x00007fff2033ad37 _CFXNotificationPost + 806
9 Foundation 0x00007fff207cd653 -[NSNotificationCenter postNotificationName:object:userInfo:] + 82
10 BibleIs 0x000000010d311689 __40+[FCLocalNotification post:sender:info:]_block_invoke + 73
11 libdispatch.dylib 0x00007fff20110876 _dispatch_call_block_and_release + 12
12 libdispatch.dylib 0x00007fff20111a56 _dispatch_client_callout + 8
13 libdispatch.dylib 0x00007fff2011ee20 _dispatch_main_queue_callback_4CF + 1073
14 CoreFoundation 0x00007fff2036985d __CFRUNLOOP_IS_SERVICING_THE_MAIN_DISPATCH_QUEUE__ + 9
15 CoreFoundation 0x00007fff203640ba __CFRunLoopRun + 2772
16 CoreFoundation 0x00007fff20363103 CFRunLoopRunSpecific + 567
17 GraphicsServices 0x00007fff2c851cd3 GSEventRunModal + 139
18 UIKitCore 0x00007fff24ffbe63 -[UIApplication _run] + 928
19 UIKitCore 0x00007fff25000a53 UIApplicationMain + 101
20 BibleIs 0x000000010d06fb38 main + 104
21 dyld 0x000000010f670e1e start_sim + 10
22 ??? 0x0000000000000001 0x0 + 1
23 ??? 0x0000000000000001 0x0 + 1
)
libc++abi: terminating with uncaught exception of type NSException
Did anyone face this before or have an idea of what to do to fix it?