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

Crash app when receive a notification in background #151

Open
TalesMattos opened this issue Aug 15, 2023 · 0 comments
Open

Crash app when receive a notification in background #151

TalesMattos opened this issue Aug 15, 2023 · 0 comments

Comments

@TalesMattos
Copy link

TalesMattos commented Aug 15, 2023

When I subscribe to a topic and then the app goes to the background, when a new notification is received, the app crashes.
I am using Ionic 4 with Capacitor v2 and plugin version 1.1.2 (the latest for Capacitor 2) on Android 13.

see the log when the app crashes:

ERROR:
**FATAL EXCEPTION: Firebase-CapacitorFirebaseMessagingService Process: br.com.procergs.estudante, PID: 17542 java.lang.IllegalArgumentException: br.com.procergs.estudante: Targeting S+ (version 31 and above) requires that one of FLAG_IMMUTABLE or FLAG_MUTABLE be specified when creating a PendingIntent.** Strongly consider using FLAG_IMMUTABLE, only use FLAG_MUTABLE if some functionality depends on the PendingIntent being mutable, e.g. if it needs to be used with inline replies or bubbles. at android.app.PendingIntent.checkFlags(PendingIntent.java:404) at android.app.PendingIntent.getActivityAsUser(PendingIntent.java:487) at android.app.PendingIntent.getActivity(PendingIntent.java:473) at android.app.PendingIntent.getActivity(PendingIntent.java:437) at com.google.firebase.messaging.zzb.zza(com.google.firebase:firebase-messaging@@20.1.2:62) at com.google.firebase.messaging.zzd.zza(com.google.firebase:firebase-messaging@@20.1.2:33) at com.google.firebase.messaging.FirebaseMessagingService.zzc(com.google.firebase:firebase-messaging@@20.1.2:70) at com.google.firebase.messaging.zze.run(com.google.firebase:firebase-messaging@@20.1.2:2) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1137) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:637) at com.google.android.gms.common.util.concurrent.zza.run(Unknown Source:6) at java.lang.Thread.run(Thread.java:1012)

Could you guys fix it to work on Android 31 and above? 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

1 participant