Syncthing-android: Sync on Wifi not working correctly

Created on 24 Apr 2016  路  45Comments  路  Source: syncthing/syncthing-android

0.12.22 and when the option Always Run In Background and WiFi is chosen, it does will not start.

CM 13
Nexus 5

bug frozen-due-to-age

All 45 comments

What does will not start mean? The app? Transfers?

Hi,

My apologies. I've only had 1 coffee today :-)

OK, here is a more detailed description with screenshots.

I think I've narrowed it down to Syncthing stopping when I tick "Only sync
on wi-fi".

Attached are 4 screenshots showing the error, the fact that the
notification icon should be shown all the time, the options I have chosen,
and then what happens when I choose "Only sync on wi-fi."

As you can see, I am connected to my wi-fi, and it works.

Over to you...

Ah, my screenshots have not appeared here. How shall I post them?

Upload them to https://imgur.com and post the links.

So, you only get tis message when you are not connected to Wifi?
That is by design.
The Syncthing Android App is just a wrapper for the normal binary. So the only way to prevent Syncthing from doing anything is to stop/kill it, when there is no Wifi connection. This means, that the Synthing API is not accessible. The App uses the API to access the Syncthing config, so without it, the App cannot know anything (folders, devices, ...) and cannot realy be run.

Hi All,

OK, the screenshots are here - http://imgur.com/a/ud8eN - and here's what they are of...

  1. The error that now appears. Syncthing has been fine for a year. I always leave it running in the background and I have not changed ANY settings.
  2. The notification setting which I have not changed. I like to see the icon.
  3. OK, this is the crucial one. You'll notice that my Wi-Fi is on and connected. You'll also notice that there is NO Syncthing icon. You'll notice that "Sync only on wifi" is ticked. Now...
  4. ...when I UNTICK "Sync only on wifi", the icon appears and Syncthing starts. When I TICK sync on wifi, it STOPS and the icon disappears.

Correct me if I'm wrong, but this is the exact opposite of what should happen, and indeed what has been happening for the last year of using Syncthing and Syncthing Android.

So, in summary... when I want to use Syncthing in the background and on wifi, it stops.

It has been fine, but this particular problem has only just started.

I have tried rebooting, going in to the GUI and various tests, but it does not fix it.

Paul

CM13 (Android 6.0.1)
LG Nexus 5 (hammerhead)
Syncthing 0.12.22

And you are connected to Wi-Fi named AAAAA, and in the restricted option in Syncthing the Wi-Fi AAAAA is checked, right?

I am connected to a WIFI at home.

Here is what I have ticked and what happens when I change the settings...

  1. Always run in background TICKED + Sync only on wifi UNTICKED = Syncthing running and Icon shown = GOOD.
  2. Always run in background TICKED + Sync only on wifi TICKED = Syncthing stopped and no Icon shown = BAD.
  3. Always run in background TICKED + Sync only on wifi TICKED + Restrict to certain wifi networks (mine chosen) = Syncthing stopped and no Icon shown = BAD.

So, it's not behaving itself.

Sorry :-(

I have upgraded this morning to the latest version of Syncthing for Android and I am now experiencing exactly the same issues as plittlefield.

I have this issue too on my And 4.2.

This does not make sense to me. It is wanting me to change the wifi only setting so that the wifi option is disabled otherwife it is refusing to let me open the syncthing main window.

Btw I get this message even if the device has wifi enabled and connected.

I've been having the exact same issue with the previous release, so it's probably not something introduced with this update.

What happens if you remove the restriction for certain WiFi? (I made a bug-fix to the WiFi selector in 0.7.14, which I would not think is related to this, but who knows...)

Same problem. See my 1, 2, 3 comment above :-(

@plittlefield Which Syncthing version are you using? And which version did you have before that worked? Alternatively: are you using Syncthing from Google Play or F-Droid?

I have version 0.7.15 from the Google Play Store, and I think it was a few versions ago that worked fine. In fact, there is a (possibly) related issue where Syncthing Android will crash every day at random intervals as well. I have reported that as well by using the Report button, if that helps aany. I am happy to try Beta versions of your app.

I use the latest Fdroid version on ANdroid 4.2 and I can confirm that this issue has been around for couple release however I never tried that before.

Confirm.
Nexus5
CM13
F-droid 0.7.15 (on 0.7.11 no this bug).

@zhnikita So, it started with 0.7.12? All later versions have this issue? Can you check that? That would be a very useful information.

Don't now. I use only f-droid. It has 0.7.11 and 0.7.15. No versoins between.

My friend had the same issue on CM13 with 0.7.13 & 0.7.15
It's not very consistent though, sometimes it works sometimes it doesn't.

Are we safe to jump back a few versions and then lock it to that version,
in order to test a theory? Do you have the .apk files?

Actually, do you want us to send you any logs?

The current logs won't show much. I hope to find some time this week to improve logging for a beta-build, on this it would be helpful then.

OK. The "other crashing problem" I talked about in this thread, pointed to
Java issues in the logs. I don't know if it's connected to this weird "not
running" problem...

There are quite some issues about random crashes, please have a look if one of them matches your log or please create a new one, in case none of them matches.

OK.

I've just spotted something else. In this release, 0.7.15 the Web GUI won't
load.

Works for me. If it fails, that's probably because Syncthing is not running for some reason.

Web un works for me too.
BTW I fiddled with the settings a bit and now it's synching over wifi. I'm not sure what did the trick though.

Hi,

Same problem here, it seems Syncthing does not recognized you are connected to a WiFi network. Even without WiFi network restriction (allowing to sync in either WiFi) does not detect you are connected through WiFi and says Syncthing is not running. Once you uncheck the box regarding running in background it is started and synchronized ok.

With the previous version for android I have not this issues.

Is there any easy way to downgrade? A trusted place to get the previous .apk?

Nexus 5X here with Android 6.0.1 and Syncthing-Android 0.7.15

I do not think that the dev is understanding the real issue despite our attempts to explain it

Indeed.

I think the web site has the previous .apks.

I'll go look tomorrow, and use Titanium Backup to backup my current config
and version.

Back then!

Actually, I've had this issue myself a few times (probably with 0.7.11), but that wasn't regular. I just tried to figure out which version it was introduced, but I can't reproduce it all the time.

It would be useful if someone could definitely say which versions are affected and which are not. F-Droid has most versions, I'll upload the missing versions here when I built them.

Brilliant, thanks.

We do understand what the problem the problem is, we just try to figure out when it got introduced so that we can find out _why_ it is happening.

If you uncheck the "Only sync on WiFi" it will of course start working, because, well, you told it to always sync in background. For some reason however, it's not really recognizing that it _is_ connected to a WiFi while it actually is. We had some reports that this has to do with "metered WiFi" settings, and the like.

What we are planing to do now is: add some logging in a beta-build. so that we get a clue _why_ it is not considered connected to a WiFi. But this will take some time, it seems that @Nutomic is busy at the moment, and I myself don't have much time this week either. Why am I jumping in here, you might ask: because I contributed the "Restrict to certain WiFi" features, and it _might_ be part of the problem, and I feel responsible for it. If it worked with 0.7.11, though, this becomes more unlikely because the feature was already in there.

The main issue I have is that I absolutely cannot reproduce the issue here, on my three 5.1.x devices (non CM, though), everything works as expected. And so it's a bit hard to track this down without asking a lot of questions. So any input is appreciated.

Understood, many thanks for your efforts. They are appreciated.

OK, I have an update to this thread.

Today, I used Titanium Backup to copy the app and data. I uninstalled the app and cleared the data. I rebooted the phone. Then, I used Titanium Backup to restore the app and data.

I connected to my home WiFi.

I started Syncthing and the error about being disabled was shown.

I had Always Run In Background, and Only Sync On WiFi ticked.

I changed that to just Always Run In Background, and then went back to the main screen.

The app stayed open and no error was shown.

So, I can now confirm that the bug is to do with the setting...

Only sync on wi-fi.

Paul

Here are download links for versions that aren't on F-Droid. These will install next to the version from Google Play/F-Droid. It would help us immensly to know which version introduced the problem.

https://dl.dropboxusercontent.com/u/22457329/syncthing-0.7.12.apk
https://dl.dropboxusercontent.com/u/22457329/syncthing-0.7.13.apk
https://dl.dropboxusercontent.com/u/22457329/syncthing-0.7.14.apk

Lovely, thanks. I shall try 0.7.12 and go up from there until it breaks :-)

OK, 0.7.15 backed up with Titanium, uninstalled, then...

# adb install /home/paully/Downloads/Android/Syncthing/syncthing-0.7.12.apk

The app starts, I have a clean setup. I change to Always Run In Background, and Sync Only On Wifi, and Notification: Normal... the Syncthing app stays loaded.

I turn off my Wi-Fi... Syncthing closes.

All good so far.

I turn Wi-Fi back ON the phone... Syncthing starts again.

I reboot my phone, and when the Wi-Fi kicks in... Syncthing starts.

So, 0.7.12 appears to be fine.

Is there anything else you want me to check with this version?

Just if you can reproduce this bug. I'm not quite sure _how_ to reproduce it though.

Indeed!

So I have this too now, strange that it worked yesterday.
0.7.15

I think that b1eee1b1be937e99b835996693fd30353b93c749 introduced the issue, so 0.7.14 and 0.7.15 should be affected, 0.7.13. should work.

Thanks to everyone who helped fix it.

Was this page helpful?
0 / 5 - 0 ratings