Broken webserver returning empty content length for non-empty file on resume

Nextcloud version (eg, 20.0.5): 21.0.1
Operating system and version (eg, Ubuntu 20.04): Linux 5.4.0-72-generic #80-Ubuntu
Apache or nginx version (eg, Apache 2.4.25): Apache (fpm-fcgi)
PHP version (eg, 7.4): 7.4.14
DB: mysql 10.5.8

The issue you are facing:

Somehow, my NextCloud storage got corrupted. Thus I got the data back from my local time-machine backup. Now I have a lot of sync errors:
“Broken webserver returning empty content length for non-empty file on resume”

I found Repair script for encrypted files that were not marked as encrypted + wrong size · Issue #18225 · owncloud/core · GitHub - however, the repair-script does not work for me. Any ideas?

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

Steps to replicate it:

? It appears after each sync trial

The output of your Nextcloud log in Admin > Logging:
Log-file-size today: 51395439559 ( I just cleaned it)
Interesting lines:

Debug encryption /appinfo/app.php is deprecated, use \OCP\AppFramework\Bootstrap\IBootstrap on the application class instead.

Also, I disabled the encryption signature check due to many errors.

The output of your config.php file in /path/to/nextcloud (make sure you remove any identifiable information!):

{
“instanceid”: “REMOVED SENSITIVE VALUE”,
“passwordsalt”: “REMOVED SENSITIVE VALUE”,
“secret”: “REMOVED SENSITIVE VALUE”,
“trusted_domains”: [
REMOVED SENSITIVE VALUE
],
“datadirectory”: “REMOVED SENSITIVE VALUE”,
“overwrite.cli.url”: “REMOVED SENSITIVE VALUE”,
“overwriteprotocol”: “https”,
“dbtype”: “mysql”,
“version”: “21.0.1.1”,
“dbname”: “REMOVED SENSITIVE VALUE”,
“dbhost”: “REMOVED SENSITIVE VALUE”,
“dbtableprefix”: “a50P1_”,
“dbuser”: “REMOVED SENSITIVE VALUE”,
“dbpassword”: “REMOVED SENSITIVE VALUE”,
“debug”: false,
“logtimezone”: “Europe/Berlin”,
“installed”: true,
“tempdirectory”: “REMOVED SENSITIVE VALUE”,
“mail_from_address”: “REMOVED SENSITIVE VALUE”,
“mail_smtpmode”: “smtp”,
“mail_domain”: “REMOVED SENSITIVE VALUE”,
“theme”: “”,
“loglevel”: 0,
“log_rotate_size”: 104857600,
“maintenance”: false,
“data-fingerprint”: “REMOVED SENSITIVE VALUE”,
“files_external_allow_create_new_local”: “true”,
“singleuser”: false,
“updater.release.channel”: “stable”,
“updater.secret”: “REMOVED SENSITIVE VALUE”,
“mail_smtpauthtype”: “LOGIN”,
“mail_smtphost”: “REMOVED SENSITIVE VALUE”,
“mail_smtpauth”: 1,
“mail_smtpname”: “REMOVED SENSITIVE VALUE”,
“mail_smtppassword”: “REMOVED SENSITIVE VALUE”,
“mail_smtpport”: “587”,
“mysql.utf8mb4”: true,
“trashbin_retention_obligation”: “auto, 30”,
“encryption.legacy_format_support”: false,
“encryption.key_storage_migrated”: false,
“encryption_skip_signature_check”: true,
“default_phone_region”: “AT”
}

Cheers,
Ralph

Has this one ever been solved?
I have the same error message and wonder how to repair it.
Thank you, Yann

Hi everyone, I’ve got the same error on a nextcloud server v25.0.5. and client version 3.9.0.

I recently configured this client from scratch and it appears that I have hundreds of corrupted files reporting this error on sync action.

On the other clients that I already have configured, these errors do not appear, files are already present on local computers and not corrupted (they open and display properly).

For example when I try to open PDF files reported “Broken webserver returning empty content length for non-empty file on resume” on the web interface they are not displaying and an error message (Load Failed).

I found a way that consists in updating server files from clients that have the not corrupted ones. But each time I configure a new computer from scratch I get another bunch of corrupted files.

I just don’t know how to fix that up…

Any clue ?
Thanks :slight_smile: