Webdav error from multifunction printer

I have a problem with my fresh nextcloud 17 installation, the setup is fine and i can connect to the new server and upload files from the web interface and an external app (cyberduck); however if I try to send a file trought my canon multifunction printer I got this error:

Sabre\DAV\Exception\NotAuthenticated: 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

In the destination folder I can find a pdf file with dimension 0 Kb.

I had tried this:
brand new install with snap package (same problem)
configure my printer to send files via webdav to nextcloud demo instance (it works!)

Nextcloud version 17
Ubuntu 18.04
nginx version 1.14 
PHP 7.2

The output of your Nextcloud log in Admin > Logging:

	Sabre\DAV\Exception\NotAuthenticated: 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
<<closure>>
Sabre\DAV\Auth\Plugin->beforeMethod(Sabre\HTTP\R ... "}, Sabre\HTTP\Response {})
/usr/share/nginx/nextcloud/3rdparty/sabre/event/lib/EventEmitterTrait.php - line 105:
call_user_func_array([ Sabre\DAV\ ... "], [ Sabre\HTTP ... }])
/usr/share/nginx/nextcloud/3rdparty/sabre/dav/lib/DAV/Server.php - line 466:
Sabre\Event\EventEmitter->emit("beforeMethod", [ Sabre\HTTP ... }])
/usr/share/nginx/nextcloud/3rdparty/sabre/dav/lib/DAV/Server.php - line 254:
Sabre\DAV\Server->invokeMethod(Sabre\HTTP\R ... "}, Sabre\HTTP\Response {})
/usr/share/nginx/nextcloud/apps/dav/appinfo/v1/webdav.php - line 80:
Sabre\DAV\Server->exec()
/usr/share/nginx/nextcloud/remote.php - line 163:
require_once("/usr/share/ ... p")

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

<?php
$CONFIG = array (
  'instanceid' => 'xxx',
  'passwordsalt' => 'xxx',
  'secret' => 'xxx',
  'trusted_domains' =>
  array (
    0 => 'xxx.domain',
  ),
  'datadirectory' => '/usr/share/nginx/nextcloud/data',
  'dbtype' => 'mysql',
  'version' => '17.0.0.9',
  'overwrite.cli.url' => 'https://xxx.domain',
  'dbname' => 'nextcloud',
  'dbhost' => 'localhost',
  'dbport' => '',
  'dbtableprefix' => 'oc_',
  'dbuser' => 'nextcloud',
  'dbpassword' => 'xxx',
  'installed' => true,
  'log_type' => 'file',
  'maintenance' => false,
  'logfile' => '/var/log/nextcloud.log',
  'logfilemode' => 416,
  'loglevel' => '0',
  'logdateformat' => 'F d, Y H:i:s',
  'logtimezone' => 'Europe/Rome',
 );

Have you created an app specific password for your printer?

I have created a specific password from settings - security but the result is the same.

nginx access.log

IPADDRESS - - [08/Nov/2019:14:37:36 +0100] “PUT /remote.php/webdav/test/20191108143727.pdf HTTP/1.1” 401 426 “-” “UniversalSend_Unicode_WebDAV/1.0”
IPADDRESS - admin [08/Nov/2019:14:37:37 +0100] “PUT /remote.php/webdav/test/20191108143727.pdf HTTP/1.1” 201 0 “-” “UniversalSend_Unicode_WebDAV/1.0”
IPADDRESS - admin [08/Nov/2019:14:37:38 +0100] “PUT /remote.php/webdav/test/20191108143727.pdf HTTP/1.1” 204 0 “-” “UniversalSend_Unicode_WebDAV/1.0”

nginx error.log
empty

As far as I understood, the HTTP code 201 means that a file has been created. So from this log I cannot see any problem?! What about the Nectcloud log file?

The file has been created but it has dimension 0kb

nextcloud log from gui:

Debug	webdav	Sabre\DAV\Exception\NotAuthenticated: 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

nextcloud log from shell:

{"reqId":"YxHwtHodfqJnelXQ8CE1","level":0,"time":"November 08, 2019 15:14:34","remoteAddr":"ADDRESS","user":"--","app":"webdav","method":"PUT","url":"\/remote.php\/webdav\/test\/20191108151427.pdf","message":{"Exception":"Sabre\\DAV\\Exception\\NotAuthenticated","Message":"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","Code":0,"Trace":[{"function":"beforeMethod","class":"Sabre\\DAV\\Auth\\Plugin","type":"->","args":[{"absoluteUrl":"https:\/\/ADDRESS:443\/remote.php\/webdav\/test\/20191108151427.pdf","__class__":"Sabre\\HTTP\\Request"},{"__class__":"Sabre\\HTTP\\Response"}]},{"file":"\/usr\/share\/nginx\/nextcloud\/3rdparty\/sabre\/event\/lib\/EventEmitterTrait.php","line":105,"function":"call_user_func_array","args":[[{"autoRequireLogin":true,"__class__":"Sabre\\DAV\\Auth\\Plugin"},"beforeMethod"],[{"absoluteUrl":"https:\/\/ADDRESS:443\/remote.php\/webdav\/test\/20191108151427.pdf","__class__":"Sabre\\HTTP\\Request"},{"__class__":"Sabre\\HTTP\\Response"}]]},{"file":"\/usr\/share\/nginx\/nextcloud\/3rdparty\/sabre\/dav\/lib\/DAV\/Server.php","line":466,"function":"emit","class":"Sabre\\Event\\EventEmitter","type":"->","args":["beforeMethod",[{"absoluteUrl":"https:\/\/ADDRESS:443\/remote.php\/webdav\/test\/20191108151427.pdf","__class__":"Sabre\\HTTP\\Request"},{"__class__":"Sabre\\HTTP\\Response"}]]},{"file":"\/usr\/share\/nginx\/nextcloud\/3rdparty\/sabre\/dav\/lib\/DAV\/Server.php","line":254,"function":"invokeMethod","class":"Sabre\\DAV\\Server","type":"->","args":[{"absoluteUrl":"https:\/\/ADDRESS:443\/remote.php\/webdav\/test\/20191108151427.pdf","__class__":"Sabre\\HTTP\\Request"},{"__class__":"Sabre\\HTTP\\Response"}]},{"file":"\/usr\/share\/nginx\/nextcloud\/apps\/dav\/appinfo\/v1\/webdav.php","line":80,"function":"exec","class":"Sabre\\DAV\\Server","type":"->","args":[]},{"file":"\/usr\/share\/nginx\/nextcloud\/remote.php","line":163,"args":["\/usr\/share\/nginx\/nextcloud\/apps\/dav\/appinfo\/v1\/webdav.php"],"function":"require_once"}],"File":"\/usr\/share\/nginx\/nextcloud\/3rdparty\/sabre\/dav\/lib\/DAV\/Auth\/Plugin.php","Line":168,"CustomMessage":"--"},"userAgent":"UniversalSend_Unicode_WebDAV\/1.0","version":"17.0.0.9"}