[Solved] Syncthing does not start on Android 9

Hi, i did the update to 1.2.2.2 this morning (published 09/08/19) on my Xiaomi MI9. After that syncthing reports that it can not start. This is the report: java.lang.RuntimeException: Unable to start service com.nutomic.syncthingandroid.service.SyncthingService@dd70ea0 with Intent { cmp=com.nutomic.syncthingandroid/.service.SyncthingService }: java.lang.SecurityException: Permission Denial: startForeground from pid=11968, uid=10225 requires android.permission.FOREGROUND_SERVICE

at android.app.ActivityThread.handleServiceArgs(ActivityThread.java:3722)

at android.app.ActivityThread.access$1700(ActivityThread.java:200)

at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1704)

at android.os.Handler.dispatchMessage(Handler.java:106)

at android.os.Looper.loop(Looper.java:201)

at android.app.ActivityThread.main(ActivityThread.java:6815)

at java.lang.reflect.Method.invoke(Native Method)

at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:547)

at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:873)

Caused by: java.lang.SecurityException: Permission Denial: startForeground from pid=11968, uid=10225 requires android.permission.FOREGROUND_SERVICE

at android.os.Parcel.createException(Parcel.java:1950)

at android.os.Parcel.readException(Parcel.java:1918)

at android.os.Parcel.readException(Parcel.java:1868)

at android.app.IActivityManager$Stub$Proxy.setServiceForeground(IActivityManager.java:5144)

at android.app.Service.startForeground(Service.java:695)

at com.nutomic.syncthingandroid.service.NotificationHandler.updatePersistentNotification(NotificationHandler.java:172)

at com.nutomic.syncthingandroid.service.SyncthingService.onStartCommand(SyncthingService.java:233)

at android.app.ActivityThread.handleServiceArgs(ActivityThread.java:3700)

… 8 more

Caused by: android.os.RemoteException: Remote stack trace:

at com.android.server.am.ActivityManagerService.enforcePermission(ActivityManagerService.java:9457)

at com.android.server.am.ActiveServices.setServiceForegroundInnerLocked(ActiveServices.java:1222)

at com.android.server.am.ActiveServices.setServiceForegroundLocked(ActiveServices.java:897)

at com.android.server.am.ActivityManagerService.setServiceForeground(ActivityManagerService.java:20940)

at android.app.IActivityManager$Stub.onTransact$setServiceForeground$(IActivityManager.java:10581)

Regards argie

Edit: Solved! Something went wrong with the first update. An additional update appears which then was able to start on Android.

My v1.2.2.2 Syncthing on Android 9 (LineageOS 16.0-20190815-NIGHTLY-sailfish) does not start either. An error message Syncthing keeps stopping pops up with a “Close app” button. I’ve been running Syncthing on my Android phones flawlessly for years, so this is a big surprise. I’m not really sure how to offer any more information about the problem since I don’t know where log information goes. The phone is a Pixel. The app is installed via F-droid. Any help would be appreciated. In the meantime, I’ll try to install a previous version.

By the way, I am thrilled that my contributed image of the tree from years ago is still used for the F-droid app banner image :slight_smile:

I installed v1.2.2 and it works.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.