Internal Server Error when accessing folders shared by link

I’m getting internal server errors when accessing folders shared through links. This happens only with folders. We don’t have any problems with files.

Here is the log related to this:

Exception: Call to a member function getFileInfo() on null
/var/www/nextcloud/lib/private/AppFramework/App.php - line 152:

OC\AppFramework\Http\Dispatcher->dispatch()

/var/www/nextcloud/lib/private/Route/Router.php - line 309:

OC\AppFramework\App::main()

/var/www/nextcloud/lib/base.php - line 1008:

OC\Route\Router->match()

/var/www/nextcloud/index.php - line 37:

OC::handleRequest()

Caused by Error: Call to a member function getFileInfo() on null
/var/www/nextcloud/lib/private/Files/Storage/Wrapper/Quota.php - line 73:

OC\Files\Filesystem::getFileInfo()

/var/www/nextcloud/lib/private/Files/Storage/Wrapper/Quota.php - line 103:

OC\Files\Storage\Wrapper\Quota->getSize()

/var/www/nextcloud/lib/private/Files/Storage/Wrapper/Wrapper.php - line 333:

OC\Files\Storage\Wrapper\Quota->free_space()

/var/www/nextcloud/lib/private/Files/Storage/Wrapper/Wrapper.php - line 333:

OC\Files\Storage\Wrapper\Wrapper->free_space()

/var/www/nextcloud/apps/files_sharing/lib/Controller/ShareController.php - line 383:

OC\Files\Storage\Wrapper\Wrapper->free_space()

/var/www/nextcloud/lib/private/AppFramework/Http/Dispatcher.php - line 169:

OCA\Files_Sharing\Controller\ShareController->showShare()

/var/www/nextcloud/lib/private/AppFramework/Http/Dispatcher.php - line 100:

OC\AppFramework\Http\Dispatcher->executeController()

/var/www/nextcloud/lib/private/AppFramework/App.php - line 152:

OC\AppFramework\Http\Dispatcher->dispatch()

/var/www/nextcloud/lib/private/Route/Router.php - line 309:

OC\AppFramework\App::main()

/var/www/nextcloud/lib/base.php - line 1008:

OC\Route\Router->match()

/var/www/nextcloud/index.php - line 37:

OC::handleRequest()

I checked, if a user is currently logged in to NextCloud in the browser, the links work fine. But if no user has logged in, we get internal server error.

We are using NextCloud version 20.0.8.1

{"reqId":"4phCkx5650IecfmDtD2w","level":3,"time":"2021-03-03T08:49:19+00:00","remoteAddr":"31.47.61.114","user":"--","app":"index","method":"GET","url":"/s/edzoPYdFWYoKnHc","message":{"Exception":"Exception","Message":"Call to a member function getFileInfo() on null","Code":0,"Trace":[{"file":"/var/www/nextcloud/lib/private/AppFramework/App.php","line":152,"function":"dispatch","class":"OC\\AppFramework\\Http\\Dispatcher","type":"->"},{"file":"/var/www/nextcloud/lib/private/Route/Router.php","line":309,"function":"main","class":"OC\\AppFramework\\App","type":"::"},{"file":"/var/www/nextcloud/lib/base.php","line":1008,"function":"match","class":"OC\\Route\\Router","type":"->"},{"file":"/var/www/nextcloud/index.php","line":37,"function":"handleRequest","class":"OC","type":"::"}],"File":"/var/www/nextcloud/lib/private/AppFramework/Http/Dispatcher.php","Line":110,"Previous":{"Exception":"Error","Message":"Call to a member function getFileInfo() on null","Code":0,"Trace":[{"file":"/var/www/nextcloud/lib/private/Files/Storage/Wrapper/Quota.php","line":73,"function":"getFileInfo","class":"OC\\Files\\Filesystem","type":"::"},{"file":"/var/www/nextcloud/lib/private/Files/Storage/Wrapper/Quota.php","line":103,"function":"getSize","class":"OC\\Files\\Storage\\Wrapper\\Quota","type":"->"},{"file":"/var/www/nextcloud/lib/private/Files/Storage/Wrapper/Wrapper.php","line":333,"function":"free_space","class":"OC\\Files\\Storage\\Wrapper\\Quota","type":"->"},{"file":"/var/www/nextcloud/lib/private/Files/Storage/Wrapper/Wrapper.php","line":333,"function":"free_space","class":"OC\\Files\\Storage\\Wrapper\\Wrapper","type":"->"},{"file":"/var/www/nextcloud/apps/files_sharing/lib/Controller/ShareController.php","line":383,"function":"free_space","class":"OC\\Files\\Storage\\Wrapper\\Wrapper","type":"->"},{"file":"/var/www/nextcloud/lib/private/AppFramework/Http/Dispatcher.php","line":169,"function":"showShare","class":"OCA\\Files_Sharing\\Controller\\ShareController","type":"->"},{"file":"/var/www/nextcloud/lib/private/AppFramework/Http/Dispatcher.php","line":100,"function":"executeController","class":"OC\\AppFramework\\Http\\Dispatcher","type":"->"},{"file":"/var/www/nextcloud/lib/private/AppFramework/App.php","line":152,"function":"dispatch","class":"OC\\AppFramework\\Http\\Dispatcher","type":"->"},{"file":"/var/www/nextcloud/lib/private/Route/Router.php","line":309,"function":"main","class":"OC\\AppFramework\\App","type":"::"},{"file":"/var/www/nextcloud/lib/base.php","line":1008,"function":"match","class":"OC\\Route\\Router","type":"->"},{"file":"/var/www/nextcloud/index.php","line":37,"function":"handleRequest","class":"OC","type":"::"}],"File":"/var/www/nextcloud/lib/private/Files/Filesystem.php","Line":864},"CustomMessage":"--"},"userAgent":"Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:86.0) Gecko/20100101 Firefox/86.0","version":"20.0.8.1"}

Config file:

<?php
$CONFIG = array (
  'instanceid' => 'ocgec9n9qanx',
  'passwordsalt' => '***********',
  'secret' => '**************,
  'trusted_domains' => 
  array (
    0 => '**********',
    1 => 'upload',
    2 => 'localhost',
  ),
  'datadirectory' => '/var/drive1/nextcloud-data/',
  'dbtype' => 'mysql',
  'version' => '20.0.8.1',
  'overwrite.cli.url' => 'https://**********',
  'dbname' => 'nextcloud',
  'dbhost' => 'localhost:3306',
  'dbport' => '',
  'dbtableprefix' => 'oc_',
  'mysql.utf8mb4' => true,
  'dbuser' => 'nextclouduser',
  'dbpassword' => '***********',
  'installed' => true,
  'memcache.distributed' => '\\OC\\Memcache\\Redis',
  'memcache.local' => '\\OC\\Memcache\\Redis',
  'memcache.locking' => '\\OC\\Memcache\\Redis',
  'quota_include_external_storage' => true,
  'redis' => 
  array (
    'host' => 'localhost',
    'port' => 6379,
  ),
  'maintenance' => false,
  'loglevel' => 2,
  'ldapIgnoreNamingRules' => false,
  'ldapProviderFactory' => 'OCA\\User_LDAP\\LDAPProviderFactory',
  'mail_smtpmode' => 'smtp',
  'mail_sendmailmode' => 'smtp',
  'mail_from_address' => 'uploadcenter',
  'mail_domain' => '********',
  'mail_smtpauthtype' => 'LOGIN',
  'mail_smtpauth' => 1,
  'mail_smtphost' => '********',
  'mail_smtpname' => 'uploadcenter@********',
  'mail_smtppassword' => '***********',
  'mail_smtpport' => '465',
  'mail_smtpsecure' => 'ssl',
  'htaccess.RewriteBase' => '/',
  'skeletondirectory' => '',
  'theme' => '',
);
1 Like

as you’re only providing parts of your log-file and no additional informations it’s quite difficult finding a valid/possible solution.

referring to your log: did you check that there’s enough space left on your disks and that your user has enough quota left?

Yes plenty of space and quota left. As I said, sharing files work. Only folders have this problem. What other information should I provide to help?

I just found out that if I change the quota of the user to unlimited, the problem will be fixed.

I can confirm, but this is definitely a bug, not a feature. Still present on latest…

if you think so pls feel free to file a bug on github after having made sure that there’s none similar already existing

Well, it’s a bug that has to do with enabling the experimental option quota_include_external_storage. It took me a long time (unhelpful error message) to realise that this option was responsible for breaking the folder sharing and Collabora Online plugin.

great that your inquiry was that successful.
though: an issue on bugtracker would help devs to localize that problem and if you even could feed them the solution I bet they would feel quite pampered :wink:

pls re-link the issue here as a solution for this problem

Unfortunately I don’t have any other solution than keeping the option to False (cf here).

But I’ll open an issue for it nonetheless. This particular thread, in my case, is just collateral damage of the silent storm that can result in enabling this experimental option.

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.