0.10.4 beta crashes on Android 12
iKirby opened this issue · comments
iKirby commented
12-19 19:04:35.807 8408 8408 D AndroidRuntime: Shutting down VM
12-19 19:04:35.808 8408 8408 E AndroidRuntime: FATAL EXCEPTION: main
12-19 19:04:35.808 8408 8408 E AndroidRuntime: Process: io.github.trojan_gfw.igniter:proxy, PID: 8408
12-19 19:04:35.808 8408 8408 E AndroidRuntime: java.lang.RuntimeException: Unable to start service io.github.trojan_gfw.igniter.ProxyService@ad2d5d8 with Intent { cmp=io.github.trojan_gfw.igniter/.ProxyService }: java.lang.IllegalArgumentException: io.github.trojan_gfw.igniter: Targeting S+ (version 31 and above) requires that one of FLAG_IMMUTABLE or FLAG_MUTABLE be specified when creating a PendingIntent.
12-19 19:04:35.808 8408 8408 E AndroidRuntime: 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.
12-19 19:04:35.808 8408 8408 E AndroidRuntime: at android.app.ActivityThread.handleServiceArgs(ActivityThread.java:4653)
12-19 19:04:35.808 8408 8408 E AndroidRuntime: at android.app.ActivityThread.access$2000(ActivityThread.java:249)
12-19 19:04:35.808 8408 8408 E AndroidRuntime: at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2093)
12-19 19:04:35.808 8408 8408 E AndroidRuntime: at android.os.Handler.dispatchMessage(Handler.java:106)
12-19 19:04:35.808 8408 8408 E AndroidRuntime: at android.os.Looper.loopOnce(Looper.java:201)
12-19 19:04:35.808 8408 8408 E AndroidRuntime: at android.os.Looper.loop(Looper.java:288)
12-19 19:04:35.808 8408 8408 E AndroidRuntime: at android.app.ActivityThread.main(ActivityThread.java:7798)
12-19 19:04:35.808 8408 8408 E AndroidRuntime: at java.lang.reflect.Method.invoke(Native Method)
12-19 19:04:35.808 8408 8408 E AndroidRuntime: at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:548)
12-19 19:04:35.808 8408 8408 E AndroidRuntime: at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1003)
12-19 19:04:35.808 8408 8408 E AndroidRuntime: Caused by: java.lang.IllegalArgumentException: io.github.trojan_gfw.igniter: Targeting S+ (version 31 and above) requires that one of FLAG_IMMUTABLE or FLAG_MUTABLE be specified when creating a PendingIntent.
12-19 19:04:35.808 8408 8408 E AndroidRuntime: 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.
12-19 19:04:35.808 8408 8408 E AndroidRuntime: at android.app.PendingIntent.checkFlags(PendingIntent.java:375)
12-19 19:04:35.808 8408 8408 E AndroidRuntime: at android.app.PendingIntent.getActivityAsUser(PendingIntent.java:458)
12-19 19:04:35.808 8408 8408 E AndroidRuntime: at android.app.PendingIntent.getActivity(PendingIntent.java:444)
12-19 19:04:35.808 8408 8408 E AndroidRuntime: at android.app.PendingIntent.getActivity(PendingIntent.java:408)
12-19 19:04:35.808 8408 8408 E AndroidRuntime: at io.github.trojan_gfw.igniter.ProxyService.onStartCommand(:3)
12-19 19:04:35.808 8408 8408 E AndroidRuntime: at android.app.ActivityThread.handleServiceArgs(ActivityThread.java:4635)
12-19 19:04:35.808 8408 8408 E AndroidRuntime: ... 9 more
Related document: https://developer.android.com/about/versions/12/behavior-changes-12#pending-intent-mutability
Syrone Wong commented
Thanks for the bug report.
Syrone Wong commented
Should be fixed via 75a35d7
iKirby commented
I built a new apk and can confirm it is fixed. Thanks!