Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Empty files blocks sync activity. #4157

Closed
koppd opened this issue Jan 8, 2022 · 13 comments
Closed

Empty files blocks sync activity. #4157

koppd opened this issue Jan 8, 2022 · 13 comments

Comments

@koppd
Copy link

koppd commented Jan 8, 2022

How to use GitHub

  • Please use the 👍 reaction to show that you are affected by the same issue.
  • Please don't comment if you have no relevant information to add. It's just extra noise for everyone subscribed to this issue.
  • Subscribe to receive notifications on status change and new comments.

Expected behaviour

Empty files are synced.

Actual behaviour

Empty files are not synced and furthermore blocks syncing of other files as well.
(as soon as the empty file contain at least one byte -> syncing works great again!)

Steps to reproduce

  1. Windows client 3.4.1: Create emtpy file
  2. Wait for sync or force sync
  3. There are errors in the server logs. (And files ar not synced)

Client configuration

Client version:
3.4.1

Operating system:
Win 10

OS language:
German

Installation path of client:

Virtual files are activated. (And bulk upload as well, because server has > v23.0.0

Server configuration

Nextcloud version:
v23.0.1 RC1
Storage backend (external storage):

Logs

Please use Gist (https://gist.github.com/) or a similar code paster for longer
logs.

  1. Client logfile:
    Since 3.1: Under the "General" settings, you can click on "Create Debug Archive ..." to pick the location of where the desktop client will export the logs and the database to a zip file.
    On previous releases: Via the command line: nextcloud --logdebug --logwindow or nextcloud --logdebug --logfile log.txt
    (See also https://docs.nextcloud.com/desktop/3.0/troubleshooting.html#log-files)

  2. Web server error log:
    nclog.txt

  3. Server logfile: nextcloud log (data/nextcloud.log):
    Server_empty_files.txt

The file "Datei mit Inhalt.txt" has content and has been created first.
Then the empty file "datei ohne Inhalt.txt" second.
The third file "Datei mit Inhalt - Kopie" (with content) was created last. Only the first files has been synced.

@koppd koppd added the bug label Jan 8, 2022
@koppd koppd changed the title Emtpy files blocks sync activity. Empty files blocks sync activity. Jan 8, 2022
@koppd
Copy link
Author

koppd commented Jan 9, 2022

And here the client log file:
emtpy.zip

@claell
Copy link

claell commented Jan 18, 2022

@koppd Do you know whether this worked before with older client versions? It might also be interesting to see whether virtual files and/or bulk upload play a role in this.

@koppd
Copy link
Author

koppd commented Jan 20, 2022

To be more precise: The synchronizations stops only for the folder which contains new empty files. Other folders are synchronized. In other words: The sync stop for any folder which contains empty files.

And to answer your question:
For version 3.4.1 the bug exists both both cases: with enabled Virtual Files as well as with disabled Virtual Files.
Downgrade to version 3.3.6 (with virtual files) doesn't show the bug.
From my point of view I would say it has something to do with the new bulk upload feature.

@Murgeye
Copy link

Murgeye commented Jan 24, 2022

I can confirm this issue on 3.4.1. As soon as there is an empty file in a directory, Nextcloud stops syncing. Noticed this because it broke my KeePass Database syncing, as KeePassXC stores temporary 0 byte files in the directory of the database. As soon as I disable this and delete any 0 byte files, syncing resumes.

@claell
Copy link

claell commented Jan 24, 2022

Thanks for the update!

Ping @mgallien @allexzander

@Razza2018
Copy link

Razza2018 commented Jan 26, 2022

I'm on version 3.4.1 (Windows 10) and this issue is happening to me as well.

As soon as an empty file (in my case a .txt file) is in a directory, that file and all other files in the directory doesn't sync.

This is happening whether or not virtual file support is on.

I think empty files should still be synced between devices.

@claell
Copy link

claell commented Jan 31, 2022

Adding the approved label, since three people see this reproducible.

@claell claell added the confirmed bug approved by the team label Jan 31, 2022
@ztiziano
Copy link

Hi everyone,

I'm wondering if there are any news on this topic, since I'm having the same issue on my setup as well, 0-byte files don't synchronize properly.

Nextcloud Server: 23.0.0 / 23.0.1 (tested both versions)
Nextcloud Client: 3.4.1 / 3.4.2 (tested both versions on Windows 10)

I noticed the sync issue is one-way, namely 0-byte files created locally (on local host with NC client installed) won't sync to the server, and even worst those files freeze the NC client's synchronization process. The other way around, 0-byte files on the server, are consistently synchronized down (this scenario is easily tested with external storage mounts or by using the workaround described at the bottom).

The 0-byte issue exists both with native storage managed by NC server, or with mounted storages (through external storage. In this case I only tested SMB shares).

To note is that 0-byte files synchronized down from the server to the local host will then be properly handled by the NC client. For example renaming locally one of those files results in a correct synchronization back to the server, even though the file's size is still 0-byte.

Every time the NC client attempts to synchronize a 0-byte file the following Fatal Message for the App webdav is triggered "Sabre\DAV\Exception: Unknown error while seeking content" (see attachment for details).

A workaround to this issue is using an older version of the NC client, as already suggested by many (thank you guys). I'm currently using version 3.3.6 and it works just fine with 0-byte files, even though I'm not benefiting of the newest features Nextcloud 23 is offering...

I gladly provide any information you might need to fix this issue, and I take this opportunity to thank the Nextcloud dev team for their wonderful job!

Cheers,
happy user since 2019

Fatal_Webdav_SabreDAVException.txt

@ztiziano
Copy link

This bug seems to be FIXED with the new server version of Nextcloud 23.0.2.

I tested using Nextcloud client 3.4.2 and it promptly synchronizes 0-byte files with the server.

Cheers,
Tiziano

@koppd
Copy link
Author

koppd commented Aug 31, 2022

This bug seems to be FIXED with the new server version of Nextcloud 23.0.2.

Well, this bug isn't really fixed.
The bulk upload (which triggers this error) has been disabled. nextcloud/server@58cec19
If you manually re-enable the bulk upload, this error will be triggered again.

@plantroon
Copy link

Uploading an empty file still triggers errors. The file is uploaded to the server, but an error is shown (that I can't view because it disappears immediately on Windows).

Same as the above disabling bulk upload makes it stop showing the error. This bug is reintroduced every time somebody changes the default for this option.

It scared me a little because for a while I thought Nextcloud zeroed out my files. That did not happen luckily, they were empty all along.

NC Desktop 3.7.1, NC Server 25.0.4

(might be similar to issue #5035)

@koppd
Copy link
Author

koppd commented Sep 16, 2023

fixed by #5871
tested with release 3.10.0

@PhilippSchlesinger
Copy link

@koppd:
👍 so you could close the issue yorself

@koppd koppd closed this as completed Sep 16, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

7 participants