Answered

App crashes on Pixel 5 with this exception: Expected com.google.gson.JsonObject , but it was com.google.gson.JsonPrimitive

  • 13 May 2022
  • 3 replies
  • 140 views

This is the stacktrace:

 

com.google.gson.internal.bind.TypeAdapters$35$1.read (TypeAdapters.java:60)

com.google.gson.Gson.fromJson (Gson.java:20)

com.google.gson.Gson.fromJson (Gson.java:4)

com.google.gson.Gson.fromJson (Gson.java:9)

com.google.gson.Gson.fromJson (Gson.java)

arrow_right

io.intercom.android.sdk.api.ErrorStringExtractorKt.extractErrorString (ErrorStringExtractorKt.java:30)

io.intercom.android.sdk.api.Api$1.onErrorio.intercom.android.sdk.api.BaseCallback.handleErrorio.intercom.android.sdk.api.BaseCallback.onResponseretrofit2.DefaultCallAdapterFactory$ExecutorCallbackCall$1.lambda$onResponse$0retrofit2.DefaultCallAdapterFactory$ExecutorCallbackCall$1.lambda$onResponse$0$DefaultCallAdapterFactory$ExecutorCallbackCall$1retrofit2.-$$Lambda$DefaultCallAdapterFactory$ExecutorCallbackCall$1$hVGjmafRi6VitDIrPNdoFizVAdk.runandroid.os.Handler.handleCallback (Handler.java:938)

android.os.Handler.dispatchMessage (Handler.java:99)

android.os.Looper.loopOnce (Looper.java:201)

android.os.Looper.loop (Looper.java:288)

android.app.ActivityThread.main (ActivityThread.java:7870)

java.lang.reflect.Method.invoke (Method.java)

com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run (RuntimeInit.java:548)

com.android.internal.os.ZygoteInit.main (ZygoteInit.java:1003)

 

icon

Best answer by Aparna 17 May 2022, 16:20

View original

3 replies

Hey @ludmil​ ! Thanks for sending the crash details. Are you using the latest SDK version? If not can you update to the latest version from here and let me know if it helps to prevent the app from crashing?

I also saw a bug issue opened on our end for errorstringextractorkt.java.

 

 

We are facing this issue as well. Our intercom SDK is at version 12.3.0.

Disappointed with the way tech support has been simply asking us to update the SDK every time there's a crash. There has to be a proper explanation for these crashes, because it impacts our end users who need to be asked to update the app every time something like this happens. And this happen quite often.

This just randomly started with us also, using latest versions packaged with intercom react native

 

Reply