crisp-im / crisp-sdk-android

:package: Crisp Android SDK, add a chat in any Android app and communicate with your users.
https://docs.crisp.chat/guides/chatbox-sdks/android-sdk/
Other
56 stars 17 forks source link

Attempt to invoke virtual method 'boolean r2.a.F(java.lang.String)' on a null object reference #108

Closed kakarrot closed 2 years ago

kakarrot commented 2 years ago

Caused by java.lang.NullPointerException: Attempt to invoke virtual method 'boolean r2.a.F(java.lang.String)' on a null object reference at im.crisp.client.internal.a.b.$r8$lambda$DFkpIYdEe1-6xt8rTZnD7wZZf7U(b.java:2) at im.crisp.client.internal.a.b.c(b.java:2) at im.crisp.client.Crisp.resetChatSession(Crisp.java:21) at im.crisp.client.Crisp.configure(Crisp.java:63) at com.ya.core.base.BaseApp.onCreate(BaseApp.java:28) at android.app.Instrumentation.callApplicationOnCreate(Instrumentation.java:1195) at android.app.ActivityThread.handleBindApplication(ActivityThread.java:7202) at android.app.ActivityThread.access$2200(ActivityThread.java:296) at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2208) at android.os.Handler.dispatchMessage(Handler.java:107) at android.os.Looper.loop(Looper.java:213) at android.app.ActivityThread.main(ActivityThread.java:8178) at java.lang.reflect.Method.invoke(Method.java) at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:513) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1101)

Doc1faux commented 2 years ago

Hi @kakarrot and thank you for your feedback.

Could you please specify the SDK version? I suppose it is the latest 1.0.11? Could your provide me also the Android version on which the app was running, maybe the specific device and also what is the context of the crash?

Thanks in advance :)

Doc1faux commented 2 years ago

This is strange because in the latest 1.0.11, there is no obfuscated im.crisp.client.internal.a.b package nor class :/ As I can deduce from the stacktrace, you were trying to configure a different websiteID than the one you already configured? I am not able to reproduce the crash in this case :/ Maybe you could provide more details :)

kakarrot commented 2 years ago

I used SDK is 1.0.9,because I used exoplayer and SDK's exoplayer had upgrade to latest version from 1.0.10,I need time to modify my code to adapt it. Device: HUAWEI P smart 2019 Android Version: 10

Doc1faux commented 2 years ago

OK, so this is happenning on Crisp.resetChatSession(Context) while trying to clear cached website icon. On some edgy cases, I suppose cache could be null in some way implying a crash. Fixed it and will be released in 1.0.12.

Doc1faux commented 2 years ago

@kakarrot 1.0.12 fixing this issue has just been released. It can take a few hours before it will be available. I close the issue.