config-plugin-react-native-intercom icon indicating copy to clipboard operation
config-plugin-react-native-intercom copied to clipboard

Error Initalizing SDK

Open Joshandrews43 opened this issue 2 years ago • 3 comments

EDIT: Assuming this is because im using v6, but will leave this here for a few days to check EDIT 2: Swapped to "@intercom/intercom-react-native": "4.0.1", as specified in the docs and now it crashes

Trying to set this up for the first time and get this error: [Error: ERROR - Tried to update user, but there was a problem with the SDK's initialisation.]

Also Intercom.present() shows the intercom client, but it is stuck in a loading state.

Using expo 49 and I've triple checked all my API keys and app Id are correct

Package.json:

    "@intercom/intercom-react-native": "^6.2.0",
    "config-plugin-react-native-intercom": "^1.10.1",
    "expo-build-properties": "~0.8.3",

My config:

[  
  "config-plugin-react-native-intercom",
    {
      "iosApiKey": "xxx",
      "androidApiKey": "xxx",
      "appId": "xxxx",
      "iosPhotoUsageDescription": "XXXX uses photos for you to upload to support agents",
      "isPushNotificationsEnabledIOS": true,
      "isPushNotificationsEnabledAndroid": true
    }
],

Joshandrews43 avatar Nov 09 '23 23:11 Joshandrews43

I am also experiencing crashes on iOS only with the combination of:

  • Expo SDK 49.0.16
  • @intercom/intercom-react-native 4.0.1
  • config-plugin-react-native-intercom 1.10.1

This is following a large app upgrade from Expo SDK 46 -> 49, which was actually performed via creating a new "clean" app on Expo SDK 49 and re-installing dependencies and re-importing code. Previous versions just for reference where everything was working were:

  • Expo SDK 46.0.21
  • @intercom/intercom-react-native 3.0.3
  • config-plugin-react-native-intercom 1.6.10

My understanding at the moment is that:

  • config-plugin-react-native-intercom 1.10.1 has a peerDependency on @intercom/intercom-react-native ^4.0.1 and hence will not accept 5.x or 6.x versions
  • From other threads, suspect there are some bugs in @intercom/intercom-react-native 4.0.1 that are only fixed in 5.x or 6.x

Does anyone have a method of either:

  1. Using config-plugin-react-native-intercom with @intercom/intercom-react-native 6.x
  2. Resolving the iOS crashes with @intercom/intercom-react-native 4.0.1
  3. Any other way of using @intercom/intercom-react-native 6.x with Expo SDK 49 on managed workflow without any config plugin or a different one?

My only other option would seem to be to roll my own config plugin or "hacking" at this one to support the newer intercom versions?

julianpensionjar avatar Nov 10 '23 11:11 julianpensionjar

Did you was able to fix this problem?

hlarrainq avatar Dec 20 '23 04:12 hlarrainq

Not fully - see this thread for my other comments: https://github.com/cmaycumber/config-plugin-react-native-intercom/issues/72

Current on v5.3.1 with the "local" config plugin in the gist linked in that thread. Plan on coming back to this in the new year as I need to get push notifications up and running - ideally we have a new version of this config plugin that works with Intercom v6 libs.

julianmclean avatar Dec 20 '23 11:12 julianmclean