Syncthing stops when switching Android user profile
I have configured Syncthing to run as a service but I often find that it isn't running and I have to start it manually.
I think the issue is that this device is shared by multiple people, and it seems that Syncthing gets shut down when switching user accounts. But if it's running as a service I expect that it should keep running no matter which account is in use.
Version Information
App Version: 1.23.6.3
Syncthing Version: v1.23.6
Android Version: Android 10
Don't know what you mean by "run as a service" on android. Generally yes, there's no support for multiple profiles - the syncthing instances will conflict in various ways. There are no plans of adding support for that, see https://github.com/syncthing/syncthing-android#no-feature-request-taken-feature-contributions-case-by-case
Don't know what you mean by "run as a service" on android.
My apologies. I took it for granted that "run as a service" means the same thing for all computers, regardless of the OS/platform. When I configure something to run as a system service I expect it to start running when the device is powered on, and then to keep running in the background in perpetuity while the device is powered on, regardless of whether any OS-level user accounts are logged in or not.
Syncthing for Android appears to offer such a configuration under Settings -> Behaviour.
But it does not work as expected. Hence this bug report.
Ah yeah, my confusion stemmed from the fact that there's actual different ways to "run" (manage the lifetime of) syncthing on other platforms - while this option "just" makes the app and thus syncthing start automatically. Anyway "run as a service" is perfectly sensible given the name of this options, and I could have recognized that.
As for the actual issue: If you can reproduce without using syncthing-android in multiple profiles, please let me know and we can re-open.
If you can reproduce without using syncthing-android in multiple profiles, please let me know and we can re-open.
Just to be clear: I am using Syncthing on an Android device that has multiple Android user accounts, but only one of those user accounts (mine) is using Syncthing. I am not trying to have multiple users with separate Syncthing configurations on the same Android device.
That clarifies things. Logs through adb logcat from when it happens might provide hints of what's going on. However it might also just be that Android doesn't allow/terminates background processes when switching to a different profile, in which case we can't do anything about it. I wont be looking into this, but I am leaving it open to accumulate more info, either to make it actionable or if it's an android limitation, to document that.