In settings I have set _run in background_ settings as shown in picture below. As you can see in top right corner, I'm charging my unrooted device (Nexus 6, stock Android 6) and it is also connected to WiFi.

When I exit the settings, by clicking the top left arrow, I get this dialog error.

This problem is hard to reproduce, since I think it only happens before all directories are synced with your other devices. When I synced all my directories and set the settings above, this problem did not occur.
Another possible scenario would be:
Although this seems unlikely because when you're in settings activity and click on back arrow (top left) it exits Syncthing all together (instead of going to main activity) and when you restart the app it works.
I'm sorry, I know this isn't really helpful since I can't fully reproduce the steps.
Did you perhaps select a wifi network in the "Restrict to certain wifi networks" setting and are connected to another network?
I did not change any settings in "Restrict to certain wifi networks". I'm connected to the same network. I tried to reproduce this error again, but I'm no longer able to. Maybe if I wipe the app data but I currently don't want to do that.
Edit: I tried to reproduce error multiple times with no success, but right now I was able to do it again. This is very odd.
I've been getting this way too often in cases where I couldn't. Try force
stopping the app, this has been a valid workaround for my case.
On Thu, 21 Jan 2016, 3:59 p.m. Skmlcd [email protected] wrote:
I did not change any settings in "Restrict to certain wifi networks". I'm
connected to the same network. I tried to reproduce this error again, but
I'm no longer able to. Maybe if I wipe the app data but I currently don't
want to do that.—
Reply to this email directly or view it on GitHub
https://github.com/syncthing/syncthing-android/issues/543#issuecomment-173616356
.
Lapse in internet connection maybe: https://github.com/syncthing/syncthing-android/issues/540 ?
Nope, I consistently get it when I go out of and then back in range of a
wifi network.
On Thu, 21 Jan 2016, 7:02 p.m. licaon-kter [email protected] wrote:
Lapse in internet connection maybe: #540
https://github.com/syncthing/syncthing-android/issues/540 ?—
Reply to this email directly or view it on GitHub
https://github.com/syncthing/syncthing-android/issues/543#issuecomment-173674941
.
I was about to report the same bug as well. This started with the latest version of syncthing. It may have to do with the existing config and I think I got it to stop doing that by unchecking the "Sync only on wifi" option and re-enabling it again. Or at least, that's when I stopped seeing this behavior.
It worked fine on 0.7.5 so the new "added option to sync only on specific wifi networks" might be at fault, I guess.
I'll look over the code again, especially for the cases with no restriction set (the contribution was by me). I can't reproduce the issue here with my configuration, but I do have a restriction to a network enabled, so maybe somethings wrong with the "no restrictions" case.
@veniosg @licaon-kter Do you only get it if you actually walk out of WiFi range and come into one again, or also if you enable/disable WiFi? I cannot reproduce the behavior here with either restrictions to certain WiFi's set or with no restriction set. But I can try here only by disabling WiFi, not by walking out of WiFi range, unfortunately.
Can you try @andersonvom suggestion, to uncheck "Sync only on wifi" and then check it again? Does it still occur then?
What I can confirm though, is that when you select "Change settings" and then select the "back" (either hardware button or the top-left arrow), the navigation closes the activity and not returns to the dialog, regardless if connection now or not. But this is connected to the UI back-stack handling.
I will check today and report back. I guess the same effect would be
achieved by turning wifi off and back on on the access point, but it is a
hit fiddly.
On Sat, 23 Jan 2016, 7:52 p.m. Martin Carpella [email protected]
wrote:
What I can confirm though, is that when you select "Change settings" and
then select the "back" (either hardware button or the top-left arrow), the
navigation closes the activity and not returns to the dialog, regardless if
connection now or not. But this is connected to the UI back-stack handling.—
Reply to this email directly or view it on GitHub
https://github.com/syncthing/syncthing-android/issues/543#issuecomment-174215921
.
I've got the bug right now and did some tests: Can't bring it back to life
by toggling "sync only on wifi", choosing any number of networks in the
wifi restriction list - obviously including the one in range right now or
turning wifi off and back on.
The two ways of successfully reviving the service are killing the app from
recents or toggling the always run in background setting off and then on.
Btw I'm on Marshmallow. Will still try to pinpoint when syncthing loses
track of its environment later in the day.
On Sun, 24 Jan 2016, 9:57 a.m. George Venios [email protected] wrote:
I will check today and report back. I guess the same effect would be
achieved by turning wifi off and back on on the access point, but it is a
hit fiddly.On Sat, 23 Jan 2016, 7:52 p.m. Martin Carpella [email protected]
wrote:What I can confirm though, is that when you select "Change settings" and
then select the "back" (either hardware button or the top-left arrow), the
navigation closes the activity and not returns to the dialog, regardless if
connection now or not. But this is connected to the UI back-stack handling.—
Reply to this email directly or view it on GitHub
https://github.com/syncthing/syncthing-android/issues/543#issuecomment-174215921
.
Another data point: I use my phone in China, where Google services are blocked. My wireless used to constantly have the exclamation mark next to it, indicating that there was a "problem with wireless" (because it couldn't ping home to Google), when in fact the wireless was fine. Syncthing was always telling me it was disabled, I guess because it believed the system when the system said there was a connectivity problem. I rooted the phone and shut off the connectivity check, and I've never had a problem with Syncthing since. I know this might not be immediately useful, but maybe Syncthing is a little more sensitive to the state of connectivity than it needs to be? Even if the wireless wasn't making it through to WAN, the connection could still be useful for syncing local devices.
@girzel Yes, that's a valid point, this app uses ConnectivityManager.getNetworkInfo(ConnectivityManager.TYPE_WIFI).isConnected() to check if WiFi is available and connected and tracks android.net.conn.CONNECTIVITY_CHANGE broadcasts to track changes. If Android believes that WiFi is not connected, this app will think so, too.
As a side note: If you are connected to a wifi network without internet (e.g. WAN cable disconnected) Android will not use that wifi network at all. This makes it impossible to connect to the router or other devices inside the wifi network.
Right, I wouldn't be surprised if there isn't very much that Syncthing
can do here. But if the connectivity checks can at all be made more
lenient, I think that would help.
@girzel That seems to be seperate from this issue. We could add a preference that disables the internet check. Feel free to open a new issue for that.
@Nutomic That's what https://github.com/syncthing/syncthing-android/issues/540 is for.
Whoops, seems you're way ahead of me :D
Edit: Although that seems kinda different, @girzel was asking for sync (I think), your issue is about editing settings (probably with sync paused?)
I just had the same problem. I'm not in China, Google services should be available and the wifi has connectivity, but as soon as I select to sync only in wifi and exit the settings screen, I get the notification that syncthing is disabled: do I want to change settings?
I've got running in background, sync only when charging and sync only in wifi checked. No wifi network restrictions.
Extra couple data points: as soon as I checked sync only one wifi, the syncthing options entry got grayed out, and vice versa when u checking the wifi only.
When the synching started (over wifi, but with wifi only checkbox unselected) I stopped getting the message box, but data transfer stops immediately when I check wifi only and promptly restarts when I uncheck it.
Hth :)
@emdioh So you uncheck "sync only on wifi", and exit the settings, and then it's still disabled? If so, that's a seperate bug. Can you open a new issue for it?
@skmlcd Can you try if this build fixes your issue? If so, I'll add that as an experimental option.
@Nutomic I will test that, but the problem is hard to reproduce tho.
@nutomic if I disable the wifi only option the problem goes away: it does look like the same bug
Same for me. Ticking off the "Sync only on WiFi" is the only thing that solves this, which is kind of a big deal.
Cleared the app data and the issues disappeared.
any progress here?
I'm getting the same issue on a Samsung Galaxy S6, but not on my Nexus 6. Not restricting to wifi is kind of a blocker for my using Syncthing so hopefully this can get resolved soon :)
This kept happening to me as well. Tried enabling/disabling all settings while both on battery/charging, WiFi/cellular data but nothing changed. Then went on to uninstalling/wiping data/rebooting but had same result after freshly reinstalling.
I realised that Power Save mode might have something to do with it (my battery isn't great so I normally have it on). I turned it off and it started working straight away!
Maybe the app should give you a message about it?
I just ran into the same issue. For me it's the "Sync only when charging" option that causes the problem. Specifically:
On a slightly different note, enabling "Sync only when charging" will also cause the "Syncthing settings" and "Syncthing GUI" entries farther below to be greyed out, as others have mentioned, and disabling it again will not bring them back unless one closes the settings activity for a moment. Furthermore, after the "Syncthing disabled" popup appears and one changes some settings, Syncthing closes as soon as one taps the back button, i.e. one does not get back to the main screen.
Same problem with Nexus 5x and Android 7.0. Had a Moto G 1st gen with Android 5.1 before in which the background sync worked fine ("Always run in background" enabled and "Sync only when charging" disabled and "Sync only on wifi" enabled, specific Wifi network selected).
New phone, new OS, clean Install, no importet settings (but the same settings as with the old phone).
I'm switching to manuall sync till the problem is fixed. I think "Always run in background" should work no matter what setting you set aside.
Thank you for this great app :) 👍
Likewise, I can't get it to work when I have "sync only on wifi" enabled. I'm definitely connected to wifi, and it refuses to work. Works fine if I turn that option off, but I don't want to kill my data plan. Nexus 6p stock Android 7.
A though, can you all get a screenshot of NetGuards>Settings>Tech info screen? It lists type of connection and stuff, to compare and maybe pinpoint some clues.
I am seeing a problem as well, and I think it is the same. CM 13, Nexus 5, syncthing-android build from f-droid. I have it set up to sync only when charging and only on wifi. When I boot the phone on wifi and charger it runs syncthing just fine. At some point - I'm really not yet clear on when - I'll notice it not syncing and trying to enter the app gets me the "sync is disabled/exit/change settings" dialog. If I turn off "only on wifi", it works. If I restart syncthing it works. I will try to get better debugging info.

Hope it helps. Maybe It's the wlan0 as it's IPv4 and IPv6. Had a problem with that and an ftp-server app for Android. Got rid of the problem by specifically choosing the IPv4.
I realize this doesn't narrow it down to OS vs syncthing, but on a nexus7 with CM13 and syncthing-android 0.14.9 from f-droid, my device was in doze, and then I picked it up and plugged it in. After a few minutes I entered syncthing from launcher and got the disabled message, even though it was on wifi which was working (had just fetched mail). I turned wifi off and then on, waited for joining my net and an address, and then when entering syncthing it started correctly and synced.
This should be fixed in 0.10.0. If you still have this problem, please open a new issue with logs.
Most helpful comment
This kept happening to me as well. Tried enabling/disabling all settings while both on battery/charging, WiFi/cellular data but nothing changed. Then went on to uninstalling/wiping data/rebooting but had same result after freshly reinstalling.
I realised that Power Save mode might have something to do with it (my battery isn't great so I normally have it on). I turned it off and it started working straight away!
Maybe the app should give you a message about it?