hCaptcha/hcaptcha-android-sdk

HCaptchaConfig IOException writing serializable object

MMarkiz opened this issue · 7 comments

Hello for some time I'm getting crashes from some of users because of serialization problem. Currently I'm using 3.4.0 version, but it also happened few times on 3.3.6.

Some logs:
Fatal Exception: java.lang.RuntimeException
Parcelable encountered IOException writing serializable object (name = com.hcaptcha.sdk.HCaptchaConfig)

Fatal Exception: java.lang.RuntimeException: Parcelable encountered IOException writing serializable object (name = com.hcaptcha.sdk.HCaptchaConfig)
       at android.os.Parcel.writeSerializable(Parcel.java:1714)
       at android.os.Parcel.writeValue(Parcel.java:1662)
       at android.os.Parcel.writeArrayMapInternal(Parcel.java:875)
       at android.os.BaseBundle.writeToParcelInner(BaseBundle.java:1579)
       at android.os.Bundle.writeToParcel(Bundle.java:1233)
       at android.os.Parcel.writeBundle(Parcel.java:915)
       at androidx.fragment.app.FragmentState.writeToParcel(FragmentState.java:159)
       at android.os.Parcel.writeParcelable(Parcel.java:1683)
       at android.os.Parcel.writeValue(Parcel.java:1589)
       at android.os.Parcel.writeArrayMapInternal(Parcel.java:875)
       at android.os.BaseBundle.writeToParcelInner(BaseBundle.java:1579)
       at android.os.Bundle.writeToParcel(Bundle.java:1233)
       at android.os.Parcel.writeBundle(Parcel.java:915)
       at android.os.Parcel.writeValue(Parcel.java:1580)
       at android.os.Parcel.writeArrayMapInternal(Parcel.java:875)
       at android.os.BaseBundle.writeToParcelInner(BaseBundle.java:1579)
       at android.os.Bundle.writeToParcel(Bundle.java:1233)
       at android.os.Parcel.writeBundle(Parcel.java:915)
       at android.os.Parcel.writeValue(Parcel.java:1580)
       at android.os.Parcel.writeArrayMapInternal(Parcel.java:875)
       at android.os.BaseBundle.writeToParcelInner(BaseBundle.java:1579)
       at android.os.Bundle.writeToParcel(Bundle.java:1233)
       at android.os.Parcel.writeBundle(Parcel.java:915)
       at android.os.Parcel.writeValue(Parcel.java:1580)
       at android.os.Parcel.writeArrayMapInternal(Parcel.java:875)
       at android.os.BaseBundle.writeToParcelInner(BaseBundle.java:1579)
       at android.os.Bundle.writeToParcel(Bundle.java:1233)
       at android.app.IActivityManager$Stub$Proxy.activityStopped(IActivityManager.java:3895)
       at android.app.servertransaction.PendingTransactionActions$StopInfo.run(PendingTransactionActions.java:144)
       at android.os.Handler.handleCallback(Handler.java:873)
       at android.os.Handler.dispatchMessage(Handler.java:99)
       at android.os.Looper.loop(Looper.java:193)
       at android.app.ActivityThread.main(ActivityThread.java:6912)
       at java.lang.reflect.Method.invoke(Method.java)
       at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:590)
       at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:858)```

It has occured on 3.5.0 too.

@MMarkiz @vkatzyn maybe you can share more conditions for this issue:

  • Android OS versions
  • Device models
  • How often this happens (total number of cases)

@CAMOBAP it happened over 350 times. OS and device doesn't seem to make difference here. Some users data with crash:

OS version:
Screenshot 2023-03-02 at 13 59 08

Device:
Screenshot 2023-03-02 at 13 59 03

Samsung Devices:
Screenshot 2023-03-02 at 14 02 10

Thank you for reporting this @MMarkiz.

We added more tests for serialization.
A fix was released in version 3.5.1.