flutter_cast_framework icon indicating copy to clipboard operation
flutter_cast_framework copied to clipboard

Exception and app crash after cast device selected

Open marekhalmo opened this issue 11 months ago • 3 comments

Hello, i have an app that is working on multiple but one device.. The device is Realme GT Master Edition (RMX3363), Android 13 (June 5, 2023)

I click the cast button and then select a chromecast device.. the app crashes with following log:

Process: sk.maniacs.versecast, PID: 27562 E/AndroidRuntime(27562): java.lang.IllegalArgumentException: [xxxx MY APP PACKAGE xxxx]: Targeting S+ (version 31 and above) requires that one of FLAG_IMMUTABLE or FLAG_MUTABLE be specified when creating a PendingIntent. E/AndroidRuntime(27562): 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. E/AndroidRuntime(27562): at android.app.PendingIntent.checkFlags(PendingIntent.java:402) E/AndroidRuntime(27562): at android.app.PendingIntent.getBroadcastAsUser(PendingIntent.java:672) E/AndroidRuntime(27562): at android.app.PendingIntent.getBroadcast(PendingIntent.java:659) E/AndroidRuntime(27562): at l3.n.j(Unknown Source:78) E/AndroidRuntime(27562): at k3.c$a.a(Unknown Source:92) E/AndroidRuntime(27562): at com.google.android.gms.common.api.internal.BasePendingResult$a.handleMessage(Unknown Source:60) E/AndroidRuntime(27562): at android.os.Handler.dispatchMessage(Handler.java:106) E/AndroidRuntime(27562): at b4.d.dispatchMessage(Unknown Source:0) E/AndroidRuntime(27562): at android.os.Looper.loopOnce(Looper.java:240) E/AndroidRuntime(27562): at android.os.Looper.loop(Looper.java:351) E/AndroidRuntime(27562): at android.app.ActivityThread.main(ActivityThread.java:8381) E/AndroidRuntime(27562): at java.lang.reflect.Method.invoke(Native Method) E/AndroidRuntime(27562): at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:584) E/AndroidRuntime(27562): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1013)

Is there any way to fix this?

marekhalmo avatar Jul 26 '23 09:07 marekhalmo

Logcat error:

E [controller-0014-com.google.android.gms API] sendTextMessage - Text message has no destination ID. Message discarded. 2023-08-04 06:54:16.172 23713-23713 AndroidRuntime pid-23713 E FATAL EXCEPTION: main Process: sk.maniacs.versecast, PID: 23713 java.lang.IllegalArgumentException: sk.maniacs.versecast: 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:402) at android.app.PendingIntent.getBroadcastAsUser(PendingIntent.java:672) at android.app.PendingIntent.getBroadcast(PendingIntent.java:659) at l3.n.j(Unknown Source:78) at k3.c$a.a(Unknown Source:92) at com.google.android.gms.common.api.internal.BasePendingResult$a.handleMessage(Unknown Source:60) at android.os.Handler.dispatchMessage(Handler.java:106) at b4.d.dispatchMessage(Unknown Source:0) at android.os.Looper.loopOnce(Looper.java:240) at android.os.Looper.loop(Looper.java:351) at android.app.ActivityThread.main(ActivityThread.java:8381) at java.lang.reflect.Method.invoke(Native Method) at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:584) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1013) 2023-08-04 06:54:16.186 1190-1342 ANDR-PERF-OPTSHANDLER pid-1190 E Perflock resource SPECIAL_NODE - cpubw_hwmon_hyst_opt not supported

marekhalmo avatar Aug 04 '23 04:08 marekhalmo

Hello - Any news on this? Is this even being maintained?

marekhalmo avatar Aug 21 '23 06:08 marekhalmo

So .. thanks @AngeloAvv for great fork (https://github.com/AngeloAvv/flutter_cast_framework)

If you want to use his fork where he fixed this issue you can modify your pubspec.yaml to

flutter_cast_framework: git: url: https://github.com/AngeloAvv/flutter_cast_framework ref: development

which will switch original flutter_cast_framework to his fork (with the fix)

.. @gianlucaparadise i think he also made a pull request to your branch so would be great if you would accept..

Thanks everyone!

marekhalmo avatar Aug 21 '23 10:08 marekhalmo