Android Zendesk Messaging SDK crash while typing anything on message screen.



Posted Apr 24, 2023

  • Minimum Android SDK: 23
  • Target Android SDK: 31
  • Android Messaging Zendesk SDK: 2.6.0 & above integrated for messaging.

Note: I tried with different SDKs as well. 2.6.0, 2.4.0 

Reference link followed : https://developer.zendesk.com/documentation/zendesk-web-widget-sdks/sdks/android/getting_started/ 

Implementation:

  1. Zendesk SDK initialized using channel key and getting successfully initialized callback as well. 
  2. To open messaging screen > Below mentioned code tried. 
Zendesk.instance.messaging.showMessaging(requireContext())

 

Issue:  With Above screen is opened for a message but as soon as I start typing its crashes with "UninitializedPropertyAccessException" of CoroutineScope from the Zendesk SDK class.

Crash Log : 

FATAL EXCEPTION: main
  Process: com.orgname.myapp.hodor, PID: 25061
    kotlin.UninitializedPropertyAccessException: lateinit property coroutineScope has not been initialized
        at zendesk.messaging.android.internal.conversationscreen.ConversationTypingEvents.sendTypingStartEvent(ConversationTypingEvents.kt:112)
        at zendesk.messaging.android.internal.conversationscreen.ConversationTypingEvents.onTyping(ConversationTypingEvents.kt:83)
        at zendesk.messaging.android.internal.conversationscreen.ConversationScreenCoordinator$onTyping$1.invoke(ConversationScreenCoordinator.kt:189)
        at zendesk.messaging.android.internal.conversationscreen.ConversationScreenCoordinator$onTyping$1.invoke(ConversationScreenCoordinator.kt:188)
        at zendesk.ui.android.conversation.composer.MessageComposerView$special$$inlined$doOnTextChanged$1.onTextChanged(TextView.kt:101)
        at android.widget.TextView.sendOnTextChanged(TextView.java:11065)
        at android.widget.TextView.handleTextChanged(TextView.java:11180)
        at android.widget.TextView$ChangeWatcher.onTextChanged(TextView.java:14168)
        at android.text.SpannableStringBuilder.sendTextChanged(SpannableStringBuilder.java:1268)
        at android.text.SpannableStringBuilder.replace(SpannableStringBuilder.java:577)
        at android.text.SpannableStringBuilder.replace(SpannableStringBuilder.java:508)
        at android.text.SpannableStringBuilder.replace(SpannableStringBuilder.java:38)
        at android.view.inputmethod.BaseInputConnection.replaceText(BaseInputConnection.java:941)
        at android.view.inputmethod.BaseInputConnection.setComposingText(BaseInputConnection.java:712)
        at com.android.internal.inputmethod.RemoteInputConnectionImpl.lambda$setComposingText$25$com-android-internal-inputmethod-RemoteInputConnectionImpl(RemoteInputConnectionImpl.java:724)
        at com.android.internal.inputmethod.RemoteInputConnectionImpl$$ExternalSyntheticLambda19.run(Unknown Source:8)
        at android.os.Handler.handleCallback(Handler.java:942)
        at android.os.Handler.dispatchMessage(Handler.java:99)
        at android.os.Looper.loopOnce(Looper.java:201)
        at android.os.Looper.loop(Looper.java:288)
        at android.app.ActivityThread.main(ActivityThread.java:7884)
        at java.lang.reflect.Method.invoke(Native Method)
        at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:548)
      at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:936)

Also tried with an intent flag while opening messaging but same issue.

There are certain thread already opened but not any solution reply found.

 

Can anyone please help/guide me to resolve this?


0

0

0 comments

Sign in to leave a comment.

Didn't find what you're looking for?

New post