Unable to upload .xlsx, .docx : "Could not fetch file details". doc and xls works

Nextcloud version (eg, 20.0.5): 20.0.11
Operating system and version (eg, Ubuntu 20.04): CentOS 7x64 - 7.9.2009
Apache or nginx version (eg, Apache 2.4.25): Apache 2.4.34
PHP version (eg, 7.4): 7.4.21

The issue you are facing:

I recently updated Nextcloud from version 18 to latest 20. After the update, users are not able to upload xslx and docx file anymore, error ‘Could not fetch file details “filename.xlsx”’ appears and the file is not uploaded. Uploading doc, xls, pdf, jpg works normally.

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

Steps to replicate it:

  1. Upload an .xslx or .docx file through web interface
  2. Error ’ Could not fetch file details “filename.xlsx”’ appears and the file is not uploaded
  3. Uploading any other file type (.doc, .xls, .ods, .odt) works

The output of your Nextcloud log in Admin > Logging:

{"reqId":"YO2@iFXdcwHk8-LAhumu3gAAAA0","level":0,"time":"2021-07-13T16:25:44+00:00","remoteAddr":"223.255.255.255","user":"eb4d9a02-6889-1033-9ce1-0xxxxxx","app":"webdav","method":"PROPFIND","url":"/remote.php/dav/files/eb4d9a02-6889-1033-9ce1-0xxxxxxx/test/file_example_XLSX_50.xlsx","message":{"Exception":"Sabre\\DAV\\Exception\\NotFound","Message":"File with name /test/file_example_XLSX_50.xlsx could not be located","Code":0,"Trace":[{"file":"/var/www/html/nextcloud/3rdparty/sabre/dav/lib/DAV/Tree.php","line":80,"function":"getChild","class":"OCA\\DAV\\Connector\\Sabre\\Directory","type":"->"},{"file":"/var/www/html/nextcloud/3rdparty/sabre/dav/lib/DAV/Server.php","line":976,"function":"getNodeForPath","class":"Sabre\\DAV\\Tree","type":"->"},{"file":"/var/www/html/nextcloud/3rdparty/sabre/dav/lib/DAV/Server.php","line":1678,"function":"getPropertiesIteratorForPath","class":"Sabre\\DAV\\Server","type":"->"},{"file":"/var/www/html/nextcloud/3rdparty/sabre/dav/lib/DAV/Server.php","line":1661,"function":"writeMultiStatus","class":"Sabre\\DAV\\Server","type":"->"},{"file":"/var/www/html/nextcloud/3rdparty/sabre/dav/lib/DAV/CorePlugin.php","line":363,"function":"generateMultiStatus","class":"Sabre\\DAV\\Server","type":"->"},{"file":"/var/www/html/nextcloud/3rdparty/sabre/event/lib/WildcardEmitterTrait.php","line":89,"function":"httpPropFind","class":"Sabre\\DAV\\CorePlugin","type":"->"},{"file":"/var/www/html/nextcloud/3rdparty/sabre/dav/lib/DAV/Server.php","line":474,"function":"emit","class":"Sabre\\DAV\\Server","type":"->"},{"file":"/var/www/html/nextcloud/3rdparty/sabre/dav/lib/DAV/Server.php","line":251,"function":"invokeMethod","class":"Sabre\\DAV\\Server","type":"->"},{"file":"/var/www/html/nextcloud/3rdparty/sabre/dav/lib/DAV/Server.php","line":319,"function":"start","class":"Sabre\\DAV\\Server","type":"->"},{"file":"/var/www/html/nextcloud/apps/dav/lib/Server.php","line":332,"function":"exec","class":"Sabre\\DAV\\Server","type":"->"},{"file":"/var/www/html/nextcloud/apps/dav/appinfo/v2/remote.php","line":35,"function":"exec","class":"OCA\\DAV\\Server","type":"->"},{"file":"/var/www/html/nextcloud/remote.php","line":167,"args":["/var/www/html/nextcloud/apps/dav/appinfo/v2/remote.php"],"function":"require_once"}],"File":"/var/www/html/nextcloud/apps/dav/lib/Connector/Sabre/Directory.php","Line":234,"CustomMessage":"--"},"userAgent":"Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:90.0) Gecko/20100101 Firefox/90.0","version":"20.0.11.1"}

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

<?php
$CONFIG = array (
  'instanceid' => 'xxxx',
  'passwordsalt' => 'xxxx',
  'secret' => 'xxx',
  'trusted_domains' => 
  array (
    0 => 'nextcloud.internal.testing.com',
    1 => 'nextcloud.testing.com',
    2 => 'nextcloud',
  ),
  'datadirectory' => '/var/www/html/nextcloud/data',
  'dbtype' => 'mysql',
  'version' => '20.0.11.1',
  'overwrite.cli.url' => 'http://nextcloud.testing.com',
  'dbname' => 'nextcloud',
  'dbhost' => 'localhost:3306',
  'dbport' => '',
  'dbtableprefix' => 'oc_',
  'dbuser' => 'nextcloud',
  'dbpassword' => 'xxxxxx',
  'installed' => true,
  'skeletondirectory' => '',
  'memcache.distributed' => '\\OC\\Memcache\\Redis',
  'memcache.locking' => '\\OC\\Memcache\\Redis',
  'memcache.local' => '\\OC\\Memcache\\APCu',
  'redis' => 
  array (
    'host' => 'localhost',
    'port' => 6379,
  ),
  'proxy' => 'xxx.xx.xx.xx:8080',
  'proxyuserpwd' => 'xxxx:xxxxx',
  'ldapIgnoreNamingRules' => false,
  'ldapProviderFactory' => 'OCA\\User_LDAP\\LDAPProviderFactory',
  'maintenance' => false,
  'theme' => '',
  'loglevel' => 0,
  'app_install_overwrite' => 
  array (
    0 => 'deck',
  ),
  'updater.secret' => 'xxxxxxx',
);

Solved: the problem was not caused by Nextcloud but by our reverse proxy infrastructure.

Hi, we also have this problem and we also have a reverse proxy, please tell me, how exactly was your problem solved?

In our case the cause was our F5 reverse proxy, that acts also as a WAF (web application firewall): there was a security rule that blocked the upload of that kind of files.