nextcloud / notes-android

✎ Android client for Nextcloud Notes app.
https://play.google.com/store/apps/details?id=it.niedermann.owncloud.notes
GNU General Public License v3.0
923 stars 134 forks source link

Conflict resolution failing, newer server changes overwritten #1846

Closed cheywood closed 2 days ago

cheywood commented 1 year ago

Describe the bug

There's something wrong with the usage of the conflict detection elements of the API. It's possible to lose content that's already been updated on the server through the Android app overwriting those changes.

To Reproduce Steps to reproduce the behavior:

  1. Create a note using the web app
  2. Ensure that note gets synced to the Android app
  3. Enable Airplane Mode on the phone
  4. Make an addition to the note in the web app
  5. Make an addition to the note in the Android app
  6. Disable Airplane Mode on the phone and allow sync to complete
  7. Reload the note in the web app and see that the edits made in step 4 have been overwritten

I think I swiped away the app and restarted between steps 5 and 6 but I'm not sure that matters. I've been seeing this for some time.

Expected behavior

It shouldn't be possible to blindly overwrite changes on the server with local content. There should be a sync conflict which is handled. The API works as expected.

Smartphone (please complete the following information):

Server

SeanDS commented 1 year ago

I've had this issue as well for a long time and I've lost data this way several times. I just had it again today on notes 4.8.1 and notes-android 4.1.0 RC1.

cheywood commented 11 months ago

Still seeing issue with v4.1.0 running against Notes 4.8.1 on a 27.0.2 instance

calidancer commented 5 months ago

Hi Team, This issue is still happening. Lately I have the impression that a lot of complains for issues or feature requests remain unheard and completely ignored. I'm sure you are busy dealing with more important stuff, however this issue is not to be ignored. It's been 6 months since the last comment above and not even an acknowledgment is made. If you guys behave like that, your solution will loose credibility.

This is a small list of issues / feature requests still open for a long time and unresolved:

Can you please fix this issue with Nextcloud Notes?

Thanks.

jancborchardt commented 2 days ago

FYI @juliushaertl @stefan-niedermann since it’s a data loss issue.

@calidancer just to be clear – Nextcloud is an open source community project, everyone is very welcome to contribute. :)

jancborchardt commented 2 days ago

Or @tobiasKaminsky is this something for clients?

stefan-niedermann commented 2 days ago

Basically a duplicate of https://github.com/nextcloud/notes-android/issues/161

I'd recommend to close this in favor of the original issue. The title of #161 suggest to prevent editing, but it's actually a possible intermediate step to an actual conflict resolution.

"Last change wins" has been the mode since existence of the Notes app, actual conflict resolution is a huge amount of work h korelstar actually put quite some time in analysing what would need to be done - https://github.com/nextcloud/notes-android/issues/161#issuecomment-444443403

jancborchardt commented 2 days ago

Thanks for the explanation @stefan-niedermann! Closing this in favor of https://github.com/nextcloud/notes-android/issues/161 then as you said. :)