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

Unmarshalling unknown type code 7340148 at offset 8 #1

Closed
lepicekmichal opened this issue Mar 2, 2022 · 7 comments
Closed

Unmarshalling unknown type code 7340148 at offset 8 #1

lepicekmichal opened this issue Mar 2, 2022 · 7 comments

Comments

@lepicekmichal
Copy link

Describe the bug
There is a bug in library that happens only on Pixel devices.

Fatal Exception: java.lang.RuntimeException: Parcel android.os.Parcel@52c801c: Unmarshalling unknown type code 6357038 at offset 8
at android.os.Parcel.readValue(Parcel.java:3305)
at android.os.Parcel.readArrayMapInternal(Parcel.java:3623)
at android.os.BaseBundle.initializeFromParcelLocked(BaseBundle.java:292)
at android.os.BaseBundle.unparcel(BaseBundle.java:236)
at android.os.Bundle.filterValues(Bundle.java:395)
at android.os.Bundle.filterValues(Bundle.java:405)
at android.content.Intent.removeUnsafeExtras(Intent.java:8859)
at android.app.ActivityThread.handleRequestAssistContextExtras(ActivityThread.java:3890)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2171)
at android.os.Handler.dispatchMessage(Handler.java:106)
at android.os.Looper.loopOnce(Looper.java:201)
at android.os.Looper.loop(Looper.java:288)
at android.app.ActivityThread.main(ActivityThread.java:7839)
at java.lang.reflect.Method.invoke(Method.java)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:548)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1003)

I can't reproduce it, but we have a lot of bugs in firebase crashlytics. With no specific case, any screen with your parcelable between intents/fragments inside intent is potential threat.

Smartphone (please complete the following information):

  • Device: any Pixel
  • OS: android 12

Additional context
It is happening with version 0.3.1, I have simultaneously upgraded to 0.4.1 and will give feedback whether it still happens.

@github-actions
Copy link

github-actions bot commented Mar 2, 2022

Welcome and thanks for contributing! Make sure to leave a detailed explanation of the issue.

@chRyNaN
Copy link
Owner

chRyNaN commented Mar 3, 2022

Thanks for bringing this up. I'll try and take a look at this tonight and see if I can track down the issue. Please test on the latest version as there was some fixes that may have resolved it.

@chRyNaN
Copy link
Owner

chRyNaN commented Mar 4, 2022

@lepicekmichal

I have tested on a Pixel 3a emulator with API 31 (Android 12) and I wasn't able to reproduce the issue. Can you provide some additional context to help debug/track down the issue? What is the Type that you are trying to serialize/deserialize? I'm seeing the following in your provided stacktrace:

at android.os.Parcel.readValue(Parcel.java:3305)
at android.os.Parcel.readArrayMapInternal(Parcel.java:3623)

So I'm assuming that the type may have been either an Array or a Map?

Also, can you provide some example code, if you are able to reproduce the issue?

@lepicekmichal
Copy link
Author

lepicekmichal commented Mar 14, 2022

Sorry it took so long to reply.

Besides all Pixels (since 3a - pro, xl, regular) it has also happened on Redmi Note 8T and POCO X3 NFC, both xiaomi.
Version 0.4.1 has not fixed it.

As I said, we are unable to reproduce it either. It seems to be random based on type code number that might be conflicting with some number of yours?

The best I could find in our code would be simple usecase

@Serializable
class TextToBeFormatted(
    val text: String,
    val actions: Map<String, AppAction>,
)

@Serializable
data class AppAction(
    internal val appLink: String,
    internal val href: String? = null,
    internal val enabled: Boolean? = null,
)

using putExtra(key, value, Parcelable.Default)

@lepicekmichal
Copy link
Author

I made custom serializer for this data class, which is the only one with map.
So there is no map now anymore in serialization, but it still crashes the same. With readMapInternal.
It has to be some bad shift inside your library.

@chRyNaN
Copy link
Owner

chRyNaN commented Apr 1, 2022

@lepicekmichal Without any more information, and being unable to reproduce this issue, there's no way to solve it. Also, what do you mean by "bad shift"? The code is open source, you can fork the library and try and track down the issue yourself. I will keep this ticket open until more details are provided or the issue is resolved.

@chRyNaN chRyNaN closed this as completed Feb 11, 2023
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

2 participants