-
Notifications
You must be signed in to change notification settings - Fork 398
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 loading forever (Android 5.0) #2029
Comments
Have you tried uninstalling and reinstalling the app? Please be aware that doing so will wipe out all your Syncthing configuration though. |
And adb logcat might reveal relevant logs that the UI can't/doesn't display. |
I did not uninstall/reinstall syncthing (I can do it, if needed, but this also make that bug hard to reproduce, so I'm currently waiting and collecting as much information as I can) Here is logs from logcat exported: |
Also now there is android log available in syncthing (not sure if it's informative):
|
While I was messing with Wi-Fi connection (switching On and Off), airplane mode, killing syncthing app and connecting adb, app got actually fixed (until next launch), so during one of such healthy-app moments I've exported my configuration. Note that I can't really say under what conditions app becomes temporarily available, and I've failed to get it work somehow predictably :( |
After doing some quick research with earlier releases testing (binary search saved my day) I can say that v1.23.7 works just fine, while v1.24.0-rc.1 contains that bug which prevents syncthing from normally starting. So it's here somewhere :) |
Are you able to verify whether Syncthing itself is actually running? You can do that by opening http://127.0.0.1:8384 in a Web browser on the phone. It it is running, then the problem is about the app, and out of the commits listed above, a088701 seems like the only one that could have broken something, potentially regarding Android 5 compatiblity. |
First of all, I noticed that syncthing in constant starting while files I need to be up-to-date stay untouched for a while, so I think it doesn't work. For now I temporarily use 1.23.7. Is that information enough or should I reinstall broken version to confirm syncthing alone doesn't even get started? |
Hi, same for me: I've just updated Syncthing to 1.27.1.1 (it was an auto-update, I just don't often enable Wi-Fi on my device, so I don't know which version was installed before, but it worked fine before the update – ah, those auto-updates, as often you notice them when something bad happens 😅). I have a similar log as reported above (#2029 (comment)), and similar behavior of infinite "starting" status. I have Android 5.1.1. Checked, works for me: a page "Syncthing Authentification Required" opens, asking to input login and password. But I guess I can not login: what's the login data? I don't remember setting them in the app... However, it seems that under the hood, the sync happens: my other device sees it, and after I add or remove files, that changes are synced seemingly well as usual. So probably it's just a problem in the Android App Wrapper part, while the backend part still works. If you need more info, feel free to ask me.
By the way, if I want to downgrade to an older version, is there a way to preserve my configuration? |
The username is "syncthing" and the password is the API key. You can get the latter from
You can back your settings up from inside the app, and then restore them later. Please keep in mind though that Syncthing's database will still get reset in the process. There are ways to back all the data up (e.g. Neo-Backup) but all of them require root access.
As in the previous postings, if you can find out which version specifically is the last that works and which one is broken, it would be great! |
Turn on airplane mode, so app will show you dialog with Open Settings button, click it, then go back one step, so you now in settings, go to backup Export configuration... At least that worked for me. |
Hack with airplane mode only needed in case app's UI ain't responding |
I am affected by that issue too, I can't use the "airplane mode" hack to export configuration and reinstall, because the item is grayed out in the settings. EDIT: Despite the UI stuck in "loading" state, the files seem to be properly synchronized in the background. |
I've just had time to return here.
I can confirm: same for me. So the question: is there perhaps any way to make the item active and use it?
Yep, as I've mentioned in #2029 (comment), same for me. So for now I use Syncthing on my Android just without UI 😅 |
Android 6.0.1, Nexus 5 |
Android 6.0 LG G4, app v1.27.2.1 On Pixel 5 with GrapheneOS it works fine. |
Anyone affected here able and willing to commit to installing an apk debug build to see if the issue persists when I provide one? There is a change around the time this came up that @tomasz1986 pointed out in #2029 (comment). I could try to revert those changes for android <= 6. I don't see why it would break anything, but it's the only thing that changed so worth a shot (and maybe brake other things in the process, so no promises). However I need someone currently affected to test, otherwise this is futile. |
On my Android 6.0 Samsung Galaxy S5 plus (kccat6) only the Google Play Store version 1.27.2.1 of Syncthing is affected by this problem, but the F-droid version 1.27.2.1 does run without problems. |
That's extra weird - anyone else able to confirm/deny that? Also just so it doesn't get lost:
|
I think I can confirm the issue, but also only on the Play Store version. This is Samsung Galaxy S5 LTE-A running Samsung's stock Android 6.0.1. Syncthing gets stuck at this: Both are the same v1.27.2.1 version. The F-Droid app open and runs with zero issues, but the Play Store one fails to start. One difference I can spot when installing the app is that the F-Droid release weights 47 MB, but the Play Store one is a split APK that weights only 17 MB. The device is rooted, so I can check what exactly gets installed, and this what the Play Store version looks like in the Of course, the culprit may be something completely different 🙃. |
Seems i found regression 3efe3ce 1.23.7/builder 1.23.7 - ok 1.23.7/builder 1.24.0-rc.1 - fail |
Just to be doubly sure: The second version on each line is the version of the builder docker image, right? That's consistent with f-droid working: They still build with go 1.20. On the other hand it conflicts with reports above that the web UI is accessible, i.e. syncthing itself is running - the go version impacts syncthing, not the app itself. At least not directly, one thinkable culprit: New hardening/requirements in go's tls std lib that the old androids don't support? I wouldn't have guesses that it uses tls for the API but maybe it does - wont check right now, gotta catch a bit of sun right now and actually should do other stuff. At least there's a somewhat more promising lead than a088701 Ah they joys of trying to make sense of an issue I can't repro myself :) |
Yes, that's right, I tried different combinations and the problem occurs in Docker Builder 1.24.0-rc.1. |
I think the culprit may not be about Go, because I've just tried installing my self-compiled app v1.27.2.1 with Syncthing built with Go v1.21.5, and it loads just fine. Would logcat from the broken Play Store version be helpful? |
Yeah, as stated above, I'm doing all the testings under Android 6.0.1. For me, only the Play Store version fails to launch for some reason. |
Now I checked the latest version from F-Droid and it works without problems. |
There are roughly 3 different "kinds" of installations/builds: F-Droid - they have their own build process, own go and ndk/sdk version. Our docker build process - that's the apk published on github or that you get when you build locally using our docker builder image. Google play distribution - they do some magic based on the release we provide to give a "targeted apk for each device" (https://developer.android.com/guide/app-bundle). 1.26.3 was already such a bundle, so I don't see how that's the issue but not impossible - it's a blackbox. We know f-droid builds work. Play ones did until 1.26.3. Assuming @Ratio2 did local docker based builds, they worked until builder docker image 1.26.3. I think @tomasz1986 does builds without docker images - apparently they keep working regardless of version. That would point to a change in the builder image being the issue. However nothing but the go version changed there, and that's apparently not an issue given builds with newer go work for @tomasz1986 . As for logs - there are some posted above. Nothing that makes much sense to me. The zipped logs have too many cryptic errors, nothing standing out. And these ones also didn't get me anywhere:
So sure have a look at logs, but if you don't see anything that stands out I doubt I can make more sense of them. Unless I get new info, I don't have any ideas at the moment and am not persuing this further. |
This is about the Go version. I've re-done all my testing, but this time I made sure that I cleared all cache and prebuilt binaries from the app folder, so that both the app and Syncthing were each time compiled from scratch.
We were pointed at 1.23.7...1.24.0-rc.1 before, and among those commits, there is 3efe3ce which is very likely the culprit. However, what is interesting is that Syncthing itself does start in the background, so the problem is about the connection between the app and Syncthing:
Just in case, I'm attaching two logcats - the first from the working package built with Go v1.20, and the second, broken one built with Go v1.21. |
In case anyone else is wondering - the go1.21 logcat first starts with go1.20 - 1.21 startup log is at line 2931. And a bit farther down there's something interesting:
It's a bit weird, as there are a bunch more api requests without such a failure - maybe they were just delayed and cut off, as the log ends shortly after. And would be grand to have some more useful context than "Handshake failed" - there's a slim chance this will do it, could you try that out please and provide logs again: #2046 This are a lot of tls changes in go1.21, but only one (intended) behaviour change to my understanding: New session tickets on resumption where supported. I wont pretend I know what that entails, however it doesn't seem like anything that should cause breakage. So yeah, nothing obvious. |
Oops, sorry about that. I did Here is the newest logcat with #2046: |
Thanks, quite a bit more to be seen there:
There's TLSv1 and SSL3 mentioned in there, all too old. That would be a reasonable explanation, except that's been too old for a long time, not since go1.21. So yeah, still no clue but now it seems pretty clear it's the TLS connection. So we could just make that plain http for android <=6 as a workaround. |
i didn't read the full thread, but maybe this SO answer contains relevant info? i.e. either disabling certain protocols or installing new security providers through play services |
It's really unclear: I was just able to use Syncthing 1.27.1.1 from Google Play on my Android 5.1.1 device. As I mentioned, it usually shows me an infinite loading but still works (syncs) under the hood. But this time, it loaded, the UI showed my folder and devices well, along with statuses. I immediately backed up the config, as suggested in the issue above :) Then I tried to restart Syncthing to check, and there is the same infinite loading multiple times in a row, looks like I can't reproduce the working state anymore. I think I deactivated Airplane Mode (and therefore activated Wi-Fi) along with that successful start. But I tried to do the same and it didn't help anymore. Interesting how it happened. Is there a race maybe?.. |
I've come to this rather late, maybe to throw a spanner in the works or maybe to shed some light. I have this (apparently) same problem on my Android tablet (6.0.1). However, Syncthing was installed from F-Droid and always has been. Also my version is later than those mentioned so far, 1.27.6. I can't be sure whether this problem started with this version or an earlier one, there were only 6 days between the release of 1.27.5 and 1.27.6 on F-Droid. Despite the failure to load properly the syncing is working fine. I attach the initial log file and one from much later in the same session, I hope someone will find this helpful. |
Maybe related to my issue discovered on syncthing-fork? I haven't verified on the official version though, maybe someone affected can test – assuming the environment variables are configurable here too. |
This is interesting. It would be a way to work around the certificate problem without root access. This would even be more useful as in the upcoming Syncthing version discovery is also going to be broken without valid certificates (see syncthing/syncthing@718b1ce). |
See syncthing/syncthing#9673 (comment) @calmh i think we can avoid a bunch of support threads this way |
I'd put a week's income on it being the same issue. My solution was to buy a new tablet 🤣. Seriously though, the old one needed updating. However, it would be useful to dust it off and keep it as a spare so I'm charging it and I'll give your solution a try. However, when I tried http://127.0.0.1:8384/ on the NEW tablet to check if the Debug menu was available through the browser GUI I was asked for a username and password. I've never set one so I assume there is a default on Android, there's certainly nothing on my Windows Syncthing. Can anyone help please? |
This question should have really been asked on the forum, as it's not related with the issue at hand, but the default username on Android is |
Thanks, and apologies for posting the Q here but it seemed appropriate given the discussion here and that I was going to try the fix. Next Q is how do I find the Syncthing app settings if the app wrapper/GUI won't start? Are they available somewhere else? |
Ah sorry, I'm not talking about the Web UI here, this is a menu item in the Android wrapper, but I'm not sure whether it was added by the fork. If so, I don't think there's an easy way to test it with vanilla syncthing-android without building a new apk. It's at Settings -> Troubleshooting -> Environment Variables. But as said in the linked issue, I don't really understand why this would even fix the issue at hand, because the certificate used by the web interface is a self-signed one anyways. Maybe I accidentally changed something else during debugging. But if this really works I'm dying for an explanation. :) |
Normally, you can export them from inside the app using the backup function. If both the Web GUI and the app doesn't load, then the only way to access them is with root.
You can set environment variables in the official app too. |
Thanks Simon. On the new tablet I've got Settings-> Debug -> Environment variables where I seem to be able to add them. It remains to be seen if I can access this on the Android 6 tablet, once it's charged I'll have a go and report back here. |
Unfortunately the menu is inaccessible in the official app until the GUI has loaded properly so it's not possible to test this method on an already broken installation..... unless there's another way of adding environment variables which doesn't involve this menu or localhost access? |
I've recently noticed, that syncthing is always "Syncthing is starting", instead of actually do something useful,
so I force-closed the app and re-open it, but GUI only shows Loading... and ignores any interactions.
In 1.27.0 it also suggests to see logs after a while, but logs contains only one line "begin of main" (so only adb logcat here).
In 1.27.1 it just stays empty, ignoring all clicks (can't open side panel, or add something)
This bug also happens at least on one version below 1.27.0, and I can't say when it started (because of google play auto updates).
Android version 5.0 (Lollipop) API 21
I've used this app before without any problems. Then something has changed (auto update also may happen).
UPD: Changes between 1.23.7 -> 1.24.0-rc
Version Information
The text was updated successfully, but these errors were encountered: