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' => '',
);