Crash on Login (Smack Packet Reader - XMPPTCPConnection)

Hello,

I’ve integrated cometchat android sdk using the documentation, the login process and fetching of messages was working til yesterday but now my app is getting crashed after the login function is invoked. Below are the logcat logs and the code snippet.

Android 10, API 29
Cometchat AppId: 133561eb6c301d7
Cometchat region: us

build gradle implementation: ‘com.cometchat:pro-android-chat-sdk:2.1.2’

Logcat:

Login function:

private void cometChatLogin(String ccuser) {
if (CometChat.getLoggedInUser() == null) {
CometChat.login(ccuser, authKey, new CometChat.CallbackListener<com.cometchat.pro.models.User>() {
@Override
public void onSuccess(com.cometchat.pro.models.User user) {
Log.d(APP_TAG, "Login successful : " + user.toString());
}

                    @Override
                    public void onError(CometChatException e) {
                        Log.d(APP_TAG, "login failed with exception: " + e.getMessage());
                    }
                });
            }
        }

Please look into this, and let me know if there’s anything else you need to look into this issue.

Hello @vipinb,

We are aware of a crash happening in the Android SDK when you build the app with the latest Android Studio & Gradle plugin. We have identified the cause and are working on releasing a patch for the same. We have created an issue in our internal tracker and will update you once the SDK is released. Can you please confirm that you are getting this crash in Android Studio version 4.1 & Gradle version 4.1.0?

Warm Regards,

Mayur Bhandari
CometChat Pro

Hey @mayur.bhandari

Yes I’m using the Android Studio 4.1 and Gradle 4.1.0. It was working before I updated both of them, is it possible to make it work if I downgrade the gradle version only, keeping Android Studio 4.1 or do I need to wait for the patch or just downgrade both?

Thank you,
Vipin Bathaw

I’ve moved to Gradle 4.0.0 and it is working again. Thank you for pointing out the issue @mayur.bhandari I’ll keep using 4.0.0 till an update is released from you guys. :smile:

1 Like

Hello @vipinb,

Glad to hear that you were able to make it work by downgrading the Gradle plugin version. We will let you know when we release the new SDK with support for Gradle plugin 4.1.0.

Warm Regards,

Mayur Bhandari
CometChat Pro

Hello @vipinb,

Please update to the Android SDK v2.1.3, we have added support for Gradle Plugin 4.1.0.

Warm Regards,

Mayur Bhandari
CometChat Pro

1 Like

Hello @mayur.bhandari

I’ve updated to SDK v2.1.3 and it’s working fine with Gradle Plugin 4.1.0.
Thank you for the support :slight_smile:

1 Like

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.