App is running in the background, and phone is connected to wifi. I look at its persistent notification and it appears to be running, as expected. However, from other devices the phone shows offline. Upon opening the Android app, the UI is missing the expected information - it’s mostly blank, like it’s halfway loaded. Web interface returns “Connection refused”.
Workaround: restart Syncthing. This always works.
It happens quite often, but it’s not simple to reproduce. I figured out that I can keep it from happening by frequently opening the app. It’s more likely to crash if I leave the app running in the background (idle) for a full day or more. Funny, it feels like it slips into a deep sleep state. Maybe it’s a power saving issue?
Technical info:
Syncthing version: v1.27.1
Android app version: v1.27.1.1 (Play Store)
Android version: 12
Device: Nokia 5.4 (arm64)
Errata:
The video was recorded on version v1.27.1-rc.1. It updated recently and I have yet to confirm it can be reproduced in the newer version.
I’m assuming that you’ve done the basics like excluding the app from battery optimisation, etc., which applies to all Android devices and isn’t manufacturer-specific. Also, there’s an option in the app settings to “run in foreground”. You may want to try enabling that and see whether it helps.
Devices running Android One tend to have more budget-friendly hardware, so perhaps it’s not battery but rather system resource optimization. (I have a Motorola phone running Android One that was released just about a year after the Nokia 5.4.)
Try shutting down some of the other background apps to see if it improves things for Syncthing.