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

Version 31 and above requires that one of FLAG_IMMUTABLE or FLAG_MUTABLE #256

Open
mkdevel opened this issue Nov 23, 2023 · 4 comments
Open

Comments

@mkdevel
Copy link

mkdevel commented Nov 23, 2023

Bug Report

I think there is bug with PendingIntent, because i do not receive background notifications.
Or am I missing some parameter while sending push notification?

Logs taken while reproducing problem

FATAL EXCEPTION: Firebase-FCMService
Process: com.myapp.myapp, PID: 32530
java.lang.IllegalArgumentException: com.myapp.myapp: 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:408)
at android.app.PendingIntent.getActivityAsUser(PendingIntent.java:491)
at android.app.PendingIntent.getActivity(PendingIntent.java:477)
at android.app.PendingIntent.getActivity(PendingIntent.java:441)
at com.google.firebase.messaging.zzb.zzf(Unknown Source:68)
at com.google.firebase.messaging.zzc.zzas(Unknown Source:34)
at com.google.firebase.messaging.FirebaseMessagingService.zzd(Unknown Source:59)
at com.google.firebase.iid.zzf.run(Unknown Source:4)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:644)
at com.google.android.gms.common.util.concurrent.zza.run(Unknown Source:6)
at java.lang.Thread.run(Thread.java:1012)

@ILABUTK
Copy link

ILABUTK commented Nov 25, 2023

I ran into the same under Android. All is good under iOS.

I spent a few hours googling it. Nothing works thus far. Below is what I have:

cordova -v:
12.0.0 (cordova-lib@12.0.1)

Installed platforms:
  android 12.0.1
  browser 7.0.0
  ios 6.3.0

Error message:

Process: com.myapp, PID: 12463
java.lang.IllegalArgumentException: com.myapp: 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.checkPendingIntent(PendingIntent.java:428)
    at android.app.PendingIntent.getActivityAsUser(PendingIntent.java:544)
    at android.app.PendingIntent.getActivity(PendingIntent.java:530)
    at android.app.PendingIntent.getActivity(PendingIntent.java:494)
    at com.google.firebase.messaging.zzb.zzf(Unknown Source:68)
    at com.google.firebase.messaging.zzc.zzas(Unknown Source:34)
    at com.google.firebase.messaging.FirebaseMessagingService.zzd(Unknown Source:59)
    at com.google.firebase.iid.zzf.run(Unknown Source:4)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:644)
    at com.google.android.gms.common.util.concurrent.zza.run(Unknown Source:6)
    at java.lang.Thread.run(Thread.java:1012)

@mkdevel
Copy link
Author

mkdevel commented Nov 25, 2023

Version @dev4.0.0 version has that handled. I needed to update package.json firebase version to 13+

@ILABUTK
Copy link

ILABUTK commented Nov 25, 2023 via email

@ILABUTK
Copy link

ILABUTK commented Nov 27, 2023

Removing and adding the plugin to Cordova did the trick. All is working. Please close the issue.

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