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

iOS crashes when invoking KommunicateFlutterPlugin.buildConversation #90

Closed
mbtodorov opened this issue Sep 10, 2023 · 13 comments
Closed
Assignees

Comments

@mbtodorov
Copy link

Hello 👋

We are using the kommunicate SDK. We've been having issues with crashes in our iOS production application for a while. Its impacted 110 sessions for the past 14 days in our app. We noticed that the release notes in the latest version of the SDK, 1.7.0, included a 'fixed crashes' items. We assumed this might address the crashes we are having.

image

However, even after upgrading to your latest version, the crashes still persist

image

I appreciate I haven't given any useful information around reproducing the issue. This is because we cant consistently reproduce it, there seem to be no clear steps. Let me know if I can provide any other helpful logs or other information. Any updates around this would be much appreciated!

Here is the entry for kommunicate_sdk from pubspec.lock:

  kommunicate_flutter:
    dependency: transitive
    description:
      name: kommunicate_flutter
      sha256: "915931eeec6e5abf5f450cda2be378c7d106e8e90bbc3501fda20bffbeecf05b"
      url: "https://pub.dev"
    source: hosted
    version: "1.7.0"

Here are all kommunicate-related entries from Podfile.lock:

  - Kommunicate (6.9.9):
    - KommunicateChatUI-iOS-SDK (~> 1.1.6)
  - kommunicate_flutter (0.0.1):
    - Flutter
    - Kommunicate (~> 6.9.2)
  - KommunicateChatUI-iOS-SDK (1.1.6):
    - KommunicateChatUI-iOS-SDK/Complete (= 1.1.6)
  - KommunicateChatUI-iOS-SDK/Complete (1.1.6):
    - iOSDropDown
    - Kingfisher (~> 7.6.2)
    - KommunicateChatUI-iOS-SDK/RichMessageKit
    - KommunicateCore-iOS-SDK (~> 1.1.1)
    - SwipeCellKit (~> 2.7.1)
    - ZendeskChatProvidersSDK (~> 3.0.0)
  - KommunicateChatUI-iOS-SDK/RichMessageKit (1.1.6)
  - KommunicateCore-iOS-SDK (1.1.1)
@Sathyan-KM
Copy link
Contributor

@mbtodorov Thanks for reporting the issue. Let me check it. If I need more details , Will reach out to you.

@AbhijeetRanjan308
Copy link
Contributor

Hello @mbtodorov, could you please share the data you're passing in the 'build conversation' function? We're attempting to replicate the scenario that led to the crash.

@mbtodorov
Copy link
Author

Yes, certainly!

class LiveChat {
  const LiveChat();

  /// Checks whether the user is currently logged in.
  Future<bool> get _isLoggedIn async =>
      await KommunicateFlutterPlugin.isLoggedIn() == true;

  Future<void> launchConversation({
    required String botId,
    required String userId,
    required String displayName,
    String? contactNumber,
    required String email,
    Map<String, dynamic>? metadata,
  }) async {
    if (!await _isLoggedIn) {
      final user = <String, dynamic>{
        'appId': kLiveChatAppId,
        'userId': email,
        'displayName': displayName,
        'contactNumber': contactNumber,
        'email': email,
        'metadata': metadata,
      };

      await KommunicateFlutterPlugin.login(user);
    }

    final conversationSettings = {
      'appId': kLiveChatAppId,
      'isSingleConversation': false,
      'conversationAssignee': botId,
    };

    await KommunicateFlutterPlugin.buildConversation(conversationSettings);
  }
}

@AbhijeetRanjan308
Copy link
Contributor

Thank you @mbtodorov for providing the details. Could you please specify if this issue is occurring on a particular iOS version or device, such as iPhone SE or iPhone 14?

@mbtodorov
Copy link
Author

Sure, let me share the analytics we have around this error from the production app:

This is the OS version distribution:

image

It seems the error is hapenning on a lot of iOS versions, so I dont assume its some specific to an iOS version

And here is the device distribution, again it seems that its not tied to a single device:

image

device architecture distribtuion:
image

If it will help, I am happy to also provide some recordings from user bug reports, which show the app crashing

@AbhijeetRanjan308
Copy link
Contributor

Yes please share those crash videos, they will be very helpful.

@mbtodorov
Copy link
Author

@AbhijeetRanjan308 could I email the recordings to you privately? We also have a slack channel with kommunicate and our company (stint), where I can share this

@AbhijeetRanjan308
Copy link
Contributor

Absolutely! Please feel free to send the email to [email protected]

@AbhijeetRanjan308
Copy link
Contributor

Hi @mbtodorov, just following up – did you send the videos via email or Slack?

@mbtodorov
Copy link
Author

Apologies, this slipped my mind yesterday. I have now sent an email to [email protected] which references this issue and includes an attached recording. Let me know if I can help in any other way!

@AbhijeetRanjan308 AbhijeetRanjan308 self-assigned this Oct 26, 2023
@AbhijeetRanjan308
Copy link
Contributor

Hi @mbtodorov , we wanted to follow up on the release version 1.7.3 as we previously updated you via email about the changes. Has this issue been resolved for you?

@mbtodorov
Copy link
Author

Hello. Yes, I can confirm that we updated the kommunicate plugin and the crash was fixed. Happy to close this!

@AbhijeetRanjan308
Copy link
Contributor

Thank you @mbtodorov for the update. We are glad to hear that the issue has been resolved.

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

3 participants