App crashes on Pixel 5 with this exception: Expected com.google.gson.JsonObject , but it was com.google.gson.JsonPrimitive | Community
Skip to main content
Answer

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

  • May 13, 2022
  • 3 replies
  • 166 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)

 

Best answer by Aparna

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.

 

 

3 replies

Forum|alt.badge.img+5
  • Employee
  • Answer
  • May 17, 2022

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.

 

 


  • New Participant
  • June 7, 2022

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.


  • New Participant
  • June 28, 2022

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