Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Application crashes on iOS (simulator) when calling ZendeskChat.startChat #132

Open
halftheopposite opened this issue Feb 22, 2022 · 7 comments

Comments

@halftheopposite
Copy link

halftheopposite commented Feb 22, 2022

Hi everyone,

I've followed the Getting Started guide:

  • I've done a new pod install and even a pod install --repo-update.
    • Podfile was updated automatically.
  • I've created a ZenDesk account (currently in trial).
  • Obtained the YOUR_ZENDESK_ACCOUNT_KEY and APP_ID_PROVIDED_BY_ZENDESK keys.
  • Called ZendeskChat.init(...) in my index.js file.

But, when executing the code below in a Button press callback, my application crashes and I have absolutely no error message:

ZendeskChat.startChat({
	name: user.full_name,
	email: user.email,
});

I have no idea why this is happening and have no logs at all. I do have a few questions:

  • Do I need to do setup anything else from the ZenDesk iOS installation guide before going on with the Getting Started guide? Or should the auto link capabilities be enough?

Podfile.lock:

  - RNZendeskChat (0.4.1):
    - React-Core
    - ZendeskChatSDK (~> 2.9)
  - ZendeskChatProvidersSDK (2.11.2)
  - ZendeskChatSDK (2.11.1):
    - ZendeskChatProvidersSDK (~> 2.11.1)
    - ZendeskMessagingSDK (~> 3.8.2)
  - ZendeskCommonUISDK (6.1.2)
  - ZendeskMessagingAPISDK (3.8.3):
    - ZendeskSDKConfigurationsSDK (= 1.1.9)
  - ZendeskMessagingSDK (3.8.3):
    - ZendeskCommonUISDK (= 6.1.2)
    - ZendeskMessagingAPISDK (= 3.8.3)
  - ZendeskSDKConfigurationsSDK (1.1.9)

Environment:

  • iOS: simulator.
  • Dependencies:
    • "react-native": "0.64.1"
    • "react-native-zendesk-chat": "^0.4.1"
@shkatulo
Copy link

Experiencing the same issue even in fresh new native iOS project with minimal chat integration according to this docs

@halftheopposite
Copy link
Author

@shkatulo Out of curiosity, where did you obtain the YOUR_ZENDESK_ACCOUNT_KEY from exactly? The screenshots posted in the documentation seems to be outdated for me and I had to look up information on how I could get such a key. Maybe, having a wrong init call could be the issue here? But I highly doubt it.

@shkatulo
Copy link

shkatulo commented Feb 22, 2022

@halftheopposite actually, for me everything looks as on screenshot:

  1. Open "Chat" menu pressing button on the top right (4 squares)
  2. Press user avatar on the top right
  3. Check connection
  4. It's shown there in modal as "Account key"

This key works for me on Android, but iOS app crashes (on device and simulator).

@halftheopposite
Copy link
Author

Thanks for you answer, I just checked with ZenDesk support and I am in an A/B test group right now, hence the slight variation in the UI and UX, but they confirmed that my account key was the correct one anyway.

@shkatulo Are you facing the issue on the iOS simulator only or also on a physical device?

@shkatulo
Copy link

@halftheopposite got it. I have the same crash on device too

@kanadikirik
Copy link

@halftheopposite I fixed this issue with null-check. Please be sure that you don't pass any parameter that value is null or undefined.

@SimajjiHans
Copy link

For me the fix is to change phone field to use string instead of number

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants