cmaycumber / config-plugin-react-native-intercom

Expo plugin for adding @intercom/react-native-intercom using expo config plugins
74 stars 38 forks source link

Intercom Crashing App When loginUnidentifiedUser Is called #64

Closed itajenglish closed 1 year ago

itajenglish commented 1 year ago

Intercom is causing the app to crash when loginUnidentifiedUser() is called. Seems like a regression as this was working for us before.

iOS Error:

NSInvalidArgumentException: -[NSNull code]: unrecognized selector sent to instance 0x1ba9b0020
  0   CoreFoundation                      0x000000018040e7c8 __exceptionPreprocess + 172
  1   libobjc.A.dylib                     0x0000000180051144 objc_exception_throw + 56
  2   CoreFoundation                      0x000000018041d47c +[NSObject(NSObject) instanceMethodSignatureForSelector:] + 0
  3   CoreFoundation                      0x00000001804126c8 ___forwarding___ + 1308
  4   CoreFoundation                      0x0000000180414b4c _CF_forwarding_prep_0 + 92
  5   ListedBLocal                        0x0000000105159898 RCTJSErrorFromCodeMessageAndNSError + 736
  6   ListedBLocal                        0x0000000105159578 RCTJSErrorFromNSError + 236
  7   ListedBLocal                        0x00000001050f6cac __41-[RCTModuleMethod processMethodSignature]_block_invoke_4.56 + 132
  8   ListedBLocal                        0x000000010532bc2c __48-[IntercomModule loginUnidentifiedUser:failure:]_block_invoke.47 + 72
  9   Intercom                            0x0000000107f99054 shouldRenderOnNewLine + 29592
  10  Intercom                            0x0000000107f6c058 IntercomSDK_PINRemoteImageManagerSubclassOverridesSelector + 228636
  11  Intercom                            0x0000000107f6c294 IntercomSDK_PINRemoteImageManagerSubclassOverridesSelector + 229208
  12  Intercom                            0x0000000107f662ac IntercomSDK_PINRemoteImageManagerSubclassOverridesSelector + 204656
  13  Intercom                            0x0000000107f98d90 shouldRenderOnNewLine + 28884
  14  Intercom                            0x0000000107f84c54 IntercomSDK_PINRemoteImageManagerSubclassOverridesSelector + 330008
  15  Intercom                            0x0000000107f85864 IntercomSDK_PINRemoteImageManagerSubclassOverridesSelector + 333096
  16  libdispatch.dylib                   0x0000000180133fa4 _dispatch_call_block_and_release + 24
  17  libdispatch.dylib                   0x0000000180135768 _dispatch_client_callout + 16
  18  libdispatch.dylib                   0x0000000180145018 _dispatch_main_queue_drain + 1220
  19  libdispatch.dylib                   0x0000000180144b44 _dispatch_main_queue_callback_4CF + 40
  20  CoreFoundation                      0x0000000180372ca4 __CFRUNLOOP_IS_SERVICING_THE_MAIN_DISPATCH_QUEUE__ + 12
  21  CoreFoundation                      0x000000018036d360 __CFRunLoopRun + 1956
  22  CoreFoundation                      0x000000018036c7a4 CFRunLoopRunSpecific + 584
  23  GraphicsServices                    0x0000000188ff7c98 GSEventRunModal + 160
  24  UIKitCore                           0x000000010d85a37c -[UIApplication _run] + 868
  25  UIKitCore                           0x000000010d85e374 UIApplicationMain + 124
  26  ListedBLocal                        0x00000001049f2020 main + 96
  27  dyld                                0x0000000107a21fa0 start_sim + 20
  28  ???                                 0x000000010792df28 0x0 + 4422033192
  29  ???                                 0x1f40800000000000 0x0 + 2251940551173603328

expo: 47.0.14 config-plugin-react-native-intercom: 1.9.0 @intercom/intercom-react-native: 4.0.1 react-native: 0.70.8

alistairholt commented 1 year ago

See https://github.com/cmaycumber/config-plugin-react-native-intercom/pull/60

itajenglish commented 1 year ago

See https://github.com/cmaycumber/config-plugin-react-native-intercom/pull/60

The fix seemed to have been published in 1.9.0 but doesn't work for me. However I have upgraded to Expo 48 without issue.

jferrettiboke commented 1 year ago

It seems that it's not functioning properly on Expo 47, even after updating all the dependencies to the latest versions.

"@intercom/intercom-react-native": "^5.1.1",
"config-plugin-react-native-intercom": "^1.10.1",
"expo": "~47.0.14",