org.json.JSONException: Value v2 of type java.lang.String cannot be converted to JSONObject com.chartboost.sdk.Chartboost.cacheInterstitial(SourceFile:820) android.os.Handler.handleCallback(Handler.java:725) android.os.Handler.dispatchMessage(Handler.java:92) android.os.Looper.loop(Looper.java:137) com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1102) com.android.internal.os.ZygoteInit.main(ZygoteInit.java:869) Its happening only on first launch right after app installation. After first launch, everything seems to be working fine. I saw stackoverflow post related to this error. It says that we need to create campaigns. I have campaign set up and running. Out of 5 campaigns, 3 are disabled and 2 running ( one static and one video publishing campaigns ) I am stressing one more time "Its happening only on first launch after app installation" UPDATE: Adding some more logs I found 07-29 15:17:59.296: D/Unity(6374): ? getMethodID("com.chartboost.sdk.unity.CBPlugin", "showInterstitial", "(Ljava/lang/String;)V", non-static) 07-29 15:17:59.306: D/Unity(6374): ? getMethodID("com.chartboost.sdk.unity.CBPlugin", "cacheInterstitial", "(Ljava/lang/String;)V", non-static)

Stack Overflow | Arun | 7 months ago
tip
Click on the to mark the solution that helps you, Samebug will learn from it.
As a community member, you’ll be rewarded for you help.
  1. 0

    Chartboost Unity Issue on first app launch event after installation

    Stack Overflow | 7 months ago | Arun
    org.json.JSONException: Value v2 of type java.lang.String cannot be converted to JSONObject com.chartboost.sdk.Chartboost.cacheInterstitial(SourceFile:820) android.os.Handler.handleCallback(Handler.java:725) android.os.Handler.dispatchMessage(Handler.java:92) android.os.Looper.loop(Looper.java:137) com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1102) com.android.internal.os.ZygoteInit.main(ZygoteInit.java:869) Its happening only on first launch right after app installation. After first launch, everything seems to be working fine. I saw stackoverflow post related to this error. It says that we need to create campaigns. I have campaign set up and running. Out of 5 campaigns, 3 are disabled and 2 running ( one static and one video publishing campaigns ) I am stressing one more time "Its happening only on first launch after app installation" UPDATE: Adding some more logs I found 07-29 15:17:59.296: D/Unity(6374): ? getMethodID("com.chartboost.sdk.unity.CBPlugin", "showInterstitial", "(Ljava/lang/String;)V", non-static) 07-29 15:17:59.306: D/Unity(6374): ? getMethodID("com.chartboost.sdk.unity.CBPlugin", "cacheInterstitial", "(Ljava/lang/String;)V", non-static)

    Root Cause Analysis

    1. org.json.JSONException

      Value v2 of type java.lang.String cannot be converted to JSONObject com.chartboost.sdk.Chartboost.cacheInterstitial(SourceFile:820) android.os.Handler.handleCallback(Handler.java:725) android.os.Handler.dispatchMessage(Handler.java:92) android.os.Looper.loop(Looper.java:137) com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1102) com.android.internal.os.ZygoteInit.main(ZygoteInit.java:869) Its happening only on first launch right after app installation. After first launch, everything seems to be working fine. I saw stackoverflow post related to this error. It says that we need to create campaigns. I have campaign set up and running. Out of 5 campaigns, 3 are disabled and 2 running ( one static and one video publishing campaigns ) I am stressing one more time "Its happening only on first launch after app installation" UPDATE: Adding some more logs I found 07-29 15:17:59.296: D/Unity(6374): ? getMethodID("com.chartboost.sdk.unity.CBPlugin", "showInterstitial", "(Ljava/lang/String;)V", non-static) 07-29 15:17:59.306: D/Unity(6374): ? getMethodID("com.chartboost.sdk.unity.CBPlugin", "cacheInterstitial", "(Ljava/lang/String;)V", non-static)

      at com.chartboost.sdk.Libraries.e$a.k()
    2. com.chartboost.sdk
      CBPlugin$4.run
      1. com.chartboost.sdk.Libraries.e$a.k(SourceFile:495)
      2. com.chartboost.sdk.c.D(SourceFile:744)
      3. com.chartboost.sdk.c.A(SourceFile:718)
      4. com.chartboost.sdk.impl.ad.e(SourceFile:147)
      5. com.chartboost.sdk.e.c(SourceFile:170)
      6. com.chartboost.sdk.e.b(SourceFile:125)
      7. com.chartboost.sdk.Chartboost$7.run(SourceFile:815)
      8. com.chartboost.sdk.Chartboost.a(SourceFile:1394)
      9. com.chartboost.sdk.Chartboost.cacheInterstitial(SourceFile:820)
      10. com.chartboost.sdk.unity.CBPlugin$4.run(Unknown Source)
      10 frames