https://bugs.kde.org/show_bug.cgi?id=508950
Bug ID: 508950
Summary: org.kde.kdeconnect_tp_13304 randomly crashes with
ForegroundServiceStartNotAllowedException in the
background
Classification: Applications
Product: kdeconnect
Version First 1.3.4
Reported In:
Platform: Android
URL: https://f-droid.org/repo/org.kde.kdeconnect_tp_13304.a
pk
OS: Android 14.x
Status: REPORTED
Severity: minor
Priority: NOR
Component: android-application
Assignee: [email protected]
Reporter: [email protected]
CC: [email protected],
[email protected]
Target Milestone: ---
Created attachment 184591
--> https://bugs.kde.org/attachment.cgi?id=184591&action=edit
kdeconnect-log.txt
# SUMMARY
KDE Connect 1.33.4 crashes in the background, for no apparent reason, on the
Fairphone 5's stock AOSP 15 distribution.
# STEPS TO REPRODUCE
1. Install https://f-droid.org/repo/org.kde.kdeconnect_tp_13304.apk.
2. Thereafter, it occurs randomly, in the background (according to the affected
user).
# OBSERVED RESULT
> ~~~
> FATAL EXCEPTION: main
> Process: org.kde.kdeconnect_tp, PID: 2369
> java.lang.RuntimeException: Unable to start service
> org.kde.kdeconnect.BackgroundService@6d8ded3 with null:
> android.app.ForegroundServiceStartNotAllowedException:
> Service.startForeground() not allowed due to mAllowStartForeground false:
> service org.kde.kdeconnect_tp/org.kde.kdeconnect.BackgroundService
> at
> android.app.ActivityThread.handleServiceArgs(ActivityThread.java:5166)
> at android.app.ActivityThread.-$$Nest$mhandleServiceArgs(Unknown
> Source:0)
> at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2470)
> at android.os.Handler.dispatchMessage(Handler.java:107)
> at android.os.Looper.loopOnce(Looper.java:232)
> at android.os.Looper.loop(Looper.java:317)
> at android.app.ActivityThread.main(ActivityThread.java:8751)
> at java.lang.reflect.Method.invoke(Native Method)
> at
> com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:580)
> at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:892)
> Caused by: android.app.ForegroundServiceStartNotAllowedException:
> Service.startForeground() not allowed due to mAllowStartForeground false:
> service org.kde.kdeconnect_tp/org.kde.kdeconnect.BackgroundService
> at
> android.app.ForegroundServiceStartNotAllowedException$1.createFromParcel(ForegroundServiceStartNotAllowedException.java:54)
> at
> android.app.ForegroundServiceStartNotAllowedException$1.createFromParcel(ForegroundServiceStartNotAllowedException.java:50)
> at android.os.Parcel.readParcelableInternal(Parcel.java:5075)
> at android.os.Parcel.readParcelable(Parcel.java:5057)
> at android.os.Parcel.createExceptionOrNull(Parcel.java:3237)
> at android.os.Parcel.createException(Parcel.java:3226)
> at android.os.Parcel.readException(Parcel.java:3209)
> at android.os.Parcel.readException(Parcel.java:3151)
> at
> android.app.IActivityManager$Stub$Proxy.setServiceForeground(IActivityManager.java:7208)
> at android.app.Service.startForeground(Service.java:863)
> at
> org.kde.kdeconnect.BackgroundService$$ExternalSyntheticApiModelOutline0.m(R8$$SyntheticClass:0)
> at
> org.kde.kdeconnect.BackgroundService.onStartCommand(BackgroundService.kt:237)
> at
> android.app.ActivityThread.handleServiceArgs(ActivityThread.java:5148)
> ... 9 more
> ~~~
Examples of this elsewhere (that I've encountered) include:
1. https://github.com/TelegramOfficial/Android/issues/6#issue-3138558091
2. https://github.com/TacoTheDank/Scoop/issues/92#issue-2825761507
3. https://github.com/element-hq/element-android/issues/8894#issue-2503201116
https://github.com/vicolo-dev/chrono/issues/406#issuecomment-2597756653 is
similar, too.
# EXPECTED RESULT
It shouldn't crash.
# SOFTWARE/OS VERSIONS
Of Connect:
> ~~~
> versionCode=13304
> versionName=1.33.4
> ~~~
Of the OS:
> ~~~
> [ro.build.version.release]: [15]
> [ro.build.display.id]: [FP5.VT28.C.042.20250623]
> ~~~
# ADDITIONAL INFORMATION
1. For future reference, this occurs on
[email protected]'s phone; not mine.
2. The disparity between the environment information in `#c0` and `#op_sys` is
due to https://bugs.kde.org/show_bug.cgi?id=508949#c0.
--
You are receiving this mail because:
You are watching all bug changes.