Long Press on a message CRASH in MessageAdapter.kt:2103

Using UI kit library to open CometChatMessageScreen(). The conversation is loading but if we long press on any message we get the following error.

E/AndroidRuntime: FATAL EXCEPTION: main
Process: com.orbitingv2.debug, PID: 9264
kotlin.KotlinNullPointerException
at adapter.MessageAdapter$setTextData$2.onLongClick(MessageAdapter.kt:2103)
at android.view.View.performLongClickInternal(View.java:7205)
at android.view.View.performLongClick(View.java:7163)
at android.view.View.performLongClick(View.java:7181)
at android.view.View$CheckForLongPress.run(View.java:27294)
at android.os.Handler.handleCallback(Handler.java:883)
at android.os.Handler.dispatchMessage(Handler.java:100)
at android.os.Looper.loop(Looper.java:214)
at android.app.ActivityThread.main(ActivityThread.java:7356)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:492)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:930)

Hi,

It seems like you are using old uikit library. We suggest you to please update to latest UIKit as we have made a lot of optimization and new features are added.
Please check below link for latest UIKit library.
https://github.com/cometchat-team/cometchat-pro-kotlin-ui-kit

1 Like

There was an activity error which was resolved from our side btw thank you for the help we have updated the kit with the latest build.

Hey @Shubham08,
Thanks for letting us know. We are always happy to help!
Please feel free to reach out to us for any CometChat support from the chatbot on your CometChat dashboard or simply email us on help@cometchat.com.

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