android icon indicating copy to clipboard operation
android copied to clipboard

Nothing happens if the server goes offline

Open marmistrz opened this issue 5 years ago • 7 comments

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.

marmistrz avatar Nov 29 '20 14:11 marmistrz

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!

tasn avatar Nov 29 '20 14:11 tasn

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.

marmistrz avatar Mar 18 '21 13:03 marmistrz

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.

tasn avatar Mar 18 '21 13:03 tasn

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

marmistrz avatar Mar 18 '21 14:03 marmistrz

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.

tasn avatar Mar 18 '21 14:03 tasn

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.

marmistrz avatar Apr 13 '21 11:04 marmistrz

Cool, please report back!

tasn avatar Apr 14 '21 12:04 tasn