Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

HCaptchaConfig IOException writing serializable object #94

Open
MMarkiz opened this issue Feb 27, 2023 · 8 comments
Open

HCaptchaConfig IOException writing serializable object #94

MMarkiz opened this issue Feb 27, 2023 · 8 comments
Assignees

Comments

@MMarkiz
Copy link

MMarkiz commented Feb 27, 2023

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)```
@CAMOBAP CAMOBAP self-assigned this Mar 2, 2023
@vkatzyn
Copy link

vkatzyn commented Mar 2, 2023

It has occured on 3.5.0 too.

@CAMOBAP
Copy link
Collaborator

CAMOBAP commented Mar 2, 2023

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

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

@MMarkiz
Copy link
Author

MMarkiz commented Mar 2, 2023

@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

DSergiu pushed a commit that referenced this issue Mar 7, 2023
* bugfix: HCaptchaConfig serialization crash #94

* bump version 3.5.1
@DSergiu
Copy link
Contributor

DSergiu commented Mar 7, 2023

Thank you for reporting this @MMarkiz.

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

@CAMOBAP CAMOBAP closed this as completed Mar 18, 2023
@dr-fenil
Copy link

@DSergiu I wanted to bring to your attention that although this PR is closed, I am still encountering the same crash with the latest version of HCaptcha. This is reflected in our Firebase crash logs.

@CAMOBAP
Copy link
Collaborator

CAMOBAP commented Nov 20, 2024

@dr-fenil is the stack trace the same? Could you please share some logs and device stats?

@dr-fenil
Copy link

@CAMOBAP crash trace
Android 13, Device: Realme Narzo 50A

Fatal Exception: android.os.BadParcelableException: Parcelable encountered IOException writing serializable object (name = com.hcaptcha.sdk.HCaptchaConfig) at android.os.Parcel.writeSerializable(Parcel.java:2780) at android.os.Parcel.writeValue(Parcel.java:2546) at android.os.Parcel.writeValue(Parcel.java:2345) at android.os.Parcel.writeArrayMapInternal(Parcel.java:1294) at android.os.BaseBundle.writeToParcelInner(BaseBundle.java:1802) at android.os.Bundle.writeToParcel(Bundle.java:1362) at android.os.Parcel.writeBundle(Parcel.java:1363) at android.os.Parcel.writeValue(Parcel.java:2462) at android.os.Parcel.writeValue(Parcel.java:2352) at android.os.Parcel.writeArrayMapInternal(Parcel.java:1294) at android.os.BaseBundle.writeToParcelInner(BaseBundle.java:1802) at android.os.Bundle.writeToParcel(Bundle.java:1362) at android.os.Parcel.writeBundle(Parcel.java:1363) at android.os.Parcel.writeValue(Parcel.java:2462) at android.os.Parcel.writeValue(Parcel.java:2352) at android.os.Parcel.writeArrayMapInternal(Parcel.java:1294) at android.os.BaseBundle.writeToParcelInner(BaseBundle.java:1802) at android.os.Bundle.writeToParcel(Bundle.java:1362) at android.os.Parcel.writeBundle(Parcel.java:1363) at android.os.Parcel.writeValue(Parcel.java:2462) at android.os.Parcel.writeValue(Parcel.java:2352) at android.os.Parcel.writeArrayMapInternal(Parcel.java:1294) at android.os.BaseBundle.writeToParcelInner(BaseBundle.java:1802) at android.os.Bundle.writeToParcel(Bundle.java:1362) at android.os.Parcel.writeBundle(Parcel.java:1363) at android.os.Parcel.writeValue(Parcel.java:2462) at android.os.Parcel.writeValue(Parcel.java:2352) at android.os.BaseBundle.dumpStats(BaseBundle.java:1874) at android.os.BaseBundle.dumpStats(BaseBundle.java:1911) at android.app.servertransaction.PendingTransactionActions$StopInfo.run(PendingTransactionActions.java:150) at android.os.Handler.handleCallback(Handler.java:942) at android.os.Handler.dispatchMessage(Handler.java:99) at android.os.Looper.loopOnce(Looper.java:240) at android.os.Looper.loop(Looper.java:351) at android.app.ActivityThread.main(ActivityThread.java:8370) at java.lang.reflect.Method.invoke(Method.java) at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:568) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1013)

device stats
Screenshot 2024-11-20 at 7 39 11 PM

let me know if you need more information.

@CAMOBAP CAMOBAP reopened this Nov 21, 2024
@CAMOBAP
Copy link
Collaborator

CAMOBAP commented Nov 24, 2024

let me know if you need more information.

@dr-fenil thanks for your patience, I think I need more information.

The issue doesn’t reproduce under standard conditions. Could you please provide more details on the following:

  1. What is the total number of occurrences of the issue?
  2. Could you list the Samsung devices affected by the issue?
  3. Do you have an estimation of how much data (in Kbytes) is saved on activity stop during onSaveInstanceState? (For the activity where the hCaptcha used)
  4. Are there more details on cause IOException exception that lead to BadParcelableException

Thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants