switching to syncthing results in hanging "loading" message

Syncthing version is v0.14.6, it is configured to run in the background, sync when charging or on wifi only are turned off. So, Syncthing always runs.

When I switch to syncthing, either by using the icon on the homescreen or by tapping the notification, many times the screen comes up darkened with a popup saying “loading …”. This message won’t disappear, the icon animation keeps turning though. But when I look at my servers’ syncthing webpages I can tell it is no longer syncing with the android device. I need to force quit syncthing, restart it, and it will load fine. Syncthing will continue to operate in the background, until at some later point I switch to it again as explained above.

I am running syncthing on a Oneplus 3, Cyanogenmod 13, latest nightly. My device is rooted, supersu installed. I can provide more info on my device if needed, just ask! I’ve been having this issue on the stock ROM too by the way.

To prevent syncthing to sync large folders that I only want to sync when I am on wifi, I have configured my server at home with 2 syncthing instances. The server is running Arch Linux with syncthing v0.14.7 (64 bit). One has global discovery turned on, for syncing pictures and documents, the other instance has that turned off so it is only discoverable on the local network and syncs two large backup folders.

I left syncthing on android pretty default otherwise, global and local discovery are on, NAT traversal is on and relaying is on. I have no debug options and under experimental everything is turned off.

I have 3 folders configured to always sync:

  1. Keepass DB, 21 files, 712 KiB
  2. Camera, 218 files, 2.2 GiB
  3. Scratch, 0 files, 0 B (used to drop random files to my device, I delete them when done)

Two folders are only synced when I am on wifi:

  1. TWRP Nandroid backups, 55 files, 14.8 GiB
  2. Titanium Backups, 590 files, 1.3 GiB

I would really like to solve this issue if possible. Any help would be appreciated!

Try enabling the keep awake option in the experimental settings and disabling battery optimization for Syncthing in the Android Settings.

Thanks.

let’s try one thing at a time. I see three options.

  1. Disable battery optimization (android setting)
  2. Keep CPU awake
  3. Run service with foreground prio

Given these options, which one would you try first?

Number 2 has my least preference due to the increased battery use, which I think will be substantial.

I had the battery optimization disabled the moment I upgraded to Android 6. IIRC at this time the keep CPU awake option didn’t exist. And I still had the disconnected node sometimes (I don’t remember, if I had the Loading indefinitely problem).

After enabling the keep CPU awake option, I never saw my Android node disconnected from my home node (while it was connected to Wifi). And I also didn’t notice an increase in overall battery consumption. The battery consumption in the overview of Android did increase significantly for Syncthing, as it was now the app to blame for the active CPU. But on a normal work day at 5 p.m. (on battery for 11 hours), the battery wasn’t really more empty then before activating that option.

wow oke, that’s good to know.

I’ll start with the battery optimization see if that helps. If not, I’ll just go through the other 2 settings one by one, and lastly the combination you suggest (battery optimization and cpu awake option).

I’ll report back what the result is.

THanks for the help!

Well I have changed the battery optimization for syncthing and haven’t had the loading popup since.

I’ll report back if it returns but it looks like it is solved.

Thanks for the help!