message-mirror icon indicating copy to clipboard operation
message-mirror copied to clipboard

[Bugs] App crashes immediately when tapping “Start Monitoring Service”

Open MeteorVE opened this issue 1 year ago • 1 comments

Body Environment

Device model: S23U , OneUI 7.0, Android 15, App version & install method: v1.1.1 (arm v8 / v8a APK) using the released APK.

Steps to reproduce

  • Open Message Mirror app.
  • Configure and save webhook / endpoint.
  • Confirmed notification permission / notification access.
  • Tap “Start Monitoring Service” on the main screen.

Observed behavior

  • App crashes (force-close) immediately (service onCreate fails).

Original crash log snippet (from adb logcat)

 --------- beginning of crash 11-07 17:14:22.822 6453 6453 E AndroidRuntime: FATAL EXCEPTION: main 11-07 17:14:22.822 6453 6453 E AndroidRuntime: Process: lol.arian.notifmirror, PID: 6453 11-07 17:14:22.822 6453 6453 E AndroidRuntime: java.lang.RuntimeException: Unable to create service lol.arian.notifmirror.AlwaysOnService: java.lang.SecurityException: Starting FGS with type dataSync callerApp=ProcessRecord{edb3db7 6453:lol.arian.notifmirror/u0a803} targetSDK=36 requires permissions: all of the permissions allOf=true [android.permission.FOREGROUND_SERVICE_DATA_SYNC] 11-07 17:14:22.822 6453 6453 E AndroidRuntime: at android.app.ActivityThread.handleCreateService(ActivityThread.java:5599) ... 11-07 17:14:22.822 6453 6453 E AndroidRuntime: Caused by: java.lang.SecurityException: Starting FGS with type dataSync callerApp=ProcessRecord{edb3db7 6453:lol.arian.notifmirror/u0a803} targetSDK=36 requires permissions: all of the permissions allOf=true [android.permission.FOREGROUND_SERVICE_DATA_SYNC] ... 11-07 17:14:24.004 14309 14309 E AndroidRuntime: FATAL EXCEPTION: main 11-07 17:14:24.004 14309 14309 E AndroidRuntime: Process: lol.arian.notifmirror, PID: 14309 11-07 17:14:24.004 14309 14309 E AndroidRuntime: java.lang.RuntimeException: Unable to create service lol.arian.notifmirror.AlwaysOnService: java.lang.SecurityException: Starting FGS with type dataSync callerApp=ProcessRecord{ad1a883 14309:lol.arian.notifmirror/u0a803} targetSDK=36 requires permissions: all of the permissions allOf=true [android.permission.FOREGROUND_SERVICE_DATA_SYNC] ... 11-07 17:14:24.004 14309 14309 E AndroidRuntime: Caused by: android.os.RemoteException: Remote stack trace: 11-07 17:14:24.004 14309 14309 E AndroidRuntime: at com.android.server.am.ActiveServices.validateForegroundServiceType(...) --------- end

How I collected logs

Connected device: adb devices (shows R5CW21N2JDK) Cleared old logs: adb logcat -c Started filtered log capture (example): adb logcat -v time 'MsgMirror:D AndroidRuntime:E *:S' > crash_log.txt

While logcat was capturing, I tapped “Start Monitoring Service” in the app and saved the output from crash_log.txt. I also tried to start the service via adb for diagnosis and received: adb shell am start-foreground-service -n lol.arian.notifmirror/.AlwaysOnService -> Error: Requires permission not exported from uid 10803

Suggested areas to inspect (suggested by AI; not prescriptive) keyword: FOREGROUND_SERVICE_DATA_SYNC, targetSdk, startForeground error handling

If you need any more information, I can try to extract it again. Thank you!

MeteorVE avatar Nov 07 '25 09:11 MeteorVE

Fixed in the latest release, please update from the Releases page; it adds the required foreground-service permission and prevents the crash. v1.1.2 Release

Dragon-Born avatar Nov 08 '25 15:11 Dragon-Born