Nextcloud desktop - zero file size on storage crash (I/O error) got synced to server

Nextcloud Desktop AppImage: 3.13.2
Operating system : Kubuntu 24.04 x86_64
(Server Nextcloud AIO: Nextcloud Hub 8 (29.0.2))

The issue you are facing:

After cca 3 crashes of the Kubuntu OS due to disk I/O errors, there were remaining zero length files on desktop storage, which got synced to Nextcloud server effectively overwriting the correct files with empty files without leaving a trace in file version/history.

P.S. I run Kubuntu on external storage (AXAGON NVME&SATA M.2 enclosure) plugged in via USB 3. On very high write load, it occassionally leads to I/O errors - either hw and sw failure.

Is this the first time you’ve seen this error? (Y/N): Yes

Steps to replicate it:

  1. Setup a new Nextcloud Desktop Sync and start syncing (my case: 48 thousand files, cca 600 GB, LAN speed 50 - 100 MBps).
  2. Wait for or force I/O error on storage on the computer leading to complete “freeze” of the GUI and OS.
  3. Force reboot (long press “power button”), login to desktop user session and let Nextcloud continue syncing.
  4. At the end of sync, Nextcloud may display info about duplicates (I had 72 files on desktop, which had zero size) and ask for a conflict resolution. I chose “keep server version” and those files got recovered from server as expected.

However, the step 4 did not cover all situations where there was a conflict between desktop and server versions.

Desktop versions of 0 B size files were uploaded to server, yet as per Files app in Nextcloud web interface there was a clear inconsistency between actual file size and the file history:

  • The displayed file size was 0 B.
  • The Details tab there was no change (Current version: 3 days ago: 462 B).
  • When I tried to ⋯/Download the Current version, the downloaded file had 0 B size.

Note that the corrupted desktop 0 B size files had the original file modification date.


On desktop PC, I have

  • made a list of empty files find . -size 0
  • mounted borg backup (AIO daily backup).
  • checked & copied every file whose size changed to 0 B.

It could have been scripted, yet as i had only about 40 files, I have done it manually.


Although problem happened after abrupt termination of sync process due to storage failure, it seems me to be a bug of Nextcloud Desktop Client. Is this a known issue/reported bug?