Error no app in context

to much errors in logs:
Exception: {“Exception”:“OCP\Files\NotFoundException”,“Message”:“File with id “146875” has not been found.”,“Code”:0,“Trace”:"#0 /var/www/html/owncloud/apps/files_sharing/lib/sharedstorage.php(90): OC\Files\View->getPath(146875)\n#1 /var/www/html/owncloud/apps/files_sharing/lib/sharedstorage.php(581): OC\Files\Storage\Shared->init()\n#2 /var/www/html/owncloud/lib/private/files/storage/wrapper/wrapper.php(381): OC\Files\Storage\Shared->getCache(’’, Object(OCA\Files_Trashbin\Storage))\n#3 /var/www/html/owncloud/lib/private/files/view.php(1340): OC\Files\Storage\Wrapper\Wrapper->getCache(’’)\n#4 /var/www/html/owncloud/lib/private/files/node/root.php(179): OC\Files\View->getFileInfo(’/user1.user’)\n#5 /var/www/html/owncloud/lib/private/files/node/root.php(341): OC\Files\Node\Root->get(’/user1.user’)\n#6 /var/www/html/owncloud/lib/private/server.php(742): OC\Files\Node\Root->getUserFolder(‘user1.user’)\n#7 /var/www/html/owncloud/apps/dav/lib/connector/sabre/serverfactory.php(126): OC\Server->getUserFolder()\n#8 [internal function]: OCA\DAV\Connector\Sabre\ServerFactory->OCA\DAV\Connector\Sabre\{closure}(Object(Sabre\HTTP\Request), Object(Sabre\HTTP\Response))\n#9 /var/www/html/owncloud/3rdparty/sabre/event/lib/EventEmitterTrait.php(105): call_user_func_array(Object(Closure), Array)\n#10 /var/www/html/owncloud/3rdparty/sabre/dav/lib/DAV/Server.php(446): Sabre\Event\EventEmitter->emit(‘beforeMethod’, Array)\n#11 /var/www/html/owncloud/3rdparty/sabre/dav/lib/DAV/Server.php(248): Sabre\DAV\Server->invokeMethod(Object(Sabre\HTTP\Request), Object(Sabre\HTTP\Response))\n#12 /var/www/html/owncloud/apps/dav/appinfo/v1/webdav.php(55): Sabre\DAV\Server->exec()\n#13 /var/www/html/owncloud/remote.php(138): require_once(’/var/www/html/M…’)\n#14 {main}",“File”:"/var/www/html\/owncloud/lib/private/files/view.php",“Line”:1677}

Hi @4lfr3d7115,

Welcome at Nextcloud :wink: Can you please provide us some more information like:

  • what happens
  • what should happen
  • which environment you us (server, os, version, …)
  • logs (already provided by you :thumbsup:)

Only with this information, we would be able to provide you support :grin: Thank you.

This information is displayed in the logs after owncloud to nextcloud migration.

Should not appear.

Centos 6.8

Happens to me too with every run of nextcloud’s cronjob. It should not appear at all as it references to a file shared to the instance in question, the share does no longer exist.

I would have expected the ID to be swept away and not searched for at every run of the cronjob.

Affected version is Nextcloud-9.0.52, running on php-5.6.23-pl0, with php-fpm and pecl-apcu-4.0.7 as cache, using nginx-1.10.1 as httpd.

My stacktrace looks quite similar.

{"reqId":"fChPNOYMnbKs0DOpZNpv","remoteAddr":"","app":"cron","message":"Run job with ID 1153","level":0,"time":"2016-07-07T19:00:02+00:00","method":"--","url":"--","user":"--"} {"reqId":"fChPNOYMnbKs0DOpZNpv","remoteAddr":"","app":"no app in context","message":"Exception: {\"Exception\":\"OCP\\\\Files\\\\NotFoundException\",\"Message\":\"File with id \\\"578\\\" has not been found.\",\"Code\":0,\"Trace\":\"#0 \\\/var\\\/www\\\/secure\\\/nextcloud\\\/apps\\\/files_sharing\\\/lib\\\/sharedstorage.php(90): OC\\\\Files\\\\View->getPath(578)\\n#1 \\\/var\\\/www\\\/secure\\\/nextcloud\\\/apps\\\/files_sharing\\\/lib\\\/sharedstorage.php(581): OC\\\\Files\\\\Storage\\\\Shared->init()\\n#2 \\\/var\\\/www\\\/secure\\\/nextcloud\\\/lib\\\/private\\\/files\\\/storage\\\/wrapper\\\/wrapper.php(381): OC\\\\Files\\\\Storage\\\\Shared->getCache('', Object(OCA\\\\Files_Trashbin\\\\Storage))\\n#3 \\\/var\\\/www\\\/secure\\\/nextcloud\\\/lib\\\/private\\\/files\\\/cache\\\/scanner.php(88): OC\\\\Files\\\\Storage\\\\Wrapper\\\\Wrapper->getCache()\\n#4 \\\/var\\\/www\\\/secure\\\/nextcloud\\\/apps\\\/files_sharing\\\/lib\\\/sharedstorage.php(595): OC\\\\Files\\\\Cache\\\\Scanner->__construct(Object(OCA\\\\Files_Trashbin\\\\Storage))\\n#5 \\\/var\\\/www\\\/secure\\\/nextcloud\\\/lib\\\/private\\\/files\\\/storage\\\/wrapper\\\/wrapper.php(395): OC\\\\Files\\\\Storage\\\\Shared->getScanner('', Object(OCA\\\\Files_Trashbin\\\\Storage))\\n#6 \\\/var\\\/www\\\/secure\\\/nextcloud\\\/lib\\\/private\\\/files\\\/utils\\\/scanner.php(127): OC\\\\Files\\\\Storage\\\\Wrapper\\\\Wrapper->getScanner()\\n#7 \\\/var\\\/www\\\/secure\\\/nextcloud\\\/apps\\\/files\\\/lib\\\/backgroundjob\\\/scanfiles.php(87): OC\\\\Files\\\\Utils\\\\Scanner->backgroundScan('')\\n#8 \\\/var\\\/www\\\/secure\\\/nextcloud\\\/apps\\\/files\\\/lib\\\/backgroundjob\\\/scanfiles.php(111): OCA\\\\Files\\\\BackgroundJob\\\\ScanFiles->runScanner(Object(OC\\\\User\\\\User))\\n#9 \\\/var\\\/www\\\/secure\\\/nextcloud\\\/lib\\\/private\\\/backgroundjob\\\/job.php(52): OCA\\\\Files\\\\BackgroundJob\\\\ScanFiles->run(NULL)\\n#10 \\\/var\\\/www\\\/secure\\\/nextcloud\\\/lib\\\/private\\\/backgroundjob\\\/timedjob.php(53): OC\\\\BackgroundJob\\\\Job->execute(Object(OC\\\\BackgroundJob\\\\JobList), Object(OC\\\\Log))\\n#11 \\\/var\\\/www\\\/secure\\\/nextcloud\\\/cron.php(145): OC\\\\BackgroundJob\\\\TimedJob->execute(Object(OC\\\\BackgroundJob\\\\JobList), Object(OC\\\\Log))\\n#12 {main}\",\"File\":\"\\\/var\\\/www\\\/secure\\\/nextcloud\\\/lib\\\/private\\\/files\\\/view.php\",\"Line\":1677}","level":3,"time":"2016-07-07T19:00:02+00:00","method":"--","url":"--","user":"--"} {"reqId":"fChPNOYMnbKs0DOpZNpv","remoteAddr":"","app":"cron","message":"Finished job with ID 1153","level":0,"time":"2016-07-07T19:00:03+00:00","method":"--","url":"--","user":"--"}

I’m getting a lot of similar errors. Found this info on the ownCloud forum. Looks like the same problem to me.

Hi!

I have the same error when i try to upload avatar in personal settings:
{“reqId”:“b2OyQ5R2Pk2gHmO+U8nv”,“remoteAddr”:“192.168.88.1”,“app”:“PHP”,“message”:“fread() expects parameter 1 to be resource, boolean given at /var/www/nextcloud/lib/private/Files/Storage/Local.php#217”,“level”:3,“time”:“2017-01-26T20:57:54+00:00”,“method”:“GET”,“url”:"/index.php/core/preview.png?file=%2F1.jpg",“user”:“snake”,“version”:“11.0.1.2”}
{“reqId”:“b2OyQ5R2Pk2gHmO+U8nv”,“remoteAddr”:“192.168.88.1”,“app”:“PHP”,“message”:“fclose() expects parameter 1 to be resource, boolean given at /var/www/nextcloud/lib/private/Files/Storage/Local.php#218”,“level”:3,“time”:“2017-01-26T20:57:54+00:00”,“method”:“GET”,“url”:"/index.php/core/preview.png?file=%2F1.jpg",“user”:“snake”,“version”:“11.0.1.2”}
{“reqId”:“zVmTx8g5Z3181EJZfgvG”,“remoteAddr”:“192.168.88.1”,“app”:“no app in context”,“message”:“Missing expected parameters in change user hook”,“level”:2,“time”:“2017-01-26T20:58:04+00:00”,“method”:“POST”,“url”:"/index.php/avatar/cropped",“user”:“snake”,“version”:“11.0.1.2”}
{“reqId”:“zVmTx8g5Z3181EJZfgvG”,“remoteAddr”:“192.168.88.1”,“app”:“PHP”,“message”:“touch(): Unable to create file /var/www/nextcloud/data/appdata_ocr28rk0o3f2/avatar/snake/avatar.jpg because No such file or directory at /var/www/nextcloud/lib/private/Files/Storage/Local.php#198”,“level”:3,“time”:“2017-01-26T20:58:04+00:00”,“method”:“POST”,“url”:"/index.php/avatar/cropped",“user”:“snake”,“version”:“11.0.1.2”}
{“reqId”:“zVmTx8g5Z3181EJZfgvG”,“remoteAddr”:“192.168.88.1”,“app”:“core”,“message”:“Exception: {“Exception”:“OCP\\Files\\NotFoundException”,“Message”:”",“Code”:0,“Trace”:"#0 \/var\/www\/nextcloud\/lib\/private\/Files\/Node\/Node.php(223): OC\\Files\\Node\\Node->getFileInfo()\n#1 \/var\/www\/nextcloud\/lib\/private\/Files\/Node\/Node.php(106): OC\\Files\\Node\\Node->getPermissions()\n#2 \/var\/www\/nextcloud\/lib\/private\/Files\/Node\/File.php(52): OC\\Files\\Node\\Node->checkPermissions(2)\n#3 \/var\/www\/nextcloud\/lib\/private\/Files\/SimpleFS\/SimpleFile.php(95): OC\\Files\\Node\\File->putContent(’\\xFF\\xD8\\xFF\\xE0\\x00\\x10JFIF\\x00\\x01\\x01\\x01\\x00…’)\n#4 \/var\/www\/nextcloud\/lib\/private\/Avatar.php(138): OC\\Files\\SimpleFS\\SimpleFile->putContent(’\\xFF\\xD8\\xFF\\xE0\\x00\\x10JFIF\\x00\\x01\\x01\\x01\\x00…’)\n#5 \/var\/www\/nextcloud\/core\/Controller\/AvatarController.php(334): OC\\Avatar->set(Object(OC_Image))\n#6 [internal function]: OC\\Core\\Controller\\AvatarController->postCroppedAvatar(Array)\n#7 \/var\/www\/nextcloud\/lib\/private\/AppFramework\/Http\/Dispatcher.php(160): call_user_func_array(Array, Array)\n#8 \/var\/www\/nextcloud\/lib\/private\/AppFramework\/Http\/Dispatcher.php(90): OC\\AppFramework\\Http\\Dispatcher->executeController(Object(OC\\Core\\Controller\\AvatarController), ‘postCroppedAvat…’)\n#9 \/var\/www\/nextcloud\/lib\/private\/AppFramework\/App.php(114): OC\\AppFramework\\Http\\Dispatcher->dispatch(Object(OC\\Core\\Controller\\AvatarController), ‘postCroppedAvat…’)\n#10 \/var\/www\/nextcloud\/lib\/private\/AppFramework\/Routing\/RouteActionHandler.php(47): OC\\AppFramework\\App::main(‘AvatarControlle…’, ‘postCroppedAvat…’, Object(OC\\AppFramework\\DependencyInjection\\DIContainer), Array)\n#11 [internal function]: OC\\AppFramework\\Routing\\RouteActionHandler->__invoke(Array)\n#12 \/var\/www\/nextcloud\/lib\/private\/Route\/Router.php(299): call_user_func(Object(OC\\AppFramework\\Routing\\RouteActionHandler), Array)\n#13 \/var\/www\/nextcloud\/lib\/base.php(1010): OC\\Route\\Router->match(’\/avatar\/cropped’)\n#14 \/var\/www\/nextcloud\/index.php(40): OC::handleRequest()\n#15 {main}",“File”:"\/var\/www\/nextcloud\/lib\/private\/Files\/Node\/Node.php",“Line”:86}",“level”:3,“time”:“2017-01-26T20:58:04+00:00”,“method”:“POST”,“url”:"/index.php/avatar/cropped",“user”:“snake”,“version”:“11.0.1.2”}