Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Syncthing stops when switching Android user profile #1953

Open
Deozaan opened this issue Jul 31, 2023 · 5 comments
Open

Syncthing stops when switching Android user profile #1953

Deozaan opened this issue Jul 31, 2023 · 5 comments

Comments

@Deozaan
Copy link

Deozaan commented Jul 31, 2023

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
@imsodin
Copy link
Member

imsodin commented Aug 6, 2023

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

@imsodin imsodin closed this as completed Aug 6, 2023
@Deozaan
Copy link
Author

Deozaan commented Aug 6, 2023

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.

SyncThing Android Service

But it does not work as expected. Hence this bug report.

@imsodin
Copy link
Member

imsodin commented Aug 7, 2023

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.

@Deozaan
Copy link
Author

Deozaan commented Aug 7, 2023

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.

@imsodin imsodin reopened this Aug 7, 2023
@imsodin imsodin changed the title Configured to start as service, but isn't always running Syncthing stops when switching Android user profile Aug 7, 2023
@imsodin
Copy link
Member

imsodin commented Aug 7, 2023

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants