nextcloud / desktop

💻 Desktop sync client for Nextcloud
https://nextcloud.com/install/#install-clients
GNU General Public License v2.0
3.05k stars 799 forks source link

Server error 502 causes conflicts (reproducible) #3008 #3236

Open 64kramsystem opened 3 years ago

64kramsystem commented 3 years ago

How to use GitHub

Expected behaviour

If the server sends a 502 (Bad gateway) because of issues, while the user is changing some files content, the desktop client should not generate any conflict when the client successfully connects again to the server.

Actual behaviour

What happens (I've reproduced this problem several times) is that when the client connects back to the server (say, because the server is online again), a conflict is generated, between the current version of the file, and the previous one.

I suppose that what's happening is that (speculation on my part):

Steps to reproduce

  1. make the server send 502s to the client (I guess via overload)
  2. edit the file
  3. wait for the server to come back online
  4. conflict!

Client configuration

Client version: 3.1.3 Operating system: Ubuntu OS language: Eglish Qt version used by client package (Linux only, see also Settings dialog): I can't find it in the settings, but the dependent package libqt5gui5 has version 5.12.8+dfsg-0ubuntu1. Client package (From Nextcloud or distro) (Linux only): nextcloud-desktop 3.1.3-20210218.151938.3842d306f-1.0~focal1. Installation path of client: /usr/bin/nextcloud

Server configuration

Nextcloud version:

Storage backend (external storage):

Logs

Logs extraction, anonymized: wrong_conflict_on_504.anon.zip

github-actions[bot] commented 3 years ago

This bug report did not receive an update in the last 4 weeks. Please take a look again and update the issue with new details, otherwise the issue will be automatically closed in 2 weeks. Thank you!

64kramsystem commented 3 years ago

All the details provided are above.

n-e-y-s commented 2 years ago

Maybe the root cause is related to https://github.com/nextcloud/desktop/issues/2483

The client might take the 502 answer for the new content of the file and then the conflict while editing the file is justified. (The client should always check for any errors in server answers and prevent file corruption in any case.)

64kramsystem commented 2 years ago

Maybe the root cause is related to #2483

The client might take the 502 answer for the new content of the file and then the conflict while editing the file is justified. (The client should always check for any errors in server answers and prevent file corruption in any case.)

Thanks for following up, but I've long dumped Nextcloud. Maestral+Dropbox doesn't have such (serious) bugs. Autoclosing this issue has also been an extremely questionable practice.