Error when assembling chunks, status code 405. NC17

Error when assembling chunks, status code 405 in large files which are chunked to be uploaded.

Nextcloud version: 17.0.1
Apache or nginx version: nginx/1.17.6
PHP Version: 7.3.12
Memory Limit: 512 MB
Max Execution Time: 3600
Upload max size: 512 MB

I use a frontal node with a Nginx as a reverse proxy, that connects/sends the calls to another node (backend, upstream), which has nextcloud in a docker container (along with another nginx, etc listed above).

The issue you are facing:

After adjusting the nginx configuration to allow the access to “.file”, when upload a large file (>10MB) I get the message “Error when assembling chunks, status code 405”.

I read about the error 403 which is related with “.file” permissions. In the Web, other users get 504 errors when they don’t configure the “timeout” values correctly. However, nobody talks about the code 405.

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

Steps to replicate it:

  1. Using browser or client apps (linux or android)
  2. Upload a file (.zip, .png, .jpeg, .pdf, etc) that is large than max_chunk_size (10MB)
  3. Wait for the end of the transfer, the error message is displayed

The output of your Nextcloud log in Admin > Logging: empty

The output of your config.php file:

<?php
$CONFIG = array (
  'passwordsalt' => 'xxxxxxxxxxxxxxxxxxxxx',
  'secret' => 'xxxxxxxxxxxxxxxxxxxxxxxxxxx',
  'trusted_domains' => 
  array (
    0 => 'localhost',
    1 => 'www.url.xxx',
    2 => 'url.xxx',
  ),
  'trusted_proxies' => 
  array (
    0 => 'localhost',
    1 => 'www.url.xxx',
    2 => 'url.xxx',
  ),
  'overwritehost' => 'url.xxx',
  'overwriteprotocol' => 'https',
  'overwritewebroot' => '/ncloud',
  'overwitecondaddr' => '^yy\\.yyy\\.yyy\\.yyy$',
  'datadirectory' => '/var/www/html/data',
  'overwrite.cli.url' => 'http://localhost',
  'dbtype' => 'pgsql',
  'version' => '17.0.1.1',
  'dbname' => 'nextcloud_db',
  'dbhost' => 'db:port',
  'dbport' => '',
  'dbtableprefix' => 'oc_',
  'dbuser' => 'user',
  'dbpassword' => 'pass',
  'logtimezone' => 'UTC',
  'installed' => true,
  'instanceid' => 'xxxxxxxxx',
  'maintenance' => false,
  'memcache.local' => '\\OC\\Memcache\\APCu',
  'mail_smtpdebug' => true,
  'mail_smtpmode' => '',
  'mail_smtptimeout' => 20,
  'mail_from_address' => '',
  'mail_domain' => '',
  'mail_smtphost' => '',
  'mail_smtpport' => '',
  'mail_smtpauthtype' => '',
  'mail_smtpauth' => ,
  'mail_smtpname' => '',
  'mail_smtppassword' => '',
  'mail_smtpsecure' => '',
  'loglevel' => 0,
  'theme' => '',
  'ldapIgnoreNamingRules' => false,
  'ldapProviderFactory' => 'OCA\\User_LDAP\\LDAPProviderFactory',
  'integrity.check.disabled' => true,
  'apps_paths' => 
  array (
    0 => 
    array (
      'path' => '/var/www/html/apps',
      'url' => '/apps',
      'writable' => false,
    ),
    1 => 
    array (
      'path' => '/var/www/html/custom_apps',
      'url' => '/custom_apps',
      'writable' => true,
    ),
  ),
  'data-fingerprint' => 'xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx',
  'updater.secret' => 'xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx',
);

The output of nginx log in /var/log/____:

xx.xxx.xx.xxx - - [08/Feb/2020:19:38:23 +0000] "MOVE /server/remote.php/dav/uploads/user/web-file-upload-f33b84d39fdeccaf605ca91671bdc1e3-1581190595446/.file HTTP/1.0" 302 0 "-" "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:72.0) Gecko/20100101 Firefox/72.0" "xx.xxx.xx.xxx"
xx.xxx.xx.xxx - - [08/Feb/2020:19:38:23 +0000] "MOVE /apps/files/ HTTP/1.0" 405 0 "-" "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:72.0) Gecko/20100101 Firefox/72.0" "xx.xxx.xx.xxx"

Did you fixed this issue? Having the same error.