quickblox-android-sdk icon indicating copy to clipboard operation
quickblox-android-sdk copied to clipboard

Crash on quickblox

Open amcoderz opened this issue 8 months ago • 1 comments

java.lang.RuntimeException: Unable to start activity ComponentInfo{com.quickblox.sample.chat.kotlin.ui.activity.DialogsActivity}: kotlin.UninitializedPropertyAccessException: lateinit property chatConnectionListener has not been initialized at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:3707) at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:3864) at android.app.servertransaction.LaunchActivityItem.execute(LaunchActivityItem.java:103) at android.app.servertransaction.TransactionExecutor.executeCallbacks(TransactionExecutor.java:135) at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:95) at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2253)

I am using below version: implementation "com.quickblox:quickblox-android-sdk-messages:4.0.3" implementation "com.quickblox:quickblox-android-sdk-chat:4.0.3" implementation "com.quickblox:quickblox-android-sdk-content:4.0.3" implementation "com.quickblox:quickblox-android-sdk-videochat-webrtc:4.0.3"

please help me to fix this issue.

amcoderz avatar Mar 26 '25 10:03 amcoderz

Hello @amcoderz

We were unable to reproduce the issue on our sample. sample-chat-kotlin - https://github.com/QuickBlox/quickblox-android-sdk/tree/master/sample-chat-kotlin

The problem is that the field chatConnectionListener is used before initialization. You need to check if you call the method initConnectionListener() before using the variable chatConnectionListener

vdovbnya-qb avatar Mar 27 '25 15:03 vdovbnya-qb