mihon icon indicating copy to clipboard operation
mihon copied to clipboard

Foreground Service Crash on App Startup After Light Browsing (v0.18.0, Android 14)

Open pradelgorithm opened this issue 6 months ago • 0 comments

Steps to reproduce

Mihon App Crash Report – May 10, 2025

Summary While casually browsing for about 1-2 minutes on the Mihon app at 7:40 AM, the app crashed unexpectedly. This is not an isolated incident, with similar crashes logged since April 14, 2025.


User Behavior Before Crash

Opened the app normally.

Browsed content casually for 1-2 minutes.

No downloads, background tasks, or heavy operations noticed.

Crash happened spontaneously, interrupting normal use.

Exception Summary

android.app.RemoteServiceException$ForegroundServiceDidNotStartInTimeException: Context.startForegroundService() did not then call Service.startForeground() ServiceRecord{ea6362c u0 app.mihon/androidx.work.impl.foreground.SystemForegroundService}


Historical Occurrences

2025-04-14 23:41

2025-04-23 12:51

2025-04-28 13:24

2025-05-10 07:39


Recommendations for Engineering

  1. ForegroundService Validation

Ensure startForeground() is invoked immediately after startForegroundService().

  1. Worker Execution Review

Review the WorkManager and SystemForegroundService flow.

  1. Error Resilience

Add fallback or recovery mechanisms if foreground promotion fails.

  1. SQLite Locking Investigation

Review tachiyomi.db handling to avoid WAL recovery and lock errors.

  1. Chrome WebView Variation Seeds

Confirm WebView environment integrity for stable browsing.

  1. Android 14 Compatibility Review

Validate service execution policies under Android 14+ restrictions.

Expected behavior

Continue browsing the current file.

Actual behavior

Crash.

Crash logs

2025-05-10 07:39:26.538 -0400 32620 32620 E AndroidRuntime: FATAL EXCEPTION: main 2025-05-10 07:39:26.538 -0400 32620 32620 E AndroidRuntime: Process: app.mihon, PID: 32620 2025-05-10 07:39:26.538 -0400 32620 32620 E AndroidRuntime: android.app.RemoteServiceException$ForegroundServiceDidNotStartInTimeException: Context.startForegroundService() did not then call Service.startForeground(): ServiceRecord{ea6362c u0 app.mihon/androidx.work.impl.foreground.SystemForegroundService} at android.app.ActivityThread.generateForegroundServiceDidNotStartInTimeException(ActivityThread.java:2323) at android.app.ActivityThread.throwRemoteServiceException(ActivityThread.java:2294) at android.app.ActivityThread.-$$Nest$mthrowRemoteServiceException(Unknown Source:0) at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2619) at android.os.Handler.dispatchMessage(Handler.java:106) at android.os.Looper.loopOnce(Looper.java:230) at android.os.Looper.loop(Looper.java:319) at android.app.ActivityThread.main(ActivityThread.java:9063) at java.lang.reflect.Method.invoke(Native Method) at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:588) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1103)

Mihon version

0.18.0

Android version

14 (SDK 34; build UP1A.231005.007.S918U1UES6CYB3)

Device

Samsung S24+ Ultra

Other details

No response

Acknowledgements

  • [x] I have searched the existing issues and this is a new ticket, NOT a duplicate or related to another open or closed issue.
  • [x] I have written a short but informative title.
  • [x] I have gone through the FAQ and troubleshooting guide.
  • [x] I have updated the app to version 0.18.0.
  • [x] I have filled out all of the requested information in this form, including specific version numbers.
  • [x] I understand that Mihon does not have or fix any extensions, and I will not receive help for any issues related to sources or extensions.

pradelgorithm avatar May 10 '25 11:05 pradelgorithm