syncthing/syncthing-android

"Run on specified Wi-Fi networks" gives specious error on app opening

Closed this issue · 5 comments

I use the run on specified wi-fi networks setting. Every time I open the app, regardless of what wi-fi network I'm connected to, I get the following error:

Screenshot_20240311-092852

Assuming I'm on a whitelisted wi-fi network, I can make the error go away by tapping "Change Settings" then going back twice (without changing any settings). Sometimes it requires me to do this twice.

While this is obviously not an app-breaking bug, it's certainly quite annoying. Please let me know if I can provide any additional information for debugging.

Version Information

App Version: 1.27.3
Syncthing Version: v1.27.3
Android Version: Android 14 (Google Pixel 6)

Screenshot_20240311-093614

I think this is due to lacking permissions. Wifi network names are considered location information, so syncthing needs location permissions to be able to read wifi network names.

And make sure to allow location access "all the time", not only "while in use".

I had already allowed location access, but only "while in use". I've changed to "all the time" and will see if that eliminates the problem.

If it does, maybe it might be worth either adding a different error message when the problem is denial of access or adding text to the setting warning that it requires location access "all the time" instead of "while in use".

To elaborate on my prior message, while I know that the error raises the possibility of restricted location permissions, I immediately assumed that couldn't be the issue because I knew I'd granted location permissions.

Yeah, so the solution is basically described in #1960 (comment). The app should require and ask to access location "all the time", as it is necessary when using these features, but currently it only asks to use location when active (i.e. open with screen turned on). In your case, this leads to the app being unable to detect the current network, and thus it stops Syncthing from running.

Closing as duplicate of #1960.