standardnotes / mobile

[Moved to https://github.com/standardnotes/app] Standard Notes for iOS and Android - https://standardnotes.com
GNU Affero General Public License v3.0
830 stars 111 forks source link

If connection is bad synchronization priority is incorrect #167

Open Fohroer opened 5 years ago

Fohroer commented 5 years ago

Android 9 PIE Resurrection Remix Xiaomi Redmi 5 A. Premium version. This all also was on Android 7. If connection is bad SN can overwrite new note which was written offline. This bug is rare.

Expected behaviour: On bad connection don't even try to perform sync.

Behaviour observed instead: Synching is performed on any connection which leads to duplicates inside notes, partial out of sync, conflicted copy notes and sometimes to overwrites with earlier version from the server.

moughxyz commented 5 years ago

Can you talk more about the overwrite behavior you observed, and perhaps provide replication steps?

Fohroer commented 5 years ago

Can you talk more about the overwrite behavior you observed, and perhaps provide replication steps?

Don't know how to describe it better. Maybe you'll understand. When you travel around the city you can sometimes fall into zones when mobile signal is enough to make calls but internet is unstable. You can't load search page with such connection. And so SN can't perform sync correctly. You can gain connection errors in almost any application when you have such connection. Telegram will show that message is in send process. But there goes the diffrerence: Telegram tries to have the same chats data as user have on his phone. SN made sync which app described for itself as correct and when you then receive normal connection it checks again: and so appears note duplicates. Or hash is different (or how in checks consistensy) and I'm partially out of sync. Possible workaround is to add option for sync only on Wi-fi. Maybe it's also possible to check connection stability before making sync when on mobile internet?

balance-wtf commented 5 years ago

Oh yes! I've also had that many times, don't know how to explain it better tho.