K9 crashing after Android 14 upgrade

I just got a notification on my Samsung A23 5G UW that K9 is “crashing frequently,” and the Device Care app suggests I should put K9 into deep sleep.

The phone recently automatically upgraded to Android 14, Samsung One UI version 6.0. (This is a Verizon device, by the way.)

I have noticed a couple of times since the upgrade I have switched to K9 and suddenly I see lots of new email messages that should have come in over the past few hours. So apparently it’s “dying in its sleep,” or something, so Android thinks I need to put it in a deeper sleep… ???

I don’t right off remember where to look in K9 for logs or errors. I see how to turn the logs on, but I haven’t otherwise seen any crash messages.

Are others seeing this behavior? I haven’t made any settings changes since the Android upgrade.

EDIT: I just noticed I originally posted this in the wrong category. Also I finally saw the message saying the application has stopped, but no diagnostic information. I’ll turn on the log.

EDIT 2: I’m running the latest I see in the Google Play Store… version 6.603

I collected 600+ kb of log. What keywords should I look for? Here’s the first section (relatively small portion of the file). Please let me know if nobody wants the log posted here.

--------- beginning of crash
01-21 07:22:19.420 20001 20001 E AndroidRuntime: FATAL EXCEPTION: main
01-21 07:22:19.420 20001 20001 E AndroidRuntime: Process: com.fsck.k9, PID: 20001
01-21 07:22:19.420 20001 20001 E AndroidRuntime: java.lang.RuntimeException: Unable to start service com.fsck.k9.controller.push.PushService@3a36019 with null: android.app.ForegroundServiceStartNotAllowedException: Service.startForeground() not allowed due to mAllowStartForeground false: service com.fsck.k9/.controller.push.PushService
01-21 07:22:19.420 20001 20001 E AndroidRuntime: at android.app.ActivityThread.handleServiceArgs(ActivityThread.java:5286)
01-21 07:22:19.420 20001 20001 E AndroidRuntime: at android.app.ActivityThread.-$$Nest$mhandleServiceArgs(Unknown Source:0)
01-21 07:22:19.420 20001 20001 E AndroidRuntime: at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2531)
01-21 07:22:19.420 20001 20001 E AndroidRuntime: at android.os.Handler.dispatchMessage(Handler.java:106)
01-21 07:22:19.420 20001 20001 E AndroidRuntime: at android.os.Looper.loopOnce(Looper.java:230)
01-21 07:22:19.420 20001 20001 E AndroidRuntime: at android.os.Looper.loop(Looper.java:319)
01-21 07:22:19.420 20001 20001 E AndroidRuntime: at android.app.ActivityThread.main(ActivityThread.java:8893)
01-21 07:22:19.420 20001 20001 E AndroidRuntime: at java.lang.reflect.Method.invoke(Native Method)
01-21 07:22:19.420 20001 20001 E AndroidRuntime: at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:608)
01-21 07:22:19.420 20001 20001 E AndroidRuntime: at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1103)
01-21 07:22:19.420 20001 20001 E AndroidRuntime: Caused by: android.app.ForegroundServiceStartNotAllowedException: Service.startForeground() not allowed due to mAllowStartForeground false: service com.fsck.k9/.controller.push.PushService
01-21 07:22:19.420 20001 20001 E AndroidRuntime: at android.app.ForegroundServiceStartNotAllowedException$1.createFromParcel(ForegroundServiceStartNotAllowedException.java:54)
01-21 07:22:19.420 20001 20001 E AndroidRuntime: at android.app.ForegroundServiceStartNotAllowedException$1.createFromParcel(ForegroundServiceStartNotAllowedException.java:50)
01-21 07:22:19.420 20001 20001 E AndroidRuntime: at android.os.Parcel.readParcelableInternal(Parcel.java:4882)
01-21 07:22:19.420 20001 20001 E AndroidRuntime: at android.os.Parcel.readParcelable(Parcel.java:4864)
01-21 07:22:19.420 20001 20001 E AndroidRuntime: at android.os.Parcel.createExceptionOrNull(Parcel.java:3064)
01-21 07:22:19.420 20001 20001 E AndroidRuntime: at android.os.Parcel.createException(Parcel.java:3053)
01-21 07:22:19.420 20001 20001 E AndroidRuntime: at android.os.Parcel.readException(Parcel.java:3036)
01-21 07:22:19.420 20001 20001 E AndroidRuntime: at android.os.Parcel.readException(Parcel.java:2978)
01-21 07:22:19.420 20001 20001 E AndroidRuntime: at android.app.IActivityManager$Stub$Proxy.setServiceForeground(IActivityManager.java:7214)
01-21 07:22:19.420 20001 20001 E AndroidRuntime: at android.app.Service.startForeground(Service.java:862)
01-21 07:22:19.420 20001 20001 E AndroidRuntime: at com.fsck.k9.controller.push.PushService.startForeground(PushService.kt:45)
01-21 07:22:19.420 20001 20001 E AndroidRuntime: at com.fsck.k9.controller.push.PushService.onStartCommand(PushService.kt:28)
01-21 07:22:19.420 20001 20001 E AndroidRuntime: at android.app.ActivityThread.handleServiceArgs(ActivityThread.java:5268)
01-21 07:22:19.420 20001 20001 E AndroidRuntime: … 9 more
01-21 07:22:23.449 20529 20529 E AndroidRuntime: FATAL EXCEPTION: main
01-21 07:22:23.449 20529 20529 E AndroidRuntime: Process: com.fsck.k9, PID: 20529
01-21 07:22:23.449 20529 20529 E AndroidRuntime: java.lang.RuntimeException: Unable to start service com.fsck.k9.controller.push.PushService@b7f8abf with null: android.app.ForegroundServiceStartNotAllowedException: Service.startForeground() not allowed due to mAllowStartForeground false: service com.fsck.k9/.controller.push.PushService
01-21 07:22:23.449 20529 20529 E AndroidRuntime: at android.app.ActivityThread.handleServiceArgs(ActivityThread.java:5286)
01-21 07:22:23.449 20529 20529 E AndroidRuntime: at android.app.ActivityThread.-$$Nest$mhandleServiceArgs(Unknown Source:0)
01-21 07:22:23.449 20529 20529 E AndroidRuntime: at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2531)
01-21 07:22:23.449 20529 20529 E AndroidRuntime: at android.os.Handler.dispatchMessage(Handler.java:106)
01-21 07:22:23.449 20529 20529 E AndroidRuntime: at android.os.Looper.loopOnce(Looper.java:230)
01-21 07:22:23.449 20529 20529 E AndroidRuntime: at android.os.Looper.loop(Looper.java:319)
01-21 07:22:23.449 20529 20529 E AndroidRuntime: at android.app.ActivityThread.main(ActivityThread.java:8893)
01-21 07:22:23.449 20529 20529 E AndroidRuntime: at java.lang.reflect.Method.invoke(Native Method)
01-21 07:22:23.449 20529 20529 E AndroidRuntime: at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:608)
01-21 07:22:23.449 20529 20529 E AndroidRuntime: at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1103)
01-21 07:22:23.449 20529 20529 E AndroidRuntime: Caused by: android.app.ForegroundServiceStartNotAllowedException: Service.startForeground() not allowed due to mAllowStartForeground false: service com.fsck.k9/.controller.push.PushService
01-21 07:22:23.449 20529 20529 E AndroidRuntime: at android.app.ForegroundServiceStartNotAllowedException$1.createFromParcel(ForegroundServiceStartNotAllowedException.java:54)
01-21 07:22:23.449 20529 20529 E AndroidRuntime: at android.app.ForegroundServiceStartNotAllowedException$1.createFromParcel(ForegroundServiceStartNotAllowedException.java:50)
01-21 07:22:23.449 20529 20529 E AndroidRuntime: at android.os.Parcel.readParcelableInternal(Parcel.java:4882)
01-21 07:22:23.449 20529 20529 E AndroidRuntime: at android.os.Parcel.readParcelable(Parcel.java:4864)
01-21 07:22:23.449 20529 20529 E AndroidRuntime: at android.os.Parcel.createExceptionOrNull(Parcel.java:3064)
01-21 07:22:23.449 20529 20529 E AndroidRuntime: at android.os.Parcel.createException(Parcel.java:3053)
01-21 07:22:23.449 20529 20529 E AndroidRuntime: at android.os.Parcel.readException(Parcel.java:3036)
01-21 07:22:23.449 20529 20529 E AndroidRuntime: at android.os.Parcel.readException(Parcel.java:2978)
01-21 07:22:23.449 20529 20529 E AndroidRuntime: at android.app.IActivityManager$Stub$Proxy.setServiceForeground(IActivityManager.java:7214)
01-21 07:22:23.449 20529 20529 E AndroidRuntime: at android.app.Service.startForeground(Service.java:862)
01-21 07:22:23.449 20529 20529 E AndroidRuntime: at com.fsck.k9.controller.push.PushService.startForeground(PushService.kt:45)
01-21 07:22:23.449 20529 20529 E AndroidRuntime: at com.fsck.k9.controller.push.PushService.onStartCommand(PushService.kt:28)
01-21 07:22:23.449 20529 20529 E AndroidRuntime: at android.app.ActivityThread.handleServiceArgs(ActivityThread.java:5268)
01-21 07:22:23.449 20529 20529 E AndroidRuntime: … 9 more
01-21 07:22:33.735 21210 21210 E AndroidRuntime: FATAL EXCEPTION: main
01-21 07:22:33.735 21210 21210 E AndroidRuntime: Process: com.fsck.k9, PID: 21210
01-21 07:22:33.735 21210 21210 E AndroidRuntime: java.lang.RuntimeException: Unable to start service com.fsck.k9.controller.push.PushService@2db8de with null: android.app.ForegroundServiceStartNotAllowedException: Service.startForeground() not allowed due to mAllowStartForeground false: service com.fsck.k9/.controller.push.PushService
01-21 07:22:33.735 21210 21210 E AndroidRuntime: at android.app.ActivityThread.handleServiceArgs(ActivityThread.java:5286)
01-21 07:22:33.735 21210 21210 E AndroidRuntime: at android.app.ActivityThread.-$$Nest$mhandleServiceArgs(Unknown Source:0)
01-21 07:22:33.735 21210 21210 E AndroidRuntime: at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2531)
01-21 07:22:33.735 21210 21210 E AndroidRuntime: at android.os.Handler.dispatchMessage(Handler.java:106)
01-21 07:22:33.735 21210 21210 E AndroidRuntime: at android.os.Looper.loopOnce(Looper.java:230)
01-21 07:22:33.735 21210 21210 E AndroidRuntime: at android.os.Looper.loop(Looper.java:319)
01-21 07:22:33.735 21210 21210 E AndroidRuntime: at android.app.ActivityThread.main(ActivityThread.java:8893)
01-21 07:22:33.735 21210 21210 E AndroidRuntime: at java.lang.reflect.Method.invoke(Native Method)
01-21 07:22:33.735 21210 21210 E AndroidRuntime: at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:608)
01-21 07:22:33.735 21210 21210 E AndroidRuntime: at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1103)
01-21 07:22:33.735 21210 21210 E AndroidRuntime: Caused by: android.app.ForegroundServiceStartNotAllowedException: Service.startForeground() not allowed due to mAllowStartForeground false: service com.fsck.k9/.controller.push.PushService
01-21 07:22:33.735 21210 21210 E AndroidRuntime: at android.app.ForegroundServiceStartNotAllowedException$1.createFromParcel(ForegroundServiceStartNotAllowedException.java:54)
01-21 07:22:33.735 21210 21210 E AndroidRuntime: at android.app.ForegroundServiceStartNotAllowedException$1.createFromParcel(ForegroundServiceStartNotAllowedException.java:50)
01-21 07:22:33.735 21210 21210 E AndroidRuntime: at android.os.Parcel.readParcelableInternal(Parcel.java:4882)
01-21 07:22:33.735 21210 21210 E AndroidRuntime: at android.os.Parcel.readParcelable(Parcel.java:4864)
01-21 07:22:33.735 21210 21210 E AndroidRuntime: at android.os.Parcel.createExceptionOrNull(Parcel.java:3064)
01-21 07:22:33.735 21210 21210 E AndroidRuntime: at android.os.Parcel.createException(Parcel.java:3053)
01-21 07:22:33.735 21210 21210 E AndroidRuntime: at android.os.Parcel.readException(Parcel.java:3036)
01-21 07:22:33.735 21210 21210 E AndroidRuntime: at android.os.Parcel.readException(Parcel.java:2978)
01-21 07:22:33.735 21210 21210 E AndroidRuntime: at android.app.IActivityManager$Stub$Proxy.setServiceForeground(IActivityManager.java:7214)
01-21 07:22:33.735 21210 21210 E AndroidRuntime: at android.app.Service.startForeground(Service.java:862)
01-21 07:22:33.735 21210 21210 E AndroidRuntime: at com.fsck.k9.controller.push.PushService.startForeground(PushService.kt:45)
01-21 07:22:33.735 21210 21210 E AndroidRuntime: at com.fsck.k9.controller.push.PushService.onStartCommand(PushService.kt:28)
01-21 07:22:33.735 21210 21210 E AndroidRuntime: at android.app.ActivityThread.handleServiceArgs(ActivityThread.java:5268)
01-21 07:22:33.735 21210 21210 E AndroidRuntime: … 9 more
01-21 22:16:29.797 31294 31294 E AndroidRuntime: FATAL EXCEPTION: main
01-21 22:16:29.797 31294 31294 E AndroidRuntime: Process: com.fsck.k9, PID: 31294
01-21 22:16:29.797 31294 31294 E AndroidRuntime: java.lang.RuntimeException: Unable to start service com.fsck.k9.controller.push.PushService@f80e4d5 with null: android.app.ForegroundServiceStartNotAllowedException: Service.startForeground() not allowed due to mAllowStartForeground false: service com.fsck.k9/.controller.push.PushService
01-21 22:16:29.797 31294 31294 E AndroidRuntime: at android.app.ActivityThread.handleServiceArgs(ActivityThread.java:5286)
01-21 22:16:29.797 31294 31294 E AndroidRuntime: at android.app.ActivityThread.-$$Nest$mhandleServiceArgs(Unknown Source:0)
01-21 22:16:29.797 31294 31294 E AndroidRuntime: at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2531)
01-21 22:16:29.797 31294 31294 E AndroidRuntime: at android.os.Handler.dispatchMessage(Handler.java:106)
01-21 22:16:29.797 31294 31294 E AndroidRuntime: at android.os.Looper.loopOnce(Looper.java:230)
01-21 22:16:29.797 31294 31294 E AndroidRuntime: at android.os.Looper.loop(Looper.java:319)
01-21 22:16:29.797 31294 31294 E AndroidRuntime: at android.app.ActivityThread.main(ActivityThread.java:8893)
01-21 22:16:29.797 31294 31294 E AndroidRuntime: at java.lang.reflect.Method.invoke(Native Method)
01-21 22:16:29.797 31294 31294 E AndroidRuntime: at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:608)
01-21 22:16:29.797 31294 31294 E AndroidRuntime: at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1103)
01-21 22:16:29.797 31294 31294 E AndroidRuntime: Caused by: android.app.ForegroundServiceStartNotAllowedException: Service.startForeground() not allowed due to mAllowStartForeground false: service com.fsck.k9/.controller.push.PushService
01-21 22:16:29.797 31294 31294 E AndroidRuntime: at android.app.ForegroundServiceStartNotAllowedException$1.createFromParcel(ForegroundServiceStartNotAllowedException.java:54)
01-21 22:16:29.797 31294 31294 E AndroidRuntime: at android.app.ForegroundServiceStartNotAllowedException$1.createFromParcel(ForegroundServiceStartNotAllowedException.java:50)
01-21 22:16:29.797 31294 31294 E AndroidRuntime: at android.os.Parcel.readParcelableInternal(Parcel.java:4882)
01-21 22:16:29.797 31294 31294 E AndroidRuntime: at android.os.Parcel.readParcelable(Parcel.java:4864)
01-21 22:16:29.797 31294 31294 E AndroidRuntime: at android.os.Parcel.createExceptionOrNull(Parcel.java:3064)
01-21 22:16:29.797 31294 31294 E AndroidRuntime: at android.os.Parcel.createException(Parcel.java:3053)
01-21 22:16:29.797 31294 31294 E AndroidRuntime: at android.os.Parcel.readException(Parcel.java:3036)
01-21 22:16:29.797 31294 31294 E AndroidRuntime: at android.os.Parcel.readException(Parcel.java:2978)
01-21 22:16:29.797 31294 31294 E AndroidRuntime: at android.app.IActivityManager$Stub$Proxy.setServiceForeground(IActivityManager.java:7214)
01-21 22:16:29.797 31294 31294 E AndroidRuntime: at android.app.Service.startForeground(Service.java:862)
01-21 22:16:29.797 31294 31294 E AndroidRuntime: at com.fsck.k9.controller.push.PushService.startForeground(PushService.kt:45)
01-21 22:16:29.797 31294 31294 E AndroidRuntime: at com.fsck.k9.controller.push.PushService.onStartCommand(PushService.kt:28)
01-21 22:16:29.797 31294 31294 E AndroidRuntime: at android.app.ActivityThread.handleServiceArgs(ActivityThread.java:5268)
01-21 22:16:29.797 31294 31294 E AndroidRuntime: … 9 more
01-21 22:16:31.273 31337 31337 E AndroidRuntime: FATAL EXCEPTION: main
01-21 22:16:31.273 31337 31337 E AndroidRuntime: Process: com.fsck.k9, PID: 31337
01-21 22:16:31.273 31337 31337 E AndroidRuntime: java.lang.RuntimeException: Unable to start service com.fsck.k9.controller.push.PushService@15884ea with null: android.app.ForegroundServiceStartNotAllowedException: Service.startForeground() not allowed due to mAllowStartForeground false: service com.fsck.k9/.controller.push.PushService
01-21 22:16:31.273 31337 31337 E AndroidRuntime: at android.app.ActivityThread.handleServiceArgs(ActivityThread.java:5286)
01-21 22:16:31.273 31337 31337 E AndroidRuntime: at android.app.ActivityThread.-$$Nest$mhandleServiceArgs(Unknown Source:0)
01-21 22:16:31.273 31337 31337 E AndroidRuntime: at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2531)
01-21 22:16:31.273 31337 31337 E AndroidRuntime: at android.os.Handler.dispatchMessage(Handler.java:106)
01-21 22:16:31.273 31337 31337 E AndroidRuntime: at android.os.Looper.loopOnce(Looper.java:230)
01-21 22:16:31.273 31337 31337 E AndroidRuntime: at android.os.Looper.loop(Looper.java:319)
01-21 22:16:31.273 31337 31337 E AndroidRuntime: at android.app.ActivityThread.main(ActivityThread.java:8893)
01-21 22:16:31.273 31337 31337 E AndroidRuntime: at java.lang.reflect.Method.invoke(Native Method)
01-21 22:16:31.273 31337 31337 E AndroidRuntime: at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:608)
01-21 22:16:31.273 31337 31337 E AndroidRuntime: at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1103)
01-21 22:16:31.273 31337 31337 E AndroidRuntime: Caused by: android.app.ForegroundServiceStartNotAllowedException: Service.startForeground() not allowed due to mAllowStartForeground false: service com.fsck.k9/.controller.push.PushService
01-21 22:16:31.273 31337 31337 E AndroidRuntime: at android.app.ForegroundServiceStartNotAllowedException$1.createFromParcel(ForegroundServiceStartNotAllowedException.java:54)
01-21 22:16:31.273 31337 31337 E AndroidRuntime: at android.app.ForegroundServiceStartNotAllowedException$1.createFromParcel(ForegroundServiceStartNotAllowedException.java:50)
01-21 22:16:31.273 31337 31337 E AndroidRuntime: at android.os.Parcel.readParcelableInternal(Parcel.java:4882)
01-21 22:16:31.273 31337 31337 E AndroidRuntime: at android.os.Parcel.readParcelable(Parcel.java:4864)
01-21 22:16:31.273 31337 31337 E AndroidRuntime: at android.os.Parcel.createExceptionOrNull(Parcel.java:3064)
01-21 22:16:31.273 31337 31337 E AndroidRuntime: at android.os.Parcel.createException(Parcel.java:3053)
01-21 22:16:31.273 31337 31337 E AndroidRuntime: at android.os.Parcel.readException(Parcel.java:3036)
01-21 22:16:31.273 31337 31337 E AndroidRuntime: at android.os.Parcel.readException(Parcel.java:2978)
01-21 22:16:31.273 31337 31337 E AndroidRuntime: at android.app.IActivityManager$Stub$Proxy.setServiceForeground(IActivityManager.java:7214)
01-21 22:16:31.273 31337 31337 E AndroidRuntime: at android.app.Service.startForeground(Service.java:862)
01-21 22:16:31.273 31337 31337 E AndroidRuntime: at com.fsck.k9.controller.push.PushService.startForeground(PushService.kt:45)
01-21 22:16:31.273 31337 31337 E AndroidRuntime: at com.fsck.k9.controller.push.PushService.onStartCommand(PushService.kt:28)
01-21 22:16:31.273 31337 31337 E AndroidRuntime: at android.app.ActivityThread.handleServiceArgs(ActivityThread.java:5268)
01-21 22:16:31.273 31337 31337 E AndroidRuntime: … 9 more
01-21 22:43:47.958 3131 3131 E AndroidRuntime: FATAL EXCEPTION: main
01-21 22:43:47.958 3131 3131 E AndroidRuntime: Process: com.fsck.k9, PID: 3131
01-21 22:43:47.958 3131 3131 E AndroidRuntime: java.lang.RuntimeException: Unable to start service com.fsck.k9.controller.push.PushService@f80e4d5 with null: android.app.ForegroundServiceStartNotAllowedException: Service.startForeground() not allowed due to mAllowStartForeground false: service com.fsck.k9/.controller.push.PushService
01-21 22:43:47.958 3131 3131 E AndroidRuntime: at android.app.ActivityThread.handleServiceArgs(ActivityThread.java:5286)
01-21 22:43:47.958 3131 3131 E AndroidRuntime: at android.app.ActivityThread.-$$Nest$mhandleServiceArgs(Unknown Source:0)
01-21 22:43:47.958 3131 3131 E AndroidRuntime: at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2531)
01-21 22:43:47.958 3131 3131 E AndroidRuntime: at android.os.Handler.dispatchMessage(Handler.java:106)
01-21 22:43:47.958 3131 3131 E AndroidRuntime: at android.os.Looper.loopOnce(Looper.java:230)
01-21 22:43:47.958 3131 3131 E AndroidRuntime: at android.os.Looper.loop(Looper.java:319)
01-21 22:43:47.958 3131 3131 E AndroidRuntime: at android.app.ActivityThread.main(ActivityThread.java:8893)
01-21 22:43:47.958 3131 3131 E AndroidRuntime: at java.lang.reflect.Method.invoke(Native Method)
01-21 22:43:47.958 3131 3131 E AndroidRuntime: at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:608)
01-21 22:43:47.958 3131 3131 E AndroidRuntime: at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1103)
01-21 22:43:47.958 3131 3131 E AndroidRuntime: Caused by: android.app.ForegroundServiceStartNotAllowedException: Service.startForeground() not allowed due to mAllowStartForeground false: service com.fsck.k9/.controller.push.PushService
01-21 22:43:47.958 3131 3131 E AndroidRuntime: at android.app.ForegroundServiceStartNotAllowedException$1.createFromParcel(ForegroundServiceStartNotAllowedException.java:54)
01-21 22:43:47.958 3131 3131 E AndroidRuntime: at android.app.ForegroundServiceStartNotAllowedException$1.createFromParcel(ForegroundServiceStartNotAllowedException.java:50)
01-21 22:43:47.958 3131 3131 E AndroidRuntime: at android.os.Parcel.readParcelableInternal(Parcel.java:4882)
01-21 22:43:47.958 3131 3131 E AndroidRuntime: at android.os.Parcel.readParcelable(Parcel.java:4864)
01-21 22:43:47.958 3131 3131 E AndroidRuntime: at android.os.Parcel.createExceptionOrNull(Parcel.java:3064)
01-21 22:43:47.958 3131 3131 E AndroidRuntime: at android.os.Parcel.createException(Parcel.java:3053)
01-21 22:43:47.958 3131 3131 E AndroidRuntime: at android.os.Parcel.readException(Parcel.java:3036)
01-21 22:43:47.958 3131 3131 E AndroidRuntime: at android.os.Parcel.readException(Parcel.java:2978)
01-21 22:43:47.958 3131 3131 E AndroidRuntime: at android.app.IActivityManager$Stub$Proxy.setServiceForeground(IActivityManager.java:7214)
01-21 22:43:47.958 3131 3131 E AndroidRuntime: at android.app.Service.startForeground(Service.java:862)
01-21 22:43:47.958 3131 3131 E AndroidRuntime: at com.fsck.k9.controller.push.PushService.startForeground(PushService.kt:45)
01-21 22:43:47.958 3131 3131 E AndroidRuntime: at com.fsck.k9.controller.push.PushService.onStartCommand(PushService.kt:28)
01-21 22:43:47.958 3131 3131 E AndroidRuntime: at android.app.ActivityThread.handleServiceArgs(ActivityThread.java:5268)
01-21 22:43:47.958 3131 3131 E AndroidRuntime: … 9 more
01-21 22:43:51.033 4063 4063 E AndroidRuntime: FATAL EXCEPTION: main
01-21 22:43:51.033 4063 4063 E AndroidRuntime: Process: com.fsck.k9, PID: 4063
01-21 22:43:51.033 4063 4063 E AndroidRuntime: java.lang.RuntimeException: Unable to start service com.fsck.k9.controller.push.PushService@2db8de with null: android.app.ForegroundServiceStartNotAllowedException: Service.startForeground() not allowed due to mAllowStartForeground false: service com.fsck.k9/.controller.push.PushService
01-21 22:43:51.033 4063 4063 E AndroidRuntime: at android.app.ActivityThread.handleServiceArgs(ActivityThread.java:5286)
01-21 22:43:51.033 4063 4063 E AndroidRuntime: at android.app.ActivityThread.-$$Nest$mhandleServiceArgs(Unknown Source:0)
01-21 22:43:51.033 4063 4063 E AndroidRuntime: at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2531)
01-21 22:43:51.033 4063 4063 E AndroidRuntime: at android.os.Handler.dispatchMessage(Handler.java:106)
01-21 22:43:51.033 4063 4063 E AndroidRuntime: at android.os.Looper.loopOnce(Looper.java:230)
01-21 22:43:51.033 4063 4063 E AndroidRuntime: at android.os.Looper.loop(Looper.java:319)
01-21 22:43:51.033 4063 4063 E AndroidRuntime: at android.app.ActivityThread.main(ActivityThread.java:8893)
01-21 22:43:51.033 4063 4063 E AndroidRuntime: at java.lang.reflect.Method.invoke(Native Method)
01-21 22:43:51.033 4063 4063 E AndroidRuntime: at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:608)
01-21 22:43:51.033 4063 4063 E AndroidRuntime: at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1103)
01-21 22:43:51.033 4063 4063 E AndroidRuntime: Caused by: android.app.ForegroundServiceStartNotAllowedException: Service.startForeground() not allowed due to mAllowStartForeground false: service com.fsck.k9/.controller.push.PushService
01-21 22:43:51.033 4063 4063 E AndroidRuntime: at android.app.ForegroundServiceStartNotAllowedException$1.createFromParcel(ForegroundServiceStartNotAllowedException.java:54)
01-21 22:43:51.033 4063 4063 E AndroidRuntime: at android.app.ForegroundServiceStartNotAllowedException$1.createFromParcel(ForegroundServiceStartNotAllowedException.java:50)
01-21 22:43:51.033 4063 4063 E AndroidRuntime: at android.os.Parcel.readParcelableInternal(Parcel.java:4882)
01-21 22:43:51.033 4063 4063 E AndroidRuntime: at android.os.Parcel.readParcelable(Parcel.java:4864)
01-21 22:43:51.033 4063 4063 E AndroidRuntime: at android.os.Parcel.createExceptionOrNull(Parcel.java:3064)
01-21 22:43:51.033 4063 4063 E AndroidRuntime: at android.os.Parcel.createException(Parcel.java:3053)
01-21 22:43:51.033 4063 4063 E AndroidRuntime: at android.os.Parcel.readException(Parcel.java:3036)
01-21 22:43:51.033 4063 4063 E AndroidRuntime: at android.os.Parcel.readException(Parcel.java:2978)
01-21 22:43:51.033 4063 4063 E AndroidRuntime: at android.app.IActivityManager$Stub$Proxy.setServiceForeground(IActivityManager.java:7214)
01-21 22:43:51.033 4063 4063 E AndroidRuntime: at android.app.Service.startForeground(Service.java:862)
01-21 22:43:51.033 4063 4063 E AndroidRuntime: at com.fsck.k9.controller.push.PushService.startForeground(PushService.kt:45)
01-21 22:43:51.033 4063 4063 E AndroidRuntime: at com.fsck.k9.controller.push.PushService.onStartCommand(PushService.kt:28)
01-21 22:43:51.033 4063 4063 E AndroidRuntime: at android.app.ActivityThread.handleServiceArgs(ActivityThread.java:5268)
01-21 22:43:51.033 4063 4063 E AndroidRuntime: … 9 more
--------- beginning of system

This link explains how to capture a log and what to do with it once you have it :slightly_smiling_face:

Thank you for the link.

Unfortunately, not only do I not know the “trigger” for the bug, I don’t know whether it has happened as much the past couple of days. The 600kb log file I collected mostly overnight and into the next morning, and I am pretty sure it crashed two or three times in that period. Unfortunately I rarely see a notification of a crash when it happens, just Android saying it has been crashing “frequently” and offering to kill it more decisively. K9 never seems to crash while I’m using it; always in the background (or maybe while being restored from not looking at it).

If I turn on “developer mode” in Android will I get better crash messages? I know little about that.

No, that won’t change anything related to logging.
No idea about the crashes, maybe wait until someone with better knowledge replies :wink:

Have you tried force closing K-9, clearing the cache and the restarting it?

The error trace suggests that the foreground service required for notifications cannot be started due to permissions not set. As Android 14 handles these permissions differently than Android 13, there just might be some old service setup in the cache.

If that does not help, try backing up you configuration and reinstall K-9. With a fresh install, Android should ask you whether you want to grant the permissions required by the app.

Finally, Samsung devices tend to handle some permissions differently in OneUI. You could try to delete OneUI persistent memory through the repair console. But I am not sure if you need to unlock your phone for that (last time I had to do that on a Samsung, the Fort Knox protection required an unlock before being able to access the repair console…).

My idea for a temporary workaround would be to not clear anything, but to disable battery optimization for K-9 from the Android settings app. That might help against the new foreground service restrictions in Android 14.

I could have sworn the app was already un-optimized, but apparently that got reset with the upgrade. I’ve turned off optimization by setting it to “Unrestricted,” and I’ll watch for crashes.

(I got to it this way – press and hold the K9 icon on the home screen. When the menu appears, touch the (i) option in the top right of the menu and choose “Battery.” I see that I can also get to the same place using Settings (gear menu) → Apps → K-9 Mail.)

By the way, the app was crashed (or disabled) just now with no indication it had died until I opened it. It seems to take at least an hour or two of not looking at it for the crash to happen.

I ran the logs a couple of hours. I set a timer for an hour, woke the app, restarted the timer, and woke it again in another hour.

I caught another FATAL EXCEPTION error but it’s later on in an even bigger 800kb log. Apparently the log gets bigger and bigger and doesn’t clear on its own when you turn it off.

I’ll try deleting the cache, maybe redoing my settings and maybe seeing if I can save a more focused log.

I exported the K9 settings, wiped the memory, restored the settings.

Now the log files it saves are much smaller, but the old crashes are still listed at the top! SO some portion of the logs obviously get stored somewhere other than the app memory (a system log area apparently).

In the meantime I guess there have not been any additional crashes logged since I turned off optimization. The phone gets laggy occasionally since the Android upgrade so K9 sometimes looks like it was halted when I switch from another app.

I’ll keep watching and if I see a new error I’ll check back here.