All actions on file give HTTP 503, `getUser()` on null

The Basics

  • Nextcloud Server version (e.g., 29.x.x):
    • 26.0.13 (nextcloud:26-fpm)
  • Operating system and version (e.g., Ubuntu 24.04):
    • Debian GNU/Linux 10 (buster) with docker
  • Reverse proxy and version _(e.g. nginx 1.27.2)
    • nginx:latest
  • Is this the first time you’ve seen this error? (Yes / No):
    • yes
  • When did this problem seem to first start?
    • weeks ago
  • Installation method (e.g. AlO, NCP, Bare Metal/Archive, etc.)
    • docker compose

Summary of the issue you are facing:

Concerning only one (corrupt?) file of type docx:

  • NextCloud desktop says: “server replied 503 service unavailable” (it blocks other files sync)
  • NextCloud web:
    • file appears in directory
    • file does not open “Failed to load the document”
    • sidebar / activity: no activity
    • sidebar / sharing: internal server error
    • sidebar / versions: one version appears
    • download action: 503
    • delete action: 503
    • leave share: succeed :frowning:

I found this:

<d:multistatus xmlns:d="DAV:" xmlns:s="http://sabredav.org/ns" xmlns:oc="http://owncloud.org/ns" xmlns:nc="http://nextcloud.org/ns"><d:response>
<d:href>/remote.php/dav/files/xxx.xxx/SortMe/20210415_XXXXX.docx</d:href><d:propstat><d:prop>
<d:getlastmodified>Wed, 20 Oct 2021 16:06:15 GMT</d:getlastmodified>
<d:getcontenttype>application/vnd.openxmlformats-officedocument.wordprocessingml.document</d:getcontenttype><d:resourcetype/>
<d:getetag>&quot;ca8d85ccd6e0f2ce28ec79a0a12bb4fa&quot;</d:getetag>
<oc:fileid>111158</oc:fileid>
<oc:permissions>SRGDNVW</oc:permissions>
<oc:size>231276</oc:size><d:getcontentlength>231276</d:getcontentlength><nc:has-preview>false</nc:has-preview>
<nc:mount-type>shared</nc:mount-type><x1:share-permissions xmlns:x1="http://open-collaboration-services.org/ns">19</x1:share-permissions><oc:tags/><oc:favorite>0</oc:favorite><oc:comments-unread>0</oc:comments-unread>
<oc:owner-id>yyy.yyy</oc:owner-id><oc:owner-display-name>YYYYY</oc:owner-display-name><oc:share-types/></d:prop><d:status>HTTP/1.1 200 OK</d:status></d:propstat><d:propstat>
<d:prop><nc:is-encrypted/></d:prop>
<d:status>HTTP/1.1 404 Not Found</d:status></d:propstat></d:response></d:multistatus>

And this:

sudo docker exec -u www-data nextcloud-interne-app php occ files:delete 111158

An unhandled exception has been thrown:
Error: Call to a member function getUser() on null in /var/www/html/core/Command/Info/FileUtils.php:102
Stack trace:
#0 /var/www/html/apps/files/lib/Command/Delete.php(57): OC\Core\Command\Info\FileUtils->getNode('111158')
#1 /var/www/html/3rdparty/symfony/console/Command/Command.php(255): OCA\Files\Command\Delete->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#2 /var/www/html/3rdparty/symfony/console/Application.php(1009): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#3 /var/www/html/3rdparty/symfony/console/Application.php(273): Symfony\Component\Console\Application->doRunCommand(Object(OCA\Files\Command\Delete), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#4 /var/www/html/3rdparty/symfony/console/Application.php(149): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#5 /var/www/html/lib/private/Console/Application.php(211): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#6 /var/www/html/console.php(100): OC\Console\Application->run()
#7 /var/www/html/occ(11): require_once('/var/www/html/c...')

Steps to replicate it (hint: details matter!):

cannot replicate

Log entries

Nextcloud

Please provide the log entries from your Nextcloud log that are generated during the time of problem (via the Copy raw option from Administration settings->Logging screen or from your nextcloud.log located in your data directory). Feel free to use a pastebin/gist service if necessary.

nop

Web Browser

If the problem is related to the Web interface, open your browser inspector Console and Network tabs while refreshing (reloading) and reproducing the problem. Provide any relevant output/errors here that appear.

nop

Web server / Reverse Proxy

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

nop

Configuration

Nextcloud

The output of occ config:list system or similar is best, but, if not possible, the contents of your config.php file from /path/to/nextcloud is fine (make sure to remove any identifiable information!):

nop

Apps

The output of occ app:list (if possible).

  • files: 1.21.1
  • files_external: 1.18.0
  • files_pdfviewer: 2.7.0
  • files_rightclick: 1.5.0
  • files_sharing: 1.18.0
  • files_trashbin: 1.16.0
  • files_versions: 1.19.1