bgregos / foreground

Simple Android personal task manager with Taskwarrior integration
Apache License 2.0
255 stars 16 forks source link

New version cause crash on every refresh for taskwarrior on android 11 #169

Closed gzqx closed 1 year ago

gzqx commented 1 year ago

Uninstall and installing last version works again.

Also, new version seems to be not downgrade-able directly from F-Droid, is there significant changes?

bgregos commented 1 year ago

There are several significant changes between Foreground 1.5.5 and 1.6.0. I'm not sure how F-Droid downgrades work behind the scenes though - I wouldn't rely on them in any case since this app's internals only support upgrades.

I'll look into the crash and I'll reach out if I need any more information.

bgregos commented 1 year ago

@gzqx Which Foreground version are you running? 1.6.1 was released recently and resolves some crashes people were seeing.

nuckle commented 1 year ago

I have the same issue. Every time I try to update my tasks, the app crashes. I use the latest 1.6.1 version

bgregos commented 1 year ago

Thanks for the confirmation that it's still happening on the latest version.

To diagnose this issue further, I'll need some crash logs from your device's logcat output. I've got a guide here if you're new to that: https://github.com/bgregos/foreground/wiki/Sync-Troubleshooting

Of particular interest to me are the lines after the word FATAL.

If you're unable to get logcat logs, the Google Play version of the app reports crashes back to me automatically. Just uninstall the F-Droid version, install the Play version, and recreate the crash there.

nuckle commented 1 year ago

I got logs using logcat output

debug info

``` 07-07 19:47:40.539 7970 7970 E AndroidRuntime: FATAL EXCEPTION: main 07-07 19:47:40.539 7970 7970 E AndroidRuntime: Process: me.bgregos.brighttask, PID: 7970 07-07 19:47:40.539 7970 7970 E AndroidRuntime: java.lang.NoSuchMethodError: No virtual method canScheduleExactAlarms()Z in class Landroid/app/AlarmManager; or its super classes (declaration of 'android.app.AlarmManager' appears in /system/framework/framework.jar) 07-07 19:47:40.539 7970 7970 E AndroidRuntime: at me.bgregos.foreground.util.NotificationRepository.scheduleNotificationForTask(NotificationRepository.kt:65) 07-07 19:47:40.539 7970 7970 E AndroidRuntime: at me.bgregos.foreground.util.NotificationRepository.scheduleNotificationForTasks(NotificationRepository.kt:44) 07-07 19:47:40.539 7970 7970 E AndroidRuntime: at me.bgregos.foreground.tasklist.TaskViewModel.updatePendingNotifications(TaskViewModel.kt:118) 07-07 19:47:40.539 7970 7970 E AndroidRuntime: at me.bgregos.foreground.tasklist.TaskViewModel.save(TaskViewModel.kt:102) 07-07 19:47:40.539 7970 7970 E AndroidRuntime: at me.bgregos.foreground.tasklist.TaskViewModel$save$1.invokeSuspend(Unknown Source:14) 07-07 19:47:40.539 7970 7970 E AndroidRuntime: at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33) 07-07 19:47:40.539 7970 7970 E AndroidRuntime: at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:106) 07-07 19:47:40.539 7970 7970 E AndroidRuntime: at android.os.Handler.handleCallback(Handler.java:938) 07-07 19:47:40.539 7970 7970 E AndroidRuntime: at android.os.Handler.dispatchMessage(Handler.java:99) 07-07 19:47:40.539 7970 7970 E AndroidRuntime: at android.os.Looper.loop(Looper.java:223) 07-07 19:47:40.539 7970 7970 E AndroidRuntime: at android.app.ActivityThread.main(ActivityThread.java:7664) 07-07 19:47:40.539 7970 7970 E AndroidRuntime: at java.lang.reflect.Method.invoke(Native Method) 07-07 19:47:40.539 7970 7970 E AndroidRuntime: at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:592) 07-07 19:47:40.539 7970 7970 E AndroidRuntime: at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:947) 07-07 19:47:40.539 7970 7970 E AndroidRuntime: Suppressed: kotlinx.coroutines.DiagnosticCoroutineContextException: [StandaloneCoroutine{Cancelling}@e00fd35, Dispatchers.Main] ```

bgregos commented 1 year ago

Thanks for posting the logcat output - I was able to figure out the issue from there.

I just released Foreground 1.6.2 which includes a fix for this, and it should be rolling out shortly via Google Play and F-Droid.