Hello,
our system is as follows:
NC 18.0.1
Apache 2.4.29
PHP 7.2.24
MySQL 5.7.29
I’m trying to transfer the ownership of a file to another user. According to web interface everything works as expected, the new user gets a notification and agrees to it.
But the logfile contains the following error:
{"reqId":"HND6dkr1Djhjyb7XPrAV","level":3,"time":"2020-03-03T15:36:51+01:00","remoteAddr":"","user":"--","app":"core","method":"","url":"--","message":{"Exception":"OCP\\AppFramework\\Db\\DoesNotExistException","Message":"**Did expect one result but found none when executing: query \"SELECT * FROM `*PREFIX*user_transfer_owner` WHERE `id` = :dcValue1\";** ","Code":0,"Trace":[{"file":"/var/www/html/nextcloud/lib/public/AppFramework/Db/QBMapper.php","line":327,"function":"findOneQuery","class":"OCP\\AppFramework\\Db\\QBMapper","type":"->","args":[{"__class__":"OC\\DB\\QueryBuilder\\QueryBuilder"}]},{"file":"/var/www/html/nextcloud/apps/files/lib/Db/TransferOwnershipMapper.php","line":47,"function":"findEntity","class":"OCP\\AppFramework\\Db\\QBMapper","type":"->","args":[{"__class__":"OC\\DB\\QueryBuilder\\QueryBuilder"}]},{"file":"/var/www/html/nextcloud/apps/files/lib/BackgroundJob/TransferOwnership.php","line":83,"function":"getById","class":"OCA\\Files\\Db\\TransferOwnershipMapper","type":"->","args":[26]},{"file":"/var/www/html/nextcloud/lib/public/BackgroundJob/Job.php","line":79,"function":"run","class":"OCA\\Files\\BackgroundJob\\TransferOwnership","type":"->","args":[{"id":26}]},{"file":"/var/www/html/nextcloud/lib/public/BackgroundJob/QueuedJob.php","line":48,"function":"execute","class":"OCP\\BackgroundJob\\Job","type":"->","args":[{"__class__":"OC\\BackgroundJob\\JobList"},{"__class__":"OC\\Log"}]},{"file":"/var/www/html/nextcloud/cron.php","line":125,"function":"execute","class":"OCP\\BackgroundJob\\QueuedJob","type":"->","args":[{"__class__":"OC\\BackgroundJob\\JobList"},{"__class__":"OC\\Log"}]}],"File":"/var/www/html/nextcloud/lib/public/AppFramework/Db/QBMapper.php","Line":253,"CustomMessage":"Error while running background job (class: OCA\\Files\\BackgroundJob\\TransferOwnership, arguments: Array\n(\n [id] => 26\n)\n)"},"userAgent":"--","version":"18.0.1.3"}
The problem seems to be the SQL statement:
SELECT * FROM `*PREFIX*user_transfer_owner` WHERE `id` = :dcValue1
When I assign a file to a new user, the table oc_user_transfer_owner contains an entry:
28 | ncuser1 | adminnc | 984 | Library.jpg
After adminnc has confirmed the notifcation, the entry disappears. I guess the background job is expecting at least some kind of entry in this table or will it always fail, even when no one has transfered a file or folder?
Thanks for any hints or suggestions,
Stefan