yggdrasil-network / crispa-android

Community-contributed application for connecting to the Yggdrasil Network on Android devices
https://t.me/yggdrasil_android
Mozilla Public License 2.0
116 stars 22 forks source link

App crushes when I turn on "Ygg me!" #61

Closed ZaNYAshlin closed 2 years ago

ZaNYAshlin commented 2 years ago

Bug : I'm just turn on "Ygg me!" and app crushes.

Log :

FATAL EXCEPTION: main
Process: io.github.chronosx88.yggdrasil, PID: 19233
java.lang.RuntimeException: Unable to start service org.yggdrasil.app.crispa.YggdrasilTunService@9d3efc7 with Intent { cmp=io.github.chronosx88.yggdrasil/org.yggdrasil.app.crispa.YggdrasilTunService (has extras) }: java.lang.IllegalArgumentException: io.github.chronosx88.yggdrasil: 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.ActivityThread.handleServiceArgs(ActivityThread.java:4657)
    at android.app.ActivityThread.access$2000(ActivityThread.java:247)
    at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2091)
    at android.os.Handler.dispatchMessage(Handler.java:106)
    at android.os.Looper.loopOnce(Looper.java:201)
    at android.os.Looper.loop(Looper.java:288)
    at android.app.ActivityThread.main(ActivityThread.java:7839)
    at java.lang.reflect.Method.invoke(Native Method)
    at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:550)
    at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1003)
Caused by: java.lang.IllegalArgumentException: io.github.chronosx88.yggdrasil: 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:375)
    at android.app.PendingIntent.getActivitiesAsUser(PendingIntent.java:593)
    at android.app.PendingIntent.getActivities(PendingIntent.java:575)
    at android.app.TaskStackBuilder.getPendingIntent(TaskStackBuilder.java:275)
    at android.app.TaskStackBuilder.getPendingIntent(TaskStackBuilder.java:249)
    at org.yggdrasil.app.crispa.YggdrasilTunService.foregroundNotification(YggdrasilTunService.kt:286)
    at org.yggdrasil.app.crispa.YggdrasilTunService.onStartCommand(YggdrasilTunService.kt:63)
    at android.app.ActivityThread.handleServiceArgs(ActivityThread.java:4639)
    ... 9 more

Screenshots : Screenshot_20220307-154100_Yggdrasil Screenshot_20220307-154447_Настройки

ZaNYAshlin commented 2 years ago

All 3 crash logs :

FATAL EXCEPTION: main
Process: io.github.chronosx88.yggdrasil, PID: 27985
java.lang.RuntimeException: Unable to start service org.yggdrasil.app.crispa.YggdrasilTunService@9d3efc7 with Intent { cmp=io.github.chronosx88.yggdrasil/org.yggdrasil.app.crispa.YggdrasilTunService (has extras) }: java.lang.IllegalArgumentException: io.github.chronosx88.yggdrasil: 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.ActivityThread.handleServiceArgs(ActivityThread.java:4657)
    at android.app.ActivityThread.access$2000(ActivityThread.java:247)
    at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2091)
    at android.os.Handler.dispatchMessage(Handler.java:106)
    at android.os.Looper.loopOnce(Looper.java:201)
    at android.os.Looper.loop(Looper.java:288)
    at android.app.ActivityThread.main(ActivityThread.java:7839)
    at java.lang.reflect.Method.invoke(Native Method)
    at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:550)
    at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1003)
Caused by: java.lang.IllegalArgumentException: io.github.chronosx88.yggdrasil: 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:375)
    at android.app.PendingIntent.getActivitiesAsUser(PendingIntent.java:593)
    at android.app.PendingIntent.getActivities(PendingIntent.java:575)
    at android.app.TaskStackBuilder.getPendingIntent(TaskStackBuilder.java:275)
    at android.app.TaskStackBuilder.getPendingIntent(TaskStackBuilder.java:249)
    at org.yggdrasil.app.crispa.YggdrasilTunService.foregroundNotification(YggdrasilTunService.kt:286)
    at org.yggdrasil.app.crispa.YggdrasilTunService.onStartCommand(YggdrasilTunService.kt:63)
    at android.app.ActivityThread.handleServiceArgs(ActivityThread.java:4639)
    ... 9 more

FATAL EXCEPTION: main
Process: io.github.chronosx88.yggdrasil, PID: 27906
java.lang.RuntimeException: Unable to start service org.yggdrasil.app.crispa.YggdrasilTunService@9d3efc7 with Intent { cmp=io.github.chronosx88.yggdrasil/org.yggdrasil.app.crispa.YggdrasilTunService (has extras) }: java.lang.IllegalArgumentException: io.github.chronosx88.yggdrasil: 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.ActivityThread.handleServiceArgs(ActivityThread.java:4657)
    at android.app.ActivityThread.access$2000(ActivityThread.java:247)
    at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2091)
    at android.os.Handler.dispatchMessage(Handler.java:106)
    at android.os.Looper.loopOnce(Looper.java:201)
    at android.os.Looper.loop(Looper.java:288)
    at android.app.ActivityThread.main(ActivityThread.java:7839)
    at java.lang.reflect.Method.invoke(Native Method)
    at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:550)
    at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1003)
Caused by: java.lang.IllegalArgumentException: io.github.chronosx88.yggdrasil: 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:375)
    at android.app.PendingIntent.getActivitiesAsUser(PendingIntent.java:593)
    at android.app.PendingIntent.getActivities(PendingIntent.java:575)
    at android.app.TaskStackBuilder.getPendingIntent(TaskStackBuilder.java:275)
    at android.app.TaskStackBuilder.getPendingIntent(TaskStackBuilder.java:249)
    at org.yggdrasil.app.crispa.YggdrasilTunService.foregroundNotification(YggdrasilTunService.kt:286)
    at org.yggdrasil.app.crispa.YggdrasilTunService.onStartCommand(YggdrasilTunService.kt:63)
    at android.app.ActivityThread.handleServiceArgs(ActivityThread.java:4639)
    ... 9 more

FATAL EXCEPTION: main
Process: io.github.chronosx88.yggdrasil, PID: 27772
java.lang.RuntimeException: Unable to start service org.yggdrasil.app.crispa.YggdrasilTunService@b5b5b81 with Intent { cmp=io.github.chronosx88.yggdrasil/org.yggdrasil.app.crispa.YggdrasilTunService (has extras) }: java.lang.IllegalArgumentException: io.github.chronosx88.yggdrasil: 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.ActivityThread.handleServiceArgs(ActivityThread.java:4657)
    at android.app.ActivityThread.access$2000(ActivityThread.java:247)
    at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2091)
    at android.os.Handler.dispatchMessage(Handler.java:106)
    at android.os.Looper.loopOnce(Looper.java:201)
    at android.os.Looper.loop(Looper.java:288)
    at android.app.ActivityThread.main(ActivityThread.java:7839)
    at java.lang.reflect.Method.invoke(Native Method)
    at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:550)
    at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1003)
Caused by: java.lang.IllegalArgumentException: io.github.chronosx88.yggdrasil: 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:375)
    at android.app.PendingIntent.getActivitiesAsUser(PendingIntent.java:593)
    at android.app.PendingIntent.getActivities(PendingIntent.java:575)
    at android.app.TaskStackBuilder.getPendingIntent(TaskStackBuilder.java:275)
    at android.app.TaskStackBuilder.getPendingIntent(TaskStackBuilder.java:249)
    at org.yggdrasil.app.crispa.YggdrasilTunService.foregroundNotification(YggdrasilTunService.kt:286)
    at org.yggdrasil.app.crispa.YggdrasilTunService.onStartCommand(YggdrasilTunService.kt:63)
    at android.app.ActivityThread.handleServiceArgs(ActivityThread.java:4639)
    ... 9 more
eatb33ts commented 2 years ago

I am also having this issue on GrapheneOS/Android 12 on two different pixel devices. I can also provide logs if it will be helpful.

ChronosXYZ commented 2 years ago

The application is not adapted for Android 12 yet.

ca5ua1 commented 2 years ago

Same on Android 6.

vikulin commented 2 years ago

Fixed

vikulin commented 2 years ago

Check in 2.1.0