This is an error that I was getting in owncloud before I transitioned over to nextcloud. I was hoping it would resolve itself after I switched but it continues to fill my log files every 15 min when my cron script runs. The error only occurs if I have modified a file on my external storage and it only occurs once. For instance, if I’ve edited and closed the file then there will be an error when cron runs but it will not throw an error the next run. I’ve tried invoking the cron.php script directly from terminal without crontab and I get the same error. I am invoking with user www-data. My external storage is configured as “Local” and there is no Authentication set. It is just a folder shared on another drive sitting on my Ubuntu server. I seem to have no trouble connecting to the storage and saving files yet the error persists.
Here is the error message from nextcloud.log
{“reqId”:“NMFNCc/WmESkcHVbQar5”,“remoteAddr”:"",“app”:“core”,“message”:“Error while running background job (class: OC\Command\CommandJob, arguments: O:33:“OCA\Files_Versions\Command\Expire”:2:{s:43:”\u0000OCA\Files_Versions\Command\Expire\u0000fileName";s:26:"/Logs/custom-blacklist.txt";s:39:"\u0000OCA\Files_Versions\Command\Expire\u0000user";s:5:“steve”;}): {“Exception”:“OC\\User\\NoUserException”,“Message”:“Attempted to initialize mount points for null user and no user in session”,“Code”:0,“Trace”:"#0 \/var\/www\/nextcloud\/apps\/files_versions\/lib\/storage.php(102): OC\\Files\\Filesystem::initMountPoints(false)\n#1 \/var\/www\/nextcloud\/apps\/files_versions\/lib\/storage.php(701): OCA\\Files_Versions\\Storage::getUidAndFilename(’\/Logs\/custom-bl…’)\n#2 \/var\/www\/nextcloud\/apps\/files_versions\/command\/expire.php(61): OCA\\Files_Versions\\Storage::expire(’\/Logs\/custom-bl…’)\n#3 \/var\/www\/nextcloud\/lib\/private\/command\/commandjob.php(34): OCA\\Files_Versions\\Command\\Expire->handle()\n#4 \/var\/www\/nextcloud\/lib\/private\/backgroundjob\/job.php(52): OC\\Command\\CommandJob->run(‘O:33:\"OCA\\\\Files…’)\n#5 \/var\/www\/nextcloud\/lib\/private\/backgroundjob\/queuedjob.php(42): OC\\BackgroundJob\\Job->execute(Object(OC\\BackgroundJob\\JobList), Object(OC\\Log))\n#6 \/var\/www\/nextcloud\/cron.php(145): OC\\BackgroundJob\\QueuedJob->execute(Object(OC\\BackgroundJob\\JobList), Object(OC\\Log))\n#7 {main}",“File”:"\/var\/www\/nextcloud\/lib\/private\/files\/filesystem.php",“Line”:377}",“level”:3,“time”:“August 14, 2016 09:37:01”,“method”:"–",“url”:"–",“user”:"–"}