etesync / android

EteSync - Secure, end-to-end encrypted, and privacy respecting sync for your contacts, calendars and tasks.
https://www.etesync.com
GNU General Public License v3.0
305 stars 34 forks source link

Nothing happens if the server goes offline #156

Open marmistrz opened 3 years ago

marmistrz commented 3 years ago

Hi,

I hosted my own instance of Etesync on my VPS, using the server-skeleton commit 8323f23561fcd58ec2f601f230f4cc4c61202533. The server was accessible under etesync.my-domain.com. On my Android phone I'm using Etesync 2.1.5.

Recently I decided to change the VPS provider. I didn't migrate the domain yet, so any connections to etesync.my-domain.com will time out. However, the Etesync Android app doesn't report any error.

Expected behavior: the app should report to the user that the server is unreachable and that the synchronization failed.

tasn commented 3 years ago

Thanks for reporting!

Hm... It looks like you are right, and I guess I know what's going on: The mobile environment is very unreliable - disconnects, temporary reachability issues and etc are very common. So the code ignores these as they are almost always just temporary issues. What the code should be doing though, and that doesn't seem to be working is: ignore the error for the first X time it happens, though after X times, show an error about it. This definitely needs to be fixed!

marmistrz commented 3 years ago

I'm wondering if it wouldn't be a better option to always report the issues. Imagine that you add a contact, a sync is triggered but fails and then you factory reset your device... and to your surprise the contact you added is lost. On modern Android versions you can always mute the notification channel and it's better than silent failure.

tasn commented 3 years ago

Yeah, what should happen is that it should report after X consecutive failures (as long as there's an internet connection). Mute the notification channel: it means people will miss other errors too.

marmistrz commented 3 years ago

Did you really experience a lot of spurious failures in a mobile environment or is it just a hypothetical scenario?

tasn commented 3 years ago

This change was in response to a ton of error reports and complaints from users, and annoyance on my end too. You go on a train? It'll fail. Wifi is out for a sec, it'll fail. Hiking? It'll fail.

marmistrz commented 3 years ago

For reference: DAVx5 for Android shows a silent notification if the server is unavailable.

Mute the notification channel: it means people will miss other errors too.

We can have a separate notification channel for connectivity errors.

This change was in response to a ton of error reports and complaints from users, and annoyance on my end too. You go on a train? It'll fail. Wifi is out for a sec, it'll fail. Hiking? It'll fail.

I migrated to DAVx5, so I'll see if I'll encounter such annoyances with DAVx5.

tasn commented 3 years ago

Cool, please report back!