Nextcloud 15: An unhandled exception has been thrown

#1

Sorry, I wasn’t sure where this should go so it went here since it is a relatively fresh install. I setup nextcloud 15 on Ubuntu 18.04 with Apache2, php7, and mysql. It worked well last night so I have to assume that there is some automated process that brought it down overnight, this is actually the second time I have had this same issue and I started over clearing storage and the database.

First I tried to see if I could get anywhere with occ, there is more but it’s too long.
sudo -u www-data php occ

An unhandled exception has been thrown:
OCP\Files\NotFoundException in /var/www/html/nextcloud/lib/private/Files/Node/Node.php:97
Stack trace:
#0 /var/www/html/nextcloud/lib/private/Files/Node/Node.php(216): OC\Files\Node\Node->getFileInfo()
#1 /var/www/html/nextcloud/lib/private/Files/Node/Node.php(117): OC\Files\Node\Node->getPermissions()
#2 /var/www/html/nextcloud/lib/private/Files/Node/Folder.php(156): OC\Files\Node\Node->checkPermissions(4)
#3 /var/www/html/nextcloud/lib/private/Files/AppData/AppData.php(94): OC\Files\Node\Folder->newFolder(‘css’)
#4 /var/www/html/nextcloud/lib/private/Files/AppData/AppData.php(114): OC\Files\AppData\AppData->getAppDataFolder()
#5 /var/www/html/nextcloud/lib/private/Template/IconsCacher.php(80): OC\Files\AppData\AppData->newFolder(‘icons’)
#6 [internal function]: OC\Template\IconsCacher->__construct(Object(OC\Log), Object(OC\Files\AppData\Factory), Object(OC\URLGenerator), Object(OC\AppFramework\Utility\TimeFactory))
#7 /var/www/html/nextcloud/lib/private/AppFramework/Utility/SimpleContainer.php(81): ReflectionClass->newInstanceArgs(Array)
#8 /var/www/html/nextcloud/lib/private/AppFramework/Utility/SimpleContainer.php(98): OC\AppFramework\Utility\SimpleContainer->buildClass(Object(ReflectionClass))
#9 /var/www/html/nextcloud/lib/private/AppFramework/Utility/SimpleContainer.php(119): OC\AppFramework\Utility\SimpleContainer->resolve(‘OC\Template\Ico…’)
#10 /var/www/html/nextcloud/lib/private/ServerContainer.php(132): OC\AppFramework\Utility\SimpleContainer->query(‘OC\Template\Ico…’)
#11 /var/www/html/nextcloud/lib/private/Server.php(980): OC\ServerContainer->query(‘OC\Template\Ico…’)
#12 /var/www/html/nextcloud/3rdparty/pimple/pimple/src/Pimple/Container.php(118): OC\Server->OC{closure}(Object(OC\Server))
#13 /var/www/html/nextcloud/lib/private/AppFramework/Utility/SimpleContainer.php(117): Pimple\Container->offsetGet(‘OC\Template\SCS…’)
#14 /var/www/html/nextcloud/lib/private/ServerContainer.php(132): OC\AppFramework\Utility\SimpleContainer->query(‘OC\Template\SCS…’)
#15 /var/www/html/nextcloud/lib/private/Repair.php(145): OC\ServerContainer->query(‘OC\Template\SCS…’)
#16 /var/www/html/nextcloud/core/register_command.php(143): OC\Repair::getRepairSteps()
#17 /var/www/html/nextcloud/lib/private/Console/Application.php(118): require_once(’/var/www/html/n…’)
#18 /var/www/html/nextcloud/console.php(95): OC\Console\Application->loadCommands(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#19 /var/www/html/nextcloud/occ(11): require_once(’/var/www/html/n…’)
#20 {main}PHP Warning: fileperms(): stat failed for /media/file_svr/nextcloud/nextcloud.log in /var/www/html/nextcloud/lib/private/Log/File.php on line 140
{“reqId”:“IV8PuLUB7qJWS8mL1TsP”,“level”:3,“time”:“2019-04-25T12:46:36+00:00”,“remoteAddr”:"",“user”:"–",“app”:“PHP”,“method”:"",“url”:"–",“message”:“fileperms(): stat failed for /media/file_svr/nextcloud/nextcloud.log at /var/www/html/nextcloud/lib/private/Log/File.php#140”,“userAgent”:"–",“version”:“15.0.7.0”}
{“reqId”:“IV8PuLUB7qJWS8mL1TsP”,“level”:3,“time”:“2019-04-25T12:46:36+00:00”,“remoteAddr”:"",“user”:"–",“app”:“PHP”,“method”:"",“url”:"–",“message”:“chmod(): Permission denied at /var/www/html/nextcloud/lib/private/Log/File.php#141”,“userAgent”:"–",“version”:“15.0.7.0”}

I wasn’t able to find any logs for nextcloud itself. /var/log/nextcloud.log is empty

apache2 log:

[Thu Apr 25 08:00:07.961734 2019] [php7:warn] [pid 17000] [client No IP Here:39267] PHP Warning: fileperms(): stat failed for /media/file_svr/nextcloud/nextcloud.log in /var/www/html/nextcloud/lib/private/Log/File.php on line 140
[Thu Apr 25 08:00:07.961763 2019] [php7:notice] [pid 17000] [client No IP Here:39267] {“reqId”:“20Gkme4QnjqjwUEMMegb”,“level”:3,“time”:“2019-04-25T13:00:07+00:00”,“remoteAddr”:“No IP Here”,“user”:"–",“app”:“PHP”,“method”:“GET”,“url”:"\/nextcloud\/index.php\/204",“message”:“fileperms(): stat failed for \/media\/file_svr\/nextcloud\/nextcloud.log at \/var\/www\/html\/nextcloud\/lib\/private\/Log\/File.php#140”,“userAgent”:“Mozilla\/5.0 (Android) ownCloud-android\/3.6.0”,“version”:“15.0.7.0”}
[Thu Apr 25 08:00:07.961796 2019] [php7:notice] [pid 17000] [client No IP Here:39267] {“reqId”:“20Gkme4QnjqjwUEMMegb”,“level”:3,“time”:“2019-04-25T13:00:07+00:00”,“remoteAddr”:“No IP Here”,“user”:"–",“app”:“core”,“method”:“GET”,“url”:"\/nextcloud\/index.php\/204",“message”:{“Exception”:“OCP\\Files\\NotFoundException”,“Message”:"",“Code”:0,“Trace”:[{“file”:"\/var\/www\/html\/nextcloud\/lib\/private\/Files\/Node\/Node.php",“line”:216,“function”:“getFileInfo”,“class”:“OC\\Files\\Node\\Node”,“type”:"->",“args”:[]},{“file”:"\/var\/www\/html\/nextcloud\/lib\/private\/Files\/Node\/Node.php",“line”:117,“function”:“getPermissions”,“class”:“OC\\Files\\Node\\Node”,“type”:"->",“args”:[]},{“file”:"\/var\/www\/html\/nextcloud\/lib\/private\/Files\/Node\/Folder.php",“line”:156,“function”:“checkPermissions”,“class”:“OC\\Files\\Node\\Node”,“type”:"->",“args”:[4]},{“file”:"\/var\/www\/html\/nextcloud\/lib\/private\/Files\/AppData\/AppData.php",“line”:94,“function”:“newFolder”,“class”:“OC\\Files\\Node\\Folder”,“type”:"->",“args”:[“js”]},{“file”:"\/var\/www\/html\/nextcloud\/lib\/private\/Files\/AppData\/AppData.php",“line”:114,“function”:“getAppDataFolder”,“class”:“OC\\Files\\AppData\\AppData”,“type”:"->",“args”:[]},{“file”:"\/var\/www\/html\/nextcloud\/lib\/private\/Template\/JSCombiner.php",“line”:97,“function”:“newFolder”,“class”:“OC\\Files\\AppData\\AppData”,“type”:"->",“args”:[“core”]},{“file”:"\/var\/www\/html\/nextcloud\/lib\/private\/Template\/JSResourceLocator.php",“line”:114,“function”:“process”,“class”:“OC\\Template\\JSCombiner”,“type”:"->",“args”:["\/var\/www\/html\/nextcloud",“core\/js\/merged-template-prepend.json”,“core”]},{“file”:"\/var\/www\/html\/nextcloud\/lib\/private\/Template\/JSResourceLocator.php",“line”:70,“function”:“cacheAndAppendCombineJsonIfExist”,“class”:“OC\\Template\\JSResourceLocator”,“type”:"->",“args”:["\/var\/www\/html\/nextcloud",“core\/js\/merged-template-prepend.json”]},{“file”:"\/var\/www\/html\/nextcloud\/lib\/private\/Template\/ResourceLocator.php",“line”:78,“function”:“doFind”,“class”:“OC\\Template\\JSResourceLocator”,“type”:"->",“args”:[“js\/merged-template-prepend”]},{“file”:"\/var\/www\/html\/nextcloud\/lib\/private\/TemplateLayout.php",“line”:328,“function”:“find”,“class”:“OC\\Template\\ResourceLocator”,“type”:"->",“args”:[[“vendor\/core”,“js\/merged-template-prepend”,“search\/js\/search”,“core\/l10n\/en”,“js\/backgroundjobs”,“search\/l10n\/en”,“search\/js\/searchprovider”,“js\/jquery-ui-fixes”,“js\/files\/fileinfo”,“js\/files\/client”,“js\/contactsmenu”,“js\/contactsmenu_templates”,“encryption\/l10n\/en”,“encryption\/js\/encryption”,“core\/js\/merged-share-backend”]]},{“file”:"\/var\/www\/html\/nextcloud\/lib\/private\/TemplateLayout.php",“line”:160,“function”:“findJavascriptFiles”,“class”:“OC\\TemplateLayout”,“type”:"::",“args”:[[“vendor\/core”,“js\/merged-template-prepend”,“search\/js\/search”,“core\/l10n\/en”,“js\/backgroundjobs”,“search\/l10n\/en”,“search\/js\/searchprovider”,“js\/jquery-ui-fixes”,“js\/files\/fileinfo”,“js\/files\/client”,“js\/contactsmenu”,“js\/contactsmenu_templates”,“encryption\/l10n\/en”,“encryption\/js\/encryption”,“core\/js\/merged-share-backend”]]},{“file”:"\/var\/www\/html\/nextcloud\/lib\/private\/legacy\/template.php",“line”:211,“function”:"__construct",“class”:“OC\\TemplateLayout”,“type”:"->",“args”:[“error”,""]},{“file”:"\/var\/www\/html\/nextcloud\/lib\/private\/Template\/Base.php",“line”:132,“function”:“fetchPage”,“class”:“OC_Template”,“type”:"->",“args”:[]},{“file”:"\/var\/www\/html\/nextcloud\/lib\/private\/legacy\/template.php",“line”:360,“function”:“printPage”,“class”:“OC\\Template\\Base”,“type”:"->",“args”:[]},{“file”:"\/var\/www\/html\/nextcloud\/index.php",“line”:69,“function”:“printExceptionErrorPage”,“class”:“OC_Template”,“type”:"::",“args”:[{“class”:“OCP\\Files\\NotFoundException”},500]}],“File”:"\/var\/www\/html\/nextcloud\/lib\/private\/Files\/Node\/Node.php",“Line”:97,“CustomMessage”:"–"},“userAgent”:“Mozilla\/5.0 (Android) ownCloud-android\/3.6.0”,“version”:“15.0.7.0”}

#2

Try making occ verbose with ... occ -vvv status and post output

#3

Here is what I get from occ -vvv excluding the very long header that is to long to post:

#0 /var/www/html/nextcloud/lib/private/Files/Node/Node.php(216): OC\Files\Node\Node->getFileInfo()
#1 /var/www/html/nextcloud/lib/private/Files/Node/Node.php(117): OC\Files\Node\Node->getPermissions()
#2 /var/www/html/nextcloud/lib/private/Files/Node/Folder.php(156): OC\Files\Node\Node->checkPermissions(4)
#3 /var/www/html/nextcloud/lib/private/Files/AppData/AppData.php(94): OC\Files\Node\Folder->newFolder(‘css’)
#4 /var/www/html/nextcloud/lib/private/Files/AppData/AppData.php(114): OC\Files\AppData\AppData->getAppDataFolder()
#5 /var/www/html/nextcloud/lib/private/Template/IconsCacher.php(80): OC\Files\AppData\AppData->newFolder(‘icons’)
#6 [internal function]: OC\Template\IconsCacher->__construct(Object(OC\Log), Object(OC\Files\AppData\Factory), Object(OC\URLGenerator), Object(OC\AppFramework\Utility\TimeFactory))
#7 /var/www/html/nextcloud/lib/private/AppFramework/Utility/SimpleContainer.php(81): ReflectionClass->newInstanceArgs(Array)
#8 /var/www/html/nextcloud/lib/private/AppFramework/Utility/SimpleContainer.php(98): OC\AppFramework\Utility\SimpleContainer->buildClass(Object(ReflectionClass))
#9 /var/www/html/nextcloud/lib/private/AppFramework/Utility/SimpleContainer.php(119): OC\AppFramework\Utility\SimpleContainer->resolve(‘OC\Template\Ico…’)
#10 /var/www/html/nextcloud/lib/private/ServerContainer.php(132): OC\AppFramework\Utility\SimpleContainer->query(‘OC\Template\Ico…’)
#11 /var/www/html/nextcloud/lib/private/Server.php(980): OC\ServerContainer->query(‘OC\Template\Ico…’)
#12 /var/www/html/nextcloud/3rdparty/pimple/pimple/src/Pimple/Container.php(118): OC\Server->OC{closure}(Object(OC\Server))
#13 /var/www/html/nextcloud/lib/private/AppFramework/Utility/SimpleContainer.php(117): Pimple\Container->offsetGet(‘OC\Template\SCS…’)
#14 /var/www/html/nextcloud/lib/private/ServerContainer.php(132): OC\AppFramework\Utility\SimpleContainer->query(‘OC\Template\SCS…’)
#15 /var/www/html/nextcloud/lib/private/Repair.php(145): OC\ServerContainer->query(‘OC\Template\SCS…’)
#16 /var/www/html/nextcloud/core/register_command.php(143): OC\Repair::getRepairSteps()
#17 /var/www/html/nextcloud/lib/private/Console/Application.php(118): require_once(’/var/www/html/n…’)
#18 /var/www/html/nextcloud/console.php(95): OC\Console\Application->loadCommands(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#19 /var/www/html/nextcloud/occ(11): require_once(’/var/www/html/n…’)
#20 {main}PHP Warning: fileperms(): stat failed for /media/file_svr/nextcloud/nextcloud.log in /var/www/html/nextcloud/lib/private/Log/File.php on line 140
{“reqId”:“6DGRFHjIKK19sj1g4pST”,“level”:3,“time”:“2019-04-26T14:15:27+00:00”,“remoteAddr”:"",“user”:"–",“app”:“PHP”,“method”:"",“url”:"–",“message”:“fileperms(): stat failed for /media/file_svr/nextcloud/nextcloud.log at /var/www/html/nextcloud/lib/private/Log/File.php#140”,“userAgent”:"–",“version”:“15.0.7.0”}
{“reqId”:“6DGRFHjIKK19sj1g4pST”,“level”:3,“time”:“2019-04-26T14:15:27+00:00”,“remoteAddr”:"",“user”:"–",“app”:“PHP”,“method”:"",“url”:"–",“message”:“chmod(): Permission denied at /var/www/html/nextcloud/lib/private/Log/File.php#141”,“userAgent”:"–",“version”:“15.0.7.0”}
You have new mail in /var/mail/root

As far as I can tell these are identical.

#4

I have to call this topic closed because it is now working. I’m not sure how.

::Edit:: It was a permissions issue.