Syncthing is constantly killed on Android 8.0


So I have been dealing with this for months, but it has just gotten worse and exhausting. I have to constantly restart Syncthing manually on Android 8.0, every now and then. And when I check back if a folder is synced, it’s just to notice that Syncthing had been killed (a few minutes/hours) before. So I am constantly restarting a service that is supposed to run on background, and it almost never keep running for more than 10 minutes.

When I disconnect from wifi and reconnect, it doesn’t start automatically in background anymore, like it did before. I even tried an automation app to start it when on a wifi, but it was a bit cumbersome.

Syncthing was running fine on Lollipop, started doing this on Nougat and got nearly unusable on Marshmallow. Don’t know how things will go on Android P.

I’ve double- or triple-checked all the settings: disabled battery optimization disabled on Android, tried every single settings combination on Syncthing (wifi only or not, charging only or not, background/foreground, experimental features etc.), to no avail.

I’d just like it to run continuously in background.

Help, please. HELP.

Thank you.

What phone and ROM are you using? There’s a chance that the manufacturer added some task killers that can’t be disabled. It would be possible to add some other methods in the app start itself, but I’m not sure how well that would work (using the JobScheduler API.

Another option for the long term is Syncthing Lite.

Thanks for replying.

I’m using a Oneplus 3 running the stock rom. I’ve been using Syncthing on it since I got it in July 2016.

I have heard of Syncthing Lite, but I’d prefer a real sync job (entire repo).

Hi all,

How and where can I grab the logs of the crash (I never know when it occurs…) and where to send/post it for someone to kindly look at it ?

Thanks in advance.

Hi Felix,

thanks for your answer.

I know background processes can be one of the most problematic part of the mobile software development because of several reasons like the very limited resources.

I really appreciate your effort in developing syncthing.

Maybe you should check the ACR (Audio Call Recorder) Android application how it works because it works correctly on my phone for a long time. Like Syncthing, ACR also has a notification popup on the top of the screen (sorry, I don’t know the correct name of it). For ACR, I didn’t turned of battery optimization as I did for Syncthing to try to solve unexcepted exiting.

Thanks & br, Halacs

Hi @Halacs and thanks for your input.

Do you think it’s ROM-related ? Should I flash something else (LineageOS, for exemple) to see if it’s better ?

Hi, I don’t think so because I already have another working application on the same phone. That application is Audio Call Recorder (ACR) from NLL.

Hi folks, just a quick but important update.

This bug seems to have nothing to do with Syncthing, rather with the couple OnePlus and Oreo. In fact, it has been an issue for a while in OxygenOS, but got worse with the Oreo upgrade.

There are many threads raising it on OnePlus’ subreddit, but this one seems the most relevant on OnePlus forums.

Hope it helps you, @Nutomic