firebase / flutterfire

🔥 A collection of Firebase plugins for Flutter apps.
https://firebase.google.com/docs/flutter/setup
BSD 3-Clause "New" or "Revised" License
8.53k stars 3.93k forks source link

MESSAGING: Parcelable protocol requires subclassing from Parcelable on class com.google.firebase.messaging.q0 #13002

Closed pamafe1976 closed 2 weeks ago

pamafe1976 commented 4 weeks ago

Is there an existing issue for this?

Which plugins are affected?

Messaging

Which platforms are affected?

Android

Description

I'm receiving multiple crash reports from crashlytics with the following stack trace:

 Fatal Exception: android.os.BadParcelableException: Parcelable protocol requires subclassing from Parcelable on class com.google.firebase.messaging.q0
       at android.os.Parcel.readParcelableCreator(Parcel.java:3406)
       at android.os.Parcel.readParcelable(Parcel.java:3337)
       at android.os.Parcel.readValue(Parcel.java:3239)
       at android.os.Parcel.readArrayMapInternal(Parcel.java:3636)
       at android.os.BaseBundle.initializeFromParcelLocked(BaseBundle.java:292)
       at android.os.BaseBundle.unparcel(BaseBundle.java:236)
       at android.os.BaseBundle.getByteArray(BaseBundle.java:1383)
       at android.os.Bundle.getByteArray(Bundle.java:1160)
       at android.content.Intent.getByteArrayExtra(Intent.java:9303)
       at io.flutter.plugins.firebase.messaging.b.d(:22)
       at io.flutter.plugins.firebase.messaging.FlutterFirebaseMessagingBackgroundService.l(:2)
       at io.flutter.plugins.firebase.messaging.FlutterFirebaseMessagingBackgroundService.j()
       at ta.d.run(:4)
       at android.os.Handler.handleCallback(Handler.java:938)
       at android.os.Handler.dispatchMessage(Handler.java:99)
       at android.os.Looper.loopOnce(Looper.java:226)
       at android.os.Looper.loop(Looper.java:313)
       at android.app.ActivityThread.main(ActivityThread.java:8663)
       at java.lang.reflect.Method.invoke(Method.java)
       at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:571)
       at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1135)

This is probably related to

Reproducing the issue

Unfortunately I can't reproduce this issue in my devices.

Firebase Core version

3.1.0

Flutter Version

3.22.1

Relevant Log Output

No response

Flutter dependencies

Dart SDK 3.4.1 Flutter SDK 3.22.1 catedralapp 1.2.32+117

dependencies:

dev dependencies:

transitive dependencies:

Additional context and comments

At this time is showing mainly in Samsung and TCL devices, with Android 10,11,12

This issue is probably related to #11901

TarekkMA commented 4 weeks ago

Hello @pamafe1976,

Thank you for reporting this issue. We will look into how we can tackle it. If you could provide a reproduction example, it would greatly help us in figuring out the issue.

chetanApnaklub commented 4 weeks ago

Even we have experienced the same sudden spike in the crash count, followed by a decrease. This has occurred twice so far. We are currently investigating to identify any specific steps that lead to these crashes. It's worth noting that no users have reported these crashes; they are only appearing on Crashlytics.

pamafe1976 commented 4 weeks ago

@TarekkMA Sorry I don't have a way to reproduce it. I have no idea what triggers it. I don't even know if it has noticeable consequences in the app. I was hoping that it made sense to someone with knowledge of the package native code. My app uses messaging as a way to deliver state payloads to the users, so the messages arrive all the time in the background

TarekkMA commented 3 weeks ago

@pamafe1976 If you are using progaurd can you confirm that you are using these settings https://github.com/firebase/flutterfire/issues/9884#issuecomment-1451022470 (for com.google.firebase.messaging.**)

TarekkMA commented 3 weeks ago

I will close this issue for now and move discussion to https://github.com/firebase/flutterfire/issues/11901

TarekkMA commented 2 weeks ago

@pamafe1976 I've reopened this issue since you are still facing problems with it. However, we need a complete minimal reproduction example of this issue. Without it, we cannot figure out what's wrong and how to approach it to fix it.

pamafe1976 commented 2 weeks ago

@TarekkMA Hi. I'm not currently able to reproduce the issue, and also it is showing on less clients lately. It's ok if you need to close it. I can open a fresh one later if the issue returns. Regards