Scanupload via Webdav results in empty files

Support intro

Sorry to hear you’re facing problems :slightly_frowning_face:

help.nextcloud.com is for home/non-enterprise users. If you’re running a business, paid support can be accessed via portal.nextcloud.com where we can ensure your business keeps running smoothly.

In order to help you as quickly as possible, before clicking Create Topic please provide as much of the below as you can. Feel free to use a pastebin service for logs, otherwise either indent short log examples with four spaces:

example

Or for longer, use three backticks above and below the code snippet:

longer
example
here

Some or all of the below information will be requested if it isn’t supplied; for fastest response please provide as much as you can :heart:

Nextcloud version (eg, 20.0.5): 26.0.2
Operating system and version (eg, Ubuntu 20.04): Debian 10
Apache or nginx version (eg, Apache 2.4.25): nginx
PHP version (eg, 7.4): 8.1.18

The issue you are facing:
I have a Canon Imagepress iPR C165.
I would like to Scan directly to my Nextcloud. Best solution seemed to be using WebDAV (which is supported by the printer.

I think I managed to split the Webdav URL. The printer connects to my cloud and finishes the job (according to the log). On my nextcloud a new file gets created (in the correct folder)- but it hast 0KB.

My original URL looks like this:
https://cloud.example.de/remote.php/dav/files/Imagepress

I did split like this:
Hostname: https://cloud.example.de/
Folder: remote.php/dav/files/Imagepress/Imagepress-Upload/
User: Imagepress
PW: $password

Using Windows Webdav everything is working correctly.

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

Steps to replicate it:

  1. Add Webdav URL
  2. Scan something
  3. Check result

The output of your Nextcloud log in Admin > Logging:

PASTE HERE

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

root@cloud:/Nextcloud-Daten# cat /var/www/nextcloud/config/config.php
<?php
$CONFIG = array (
  'passwordsalt' => XXX
  'secret' => XXX
  'trusted_domains' => 
  array (
    0 => 'cloud.example.de',
  ),
  'datadirectory' => '/Nextcloud-Daten/',
  'dbtype' => 'mysql',
  'version' => '26.0.2.1',
  'overwrite.cli.url' => 'https://cloud',
  'dbname' => 'nextcloud',
  'dbhost' => 'localhost',
  'dbport' => '',
  'dbtableprefix' => 'oc_',
  'mysql.utf8mb4' => true,
  'dbuser' => 'nextcloud',
  'dbpassword' => 'nextcloud',
  'installed' => true,
  'instanceid' => 'XXXX',
  'activity_expire_days' => 14,
  'auth.bruteforce.protection.enabled' => true,
  'blacklisted_files' => 
  array (
    0 => '.htaccess',
    1 => 'Thumbs.db',
    2 => 'thumbs.db',
  ),
  'cron_log' => true,
  'enable_previews' => true,
  'enabledPreviewProviders' => 
  array (
    0 => 'OC\\Preview\\PNG',
    1 => 'OC\\Preview\\JPEG',
    2 => 'OC\\Preview\\GIF',
    3 => 'OC\\Preview\\BMP',
    4 => 'OC\\Preview\\XBitmap',
    5 => 'OC\\Preview\\Movie',
    6 => 'OC\\Preview\\PDF',
    7 => 'OC\\Preview\\MP3',
    8 => 'OC\\Preview\\TXT',
    9 => 'OC\\Preview\\MarkDown',
    10 => 'OC\\Preview\\HEIC',
  ),
  'filesystem_check_changes' => 0,
  'filelocking.enabled' => 'true',
  'htaccess.RewriteBase' => '/',
  'integrity.check.disabled' => false,
  'knowledgebaseenabled' => false,
  'log_rotate_size' => 104857600,
  'logfile' => '/Nextcloud-Daten//nextcloud.log',
  'logtimezone' => 'Europe/Berlin',
  'memcache.local' => '\\OC\\Memcache\\APCu',
  'memcache.locking' => '\\OC\\Memcache\\Redis',
  'preview_max_x' => 1024,
  'preview_max_y' => 768,
  'preview_max_scale_factor' => 1,
  'redis' => 
  array (
    'host' => '/var/run/redis/redis-server.sock',
    'port' => 0,
    'timeout' => 0.0,
  ),
  'quota_include_external_storage' => false,
  'share_folder' => '/Shares',
  'skeletondirectory' => '',
  'trashbin_retention_obligation' => 'auto, 7',
  'mail_from_address' => 'cloud',
  'mail_smtpmode' => 'smtp',
  'mail_sendmailmode' => 'smtp',
  'mail_domain' => 'X',
  'mail_smtpauth' => 1,
  'mail_smtpauthtype' => 'PLAIN',
  'mail_smtphost' => 'mail.X.eu',
  'mail_smtpport' => '587',
  'mail_smtpname' => 'X',
  'mail_smtppassword' => 'X',
  'mail_smtpsecure' => 'tls',
  'maintenance' => false,
  'loglevel' => 0,
  'updater.release.channel' => 'stable',
  'theme' => '',
  'default_phone_region' => 'DE',
  'app_install_overwrite' => 
  array (
    0 => 'cookbook',
    1 => 'imageconverter',
  ),
);

The output of your Apache/nginx/system log in /var/log/____:

XXX - - [19/Jun/2023:11:02:45 +0000] "PUT /remote.php/dav/files/Imagepress/Imagepress-Upload/20230619130509.pdf HTTP/1.1" 401 569 "-" "UniversalSend_Unicode_WebDAV/1.0"
XXX - Imagepress [19/Jun/2023:11:02:47 +0000] "PUT /remote.php/dav/files/Imagepress/Imagepress-Upload/20230619130509.pdf HTTP/1.1" 201 0 "-" "UniversalSend_Unicode_WebDAV/1.0"
XXX - Imagepress [19/Jun/2023:11:02:49 +0000] "PUT /remote.php/dav/files/Imagepress/Imagepress-Upload/20230619130509.pdf HTTP/1.1" 204 0 "-" "UniversalSend_Unicode_WebDAV/1.0"

PASTE HERE


Output errors in nextcloud.log in /var/www/ or as admin user in top right menu, filtering for errors. Use a pastebin service if necessary.



root@cloud:/Nextcloud-Daten# tail -f /Nextcloud-Daten/nextcloud.log |grep Imagepress
{"reqId":"c4EtKZ55Na7OOnkQtulM","level":0,"time":"2023-06-19T13:04:57+02:00","remoteAddr":"111.222.333.444","user":"--","app":"webdav","method":"PUT","url":"/remote.php/dav/files/Imagepress/Imagepress-Upload/20230619130721.pdf","message":"No public access to this resource., No 'Authorization: Basic' header found. Either the client didn't send one, or the server is misconfigured, No 'Authorization: Bearer' header found. Either the client didn't send one, or the server is mis-configured, No 'Authorization: Basic' header found. Either the client didn't send one, or the server is misconfigured","userAgent":"UniversalSend_Unicode_WebDAV/1.0","version":"26.0.2.1","exception":{"Exception":"Sabre\\DAV\\Exception\\NotAuthenticated","Message":"No public access to this resource., No 'Authorization: Basic' header found. Either the client didn't send one, or the server is misconfigured, No 'Authorization: Bearer' header found. Either the client didn't send one, or the server is mis-configured, No 'Authorization: Basic' header found. Either the client didn't send one, or the server is misconfigured","Code":0,"Trace":[{"file":"/var/www/nextcloud/3rdparty/sabre/event/lib/WildcardEmitterTrait.php","line":89,"function":"beforeMethod","class":"Sabre\\DAV\\Auth\\Plugin","type":"->"},{"file":"/var/www/nextcloud/3rdparty/sabre/dav/lib/DAV/Server.php","line":456,"function":"emit","class":"Sabre\\DAV\\Server","type":"->"},{"file":"/var/www/nextcloud/3rdparty/sabre/dav/lib/DAV/Server.php","line":253,"function":"invokeMethod","class":"Sabre\\DAV\\Server","type":"->"},{"file":"/var/www/nextcloud/3rdparty/sabre/dav/lib/DAV/Server.php","line":321,"function":"start","class":"Sabre\\DAV\\Server","type":"->"},{"file":"/var/www/nextcloud/apps/dav/lib/Server.php","line":366,"function":"exec","class":"Sabre\\DAV\\Server","type":"->"},{"file":"/var/www/nextcloud/apps/dav/appinfo/v2/remote.php","line":35,"function":"exec","class":"OCA\\DAV\\Server","type":"->"},{"file":"/var/www/nextcloud/remote.php","line":172,"args":["/var/www/nextcloud/apps/dav/appinfo/v2/remote.php"],"function":"require_once"}],"File":"/var/www/nextcloud/3rdparty/sabre/dav/lib/DAV/Auth/Plugin.php","Line":152,"message":"No public access to this resource., No 'Authorization: Basic' header found. Either the client didn't send one, or the server is misconfigured, No 'Authorization: Bearer' header found. Either the client didn't send one, or the server is mis-configured, No 'Authorization: Basic' header found. Either the client didn't send one, or the server is misconfigured","exception":{},"CustomMessage":"No public access to this resource., No 'Authorization: Basic' header found. Either the client didn't send one, or the server is misconfigured, No 'Authorization: Bearer' header found. Either the client didn't send one, or the server is mis-configured, No 'Authorization: Basic' header found. Either the client didn't send one, or the server is misconfigured"}}
{"reqId":"wDkatlanZ44m7tWkhpuU","level":0,"time":"2023-06-19T13:04:57+02:00","remoteAddr":"111.222.333.444","user":"--","app":"no app in context","method":"PUT","url":"/remote.php/dav/files/Imagepress/Imagepress-Upload/20230619130721.pdf","message":"Token is not valid: Token is too short for a generated token, should be the password during basic auth","userAgent":"UniversalSend_Unicode_WebDAV/1.0","version":"26.0.2.1","exception":{"Exception":"OC\\Authentication\\Exceptions\\InvalidTokenException","Message":"Token is too short for a generated token, should be the password during basic auth","Code":0,"Trace":[{"file":"/var/www/nextcloud/lib/private/Authentication/Token/Manager.php","line":132,"function":"getToken","class":"OC\\Authentication\\Token\\PublicKeyTokenProvider","type":"->","args":["*** sensitive parameters replaced ***"]},{"file":"/var/www/nextcloud/lib/private/User/Session.php","line":528,"function":"getToken","class":"OC\\Authentication\\Token\\Manager","type":"->","args":["*** sensitive parameters replaced ***"]},{"file":"/var/www/nextcloud/lib/private/User/Session.php","line":438,"function":"isTokenPassword","class":"OC\\User\\Session","type":"->","args":["*** sensitive parameters replaced ***"]},{"file":"/var/www/nextcloud/apps/dav/lib/Connector/Sabre/Auth.php","line":111,"function":"logClientIn","class":"OC\\User\\Session","type":"->","args":["*** sensitive parameters replaced ***"]},{"file":"/var/www/nextcloud/3rdparty/sabre/dav/lib/DAV/Auth/Backend/AbstractBasic.php","line":103,"function":"validateUserPass","class":"OCA\\DAV\\Connector\\Sabre\\Auth","type":"->","args":["*** sensitive parameters replaced ***"]},{"file":"/var/www/nextcloud/apps/dav/lib/Connector/Sabre/Auth.php","line":226,"function":"check","class":"Sabre\\DAV\\Auth\\Backend\\AbstractBasic","type":"->"},{"file":"/var/www/nextcloud/apps/dav/lib/Connector/Sabre/Auth.php","line":133,"function":"auth","class":"OCA\\DAV\\Connector\\Sabre\\Auth","type":"->"},{"file":"/var/www/nextcloud/3rdparty/sabre/dav/lib/DAV/Auth/Plugin.php","line":180,"function":"check","class":"OCA\\DAV\\Connector\\Sabre\\Auth","type":"->"},{"file":"/var/www/nextcloud/3rdparty/sabre/dav/lib/DAV/Auth/Plugin.php","line":135,"function":"check","class":"Sabre\\DAV\\Auth\\Plugin","type":"->"},{"file":"/var/www/nextcloud/3rdparty/sabre/event/lib/WildcardEmitterTrait.php","line":89,"function":"beforeMethod","class":"Sabre\\DAV\\Auth\\Plugin","type":"->"},{"file":"/var/www/nextcloud/3rdparty/sabre/dav/lib/DAV/Server.php","line":456,"function":"emit","class":"Sabre\\DAV\\Server","type":"->"},{"file":"/var/www/nextcloud/3rdparty/sabre/dav/lib/DAV/Server.php","line":253,"function":"invokeMethod","class":"Sabre\\DAV\\Server","type":"->"},{"file":"/var/www/nextcloud/3rdparty/sabre/dav/lib/DAV/Server.php","line":321,"function":"start","class":"Sabre\\DAV\\Server","type":"->"},{"file":"/var/www/nextcloud/apps/dav/lib/Server.php","line":366,"function":"exec","class":"Sabre\\DAV\\Server","type":"->"},{"file":"/var/www/nextcloud/apps/dav/appinfo/v2/remote.php","line":35,"function":"exec","class":"OCA\\DAV\\Server","type":"->"},{"file":"/var/www/nextcloud/remote.php","line":172,"args":["/var/www/nextcloud/apps/dav/appinfo/v2/remote.php"],"function":"require_once"}],"File":"/var/www/nextcloud/lib/private/Authentication/Token/PublicKeyTokenProvider.php","Line":155,"message":"Token is not valid: Token is too short for a generated token, should be the password during basic auth","exception":{},"CustomMessage":"Token is not valid: Token is too short for a generated token, should be the password during basic auth"}}
{"reqId":"wDkatlanZ44m7tWkhpuU","level":0,"time":"2023-06-19T13:04:58+02:00","remoteAddr":"111.222.333.444","user":"Imagepress","app":"suspicious_login","method":"PUT","url":"/remote.php/dav/files/Imagepress/Imagepress-Upload/20230619130721.pdf","message":"loading latest model","userAgent":"UniversalSend_Unicode_WebDAV/1.0","version":"26.0.2.1","data":{"app":"suspicious_login"}}
{"reqId":"wDkatlanZ44m7tWkhpuU","level":0,"time":"2023-06-19T13:04:58+02:00","remoteAddr":"111.222.333.444","user":"Imagepress","app":"PHP","method":"PUT","url":"/remote.php/dav/files/Imagepress/Imagepress-Upload/20230619130721.pdf","message":"Return type of OCA\\SuspiciousLogin\\Db\\Model::jsonSerialize() should either be compatible with JsonSerializable::jsonSerialize(): mixed, or the #[\\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice at /var/www/nextcloud/apps/suspicious_login/lib/Db/Model.php#83","userAgent":"UniversalSend_Unicode_WebDAV/1.0","version":"26.0.2.1","data":{"app":"PHP"}}
{"reqId":"wDkatlanZ44m7tWkhpuU","level":0,"time":"2023-06-19T13:04:58+02:00","remoteAddr":"111.222.333.444","user":"Imagepress","app":"suspicious_login","method":"PUT","url":"/remote.php/dav/files/Imagepress/Imagepress-Upload/20230619130721.pdf","message":"using cached model 720","userAgent":"UniversalSend_Unicode_WebDAV/1.0","version":"26.0.2.1","data":{"app":"suspicious_login"}}
{"reqId":"wDkatlanZ44m7tWkhpuU","level":0,"time":"2023-06-19T13:04:58+02:00","remoteAddr":"111.222.333.444","user":"Imagepress","app":"suspicious_login","method":"PUT","url":"/remote.php/dav/files/Imagepress/Imagepress-Upload/20230619130721.pdf","message":"seralized model size: 204709","userAgent":"UniversalSend_Unicode_WebDAV/1.0","version":"26.0.2.1","data":{"app":"suspicious_login"}}
{"reqId":"wDkatlanZ44m7tWkhpuU","level":0,"time":"2023-06-19T13:04:58+02:00","remoteAddr":"111.222.333.444","user":"Imagepress","app":"PHP","method":"PUT","url":"/remote.php/dav/files/Imagepress/Imagepress-Upload/20230619130721.pdf","message":"Return type of Tensor\\Matrix::getIterator() should either be compatible with IteratorAggregate::getIterator(): Traversable, or the #[\\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice at /var/www/nextcloud/apps/suspicious_login/vendor/rubix/tensor/src/Matrix.php#3813","userAgent":"UniversalSend_Unicode_WebDAV/1.0","version":"26.0.2.1","data":{"app":"PHP"}}
{"reqId":"wDkatlanZ44m7tWkhpuU","level":0,"time":"2023-06-19T13:04:58+02:00","remoteAddr":"111.222.333.444","user":"Imagepress","app":"PHP","method":"PUT","url":"/remote.php/dav/files/Imagepress/Imagepress-Upload/20230619130721.pdf","message":"Return type of Tensor\\Vector::offsetGet($index) should either be compatible with ArrayAccess::offsetGet(mixed $offset): mixed, or the #[\\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice at /var/www/nextcloud/apps/suspicious_login/vendor/rubix/tensor/src/Vector.php#2399","userAgent":"UniversalSend_Unicode_WebDAV/1.0","version":"26.0.2.1","data":{"app":"PHP"}}
{"reqId":"wDkatlanZ44m7tWkhpuU","level":0,"time":"2023-06-19T13:04:58+02:00","remoteAddr":"111.222.333.444","user":"Imagepress","app":"PHP","method":"PUT","url":"/remote.php/dav/files/Imagepress/Imagepress-Upload/20230619130721.pdf","message":"Return type of Tensor\\Vector::getIterator() should either be compatible with IteratorAggregate::getIterator(): Traversable, or the #[\\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice at /var/www/nextcloud/apps/suspicious_login/vendor/rubix/tensor/src/Vector.php#2414","userAgent":"UniversalSend_Unicode_WebDAV/1.0","version":"26.0.2.1","data":{"app":"PHP"}}
{"reqId":"wDkatlanZ44m7tWkhpuU","level":0,"time":"2023-06-19T13:04:58+02:00","remoteAddr":"111.222.333.444","user":"Imagepress","app":"suspicious_login","method":"PUT","url":"/remote.php/dav/files/Imagepress/Imagepress-Upload/20230619130721.pdf","message":"Ip 111.222.333.444 for user Imagepress is not suspicious","userAgent":"UniversalSend_Unicode_WebDAV/1.0","version":"26.0.2.1","data":{"app":"suspicious_login"}}
{"reqId":"1gGRfE9a6EgBb9LxTj3n","level":0,"time":"2023-06-19T13:04:59+02:00","remoteAddr":"111.222.333.444","user":"--","app":"no app in context","method":"PUT","url":"/remote.php/dav/files/Imagepress/Imagepress-Upload/20230619130721.pdf","message":"Token is not valid: Token is too short for a generated token, should be the password during basic auth","userAgent":"UniversalSend_Unicode_WebDAV/1.0","version":"26.0.2.1","exception":{"Exception":"OC\\Authentication\\Exceptions\\InvalidTokenException","Message":"Token is too short for a generated token, should be the password during basic auth","Code":0,"Trace":[{"file":"/var/www/nextcloud/lib/private/Authentication/Token/Manager.php","line":132,"function":"getToken","class":"OC\\Authentication\\Token\\PublicKeyTokenProvider","type":"->","args":["*** sensitive parameters replaced ***"]},{"file":"/var/www/nextcloud/lib/private/User/Session.php","line":528,"function":"getToken","class":"OC\\Authentication\\Token\\Manager","type":"->","args":["*** sensitive parameters replaced ***"]},{"file":"/var/www/nextcloud/lib/private/User/Session.php","line":438,"function":"isTokenPassword","class":"OC\\User\\Session","type":"->","args":["*** sensitive parameters replaced ***"]},{"file":"/var/www/nextcloud/apps/dav/lib/Connector/Sabre/Auth.php","line":111,"function":"logClientIn","class":"OC\\User\\Session","type":"->","args":["*** sensitive parameters replaced ***"]},{"file":"/var/www/nextcloud/3rdparty/sabre/dav/lib/DAV/Auth/Backend/AbstractBasic.php","line":103,"function":"validateUserPass","class":"OCA\\DAV\\Connector\\Sabre\\Auth","type":"->","args":["*** sensitive parameters replaced ***"]},{"file":"/var/www/nextcloud/apps/dav/lib/Connector/Sabre/Auth.php","line":226,"function":"check","class":"Sabre\\DAV\\Auth\\Backend\\AbstractBasic","type":"->"},{"file":"/var/www/nextcloud/apps/dav/lib/Connector/Sabre/Auth.php","line":133,"function":"auth","class":"OCA\\DAV\\Connector\\Sabre\\Auth","type":"->"},{"file":"/var/www/nextcloud/3rdparty/sabre/dav/lib/DAV/Auth/Plugin.php","line":180,"function":"check","class":"OCA\\DAV\\Connector\\Sabre\\Auth","type":"->"},{"file":"/var/www/nextcloud/3rdparty/sabre/dav/lib/DAV/Auth/Plugin.php","line":135,"function":"check","class":"Sabre\\DAV\\Auth\\Plugin","type":"->"},{"file":"/var/www/nextcloud/3rdparty/sabre/event/lib/WildcardEmitterTrait.php","line":89,"function":"beforeMethod","class":"Sabre\\DAV\\Auth\\Plugin","type":"->"},{"file":"/var/www/nextcloud/3rdparty/sabre/dav/lib/DAV/Server.php","line":456,"function":"emit","class":"Sabre\\DAV\\Server","type":"->"},{"file":"/var/www/nextcloud/3rdparty/sabre/dav/lib/DAV/Server.php","line":253,"function":"invokeMethod","class":"Sabre\\DAV\\Server","type":"->"},{"file":"/var/www/nextcloud/3rdparty/sabre/dav/lib/DAV/Server.php","line":321,"function":"start","class":"Sabre\\DAV\\Server","type":"->"},{"file":"/var/www/nextcloud/apps/dav/lib/Server.php","line":366,"function":"exec","class":"Sabre\\DAV\\Server","type":"->"},{"file":"/var/www/nextcloud/apps/dav/appinfo/v2/remote.php","line":35,"function":"exec","class":"OCA\\DAV\\Server","type":"->"},{"file":"/var/www/nextcloud/remote.php","line":172,"args":["/var/www/nextcloud/apps/dav/appinfo/v2/remote.php"],"function":"require_once"}],"File":"/var/www/nextcloud/lib/private/Authentication/Token/PublicKeyTokenProvider.php","Line":155,"message":"Token is not valid: Token is too short for a generated token, should be the password during basic auth","exception":{},"CustomMessage":"Token is not valid: Token is too short for a generated token, should be the password during basic auth"}}
{"reqId":"1gGRfE9a6EgBb9LxTj3n","level":0,"time":"2023-06-19T13:05:00+02:00","remoteAddr":"111.222.333.444","user":"Imagepress","app":"suspicious_login","method":"PUT","url":"/remote.php/dav/files/Imagepress/Imagepress-Upload/20230619130721.pdf","message":"loading latest model","userAgent":"UniversalSend_Unicode_WebDAV/1.0","version":"26.0.2.1","data":{"app":"suspicious_login"}}
{"reqId":"1gGRfE9a6EgBb9LxTj3n","level":0,"time":"2023-06-19T13:05:00+02:00","remoteAddr":"111.222.333.444","user":"Imagepress","app":"PHP","method":"PUT","url":"/remote.php/dav/files/Imagepress/Imagepress-Upload/20230619130721.pdf","message":"Return type of OCA\\SuspiciousLogin\\Db\\Model::jsonSerialize() should either be compatible with JsonSerializable::jsonSerialize(): mixed, or the #[\\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice at /var/www/nextcloud/apps/suspicious_login/lib/Db/Model.php#83","userAgent":"UniversalSend_Unicode_WebDAV/1.0","version":"26.0.2.1","data":{"app":"PHP"}}
{"reqId":"1gGRfE9a6EgBb9LxTj3n","level":0,"time":"2023-06-19T13:05:00+02:00","remoteAddr":"111.222.333.444","user":"Imagepress","app":"suspicious_login","method":"PUT","url":"/remote.php/dav/files/Imagepress/Imagepress-Upload/20230619130721.pdf","message":"using cached model 720","userAgent":"UniversalSend_Unicode_WebDAV/1.0","version":"26.0.2.1","data":{"app":"suspicious_login"}}
{"reqId":"1gGRfE9a6EgBb9LxTj3n","level":0,"time":"2023-06-19T13:05:00+02:00","remoteAddr":"111.222.333.444","user":"Imagepress","app":"suspicious_login","method":"PUT","url":"/remote.php/dav/files/Imagepress/Imagepress-Upload/20230619130721.pdf","message":"seralized model size: 204709","userAgent":"UniversalSend_Unicode_WebDAV/1.0","version":"26.0.2.1","data":{"app":"suspicious_login"}}
{"reqId":"1gGRfE9a6EgBb9LxTj3n","level":0,"time":"2023-06-19T13:05:00+02:00","remoteAddr":"111.222.333.444","user":"Imagepress","app":"PHP","method":"PUT","url":"/remote.php/dav/files/Imagepress/Imagepress-Upload/20230619130721.pdf","message":"Return type of Tensor\\Matrix::getIterator() should either be compatible with IteratorAggregate::getIterator(): Traversable, or the #[\\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice at /var/www/nextcloud/apps/suspicious_login/vendor/rubix/tensor/src/Matrix.php#3813","userAgent":"UniversalSend_Unicode_WebDAV/1.0","version":"26.0.2.1","data":{"app":"PHP"}}
{"reqId":"1gGRfE9a6EgBb9LxTj3n","level":0,"time":"2023-06-19T13:05:00+02:00","remoteAddr":"111.222.333.444","user":"Imagepress","app":"PHP","method":"PUT","url":"/remote.php/dav/files/Imagepress/Imagepress-Upload/20230619130721.pdf","message":"Return type of Tensor\\Vector::offsetGet($index) should either be compatible with ArrayAccess::offsetGet(mixed $offset): mixed, or the #[\\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice at /var/www/nextcloud/apps/suspicious_login/vendor/rubix/tensor/src/Vector.php#2399","userAgent":"UniversalSend_Unicode_WebDAV/1.0","version":"26.0.2.1","data":{"app":"PHP"}}
{"reqId":"1gGRfE9a6EgBb9LxTj3n","level":0,"time":"2023-06-19T13:05:00+02:00","remoteAddr":"111.222.333.444","user":"Imagepress","app":"PHP","method":"PUT","url":"/remote.php/dav/files/Imagepress/Imagepress-Upload/20230619130721.pdf","message":"Return type of Tensor\\Vector::getIterator() should either be compatible with IteratorAggregate::getIterator(): Traversable, or the #[\\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice at /var/www/nextcloud/apps/suspicious_login/vendor/rubix/tensor/src/Vector.php#2414","userAgent":"UniversalSend_Unicode_WebDAV/1.0","version":"26.0.2.1","data":{"app":"PHP"}}
{"reqId":"1gGRfE9a6EgBb9LxTj3n","level":0,"time":"2023-06-19T13:05:00+02:00","remoteAddr":"111.222.333.444","user":"Imagepress","app":"suspicious_login","method":"PUT","url":"/remote.php/dav/files/Imagepress/Imagepress-Upload/20230619130721.pdf","message":"Ip 111.222.333.444 for user Imagepress is not suspicious","userAgent":"UniversalSend_Unicode_WebDAV/1.0","version":"26.0.2.1","data":{"app":"suspicious_login"}}

Do you have a log entries from the same transactions/attempts at both the web server and Nextcloud level?

Only need one is necessar. I want to see which ones on the NC side correspond to the 0 bytes in the web side.

Also, I understand you’re grepping for Imagepress to avoid noise and for privacy, but can you confirm there aren’t any other entries immediately before or after reproducing the issue in the nextcloud.log that we should be looking at too? Just in case there’s one without a username in it or something.

I did try to get all the relevant parts of the log.

I will set up a new (clean) Nextcloud and try it there. Then I can as well post the complete log without any fear :wink:

I had the very same issue with a BOOX tablet, where the automated WebDAV synchronization led to files with 0 bytes. My root cause was for sure different, as I’m running Apache instead of nginx. I’m still placing my reply here, as this thread is coming up first in a web search for the issue.

It seemed to be connected with chunked http uploads triggering an Apache bug in its PHP module: 57087 – mod_proxy_fcgi doesn't send cgi CONTENT_LENGTH variable when the client request used Transfer-Encoding:chunked

The bug existed for years and was fixed in 2021. However, it requires a change in the Apache config:

SetEnv proxy-sendcl 1

needs to be added in one of the Apache config files. I placed it in the php config, as that one was the buggy area. After restarting Apache, the uploads were perfectly fine.