Bug report
Expected Behavior
The file should be OCRed as in any other common Nextcloud folder.
Current Behavior
An error is outputted in the top area of the web interface and the file is not processed.
Possible Solution
Steps to Reproduce (for bugs)
- Install the "External storage support" app
- Create a local folder in the server, mine (/data/data) is out of the /var/www/nextcloud path, this folder should be owned by www-data user and group, for more details please check https://docs.nextcloud.com/server/11/admin_manual/configuration_files/external_storage/local.html
- In the Admin > External storages add the previously configured folder
- I have added a file through the Nextcloud Mac OS X client
- I tried to OCR the file via web interface and it showed an error.
Context
I'm trying to OCR a file in a external storage local folder to made it available to other users with access to this folder.
Your Environment
- OCR version used: 2.3.0
- Browser Name and version: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.10; rv:51.0) Gecko/20100101 Firefox/51.0
- Operating System and version (desktop or mobile): Mac OS X 10.10.5
- ownCloud/nextcloud version: Nextcloud 11.0.1 (stable)
- PHP version: 7.0.13
- Database version: PostgreSQL 9.5.5 on i686-pc-linux-gnu, compiled by gcc (Ubuntu 5.4.0-6ubuntu1~16.04.2) 5.4.0 20160609, 32-bit
- Are you using encryption: no
Log File Content (nextcloud.log of the "data"-directory)
{"reqId":"2cHVIjfj1kBYuU64e6xu","remoteAddr":"192.168.1.104","app":"ocr","message":"Exception during ocr service function processing: {"Exception":"OCP\\AppFramework\\Db\\DoesNotExistException","Message":"Did expect one result but found none when executing: query \"SELECT file_target FROM PREFIXshare WHERE file_source = ? AND share_with = ? AND uid_owner = ?\"; parameters Array\n(\n [0] => 320\n [1] => [email protected]\n [2] => local::\/data\/data\/\n)\n; limit \"\"; offset \"\"","Code":0,"Trace":"#0 \/var\/www\/nextcloud\/lib\/public\/AppFramework\/Db\/Mapper.php(373): OCP\\AppFramework\\Db\\Mapper->findOneQuery('SELECT file_tar...', Array, NULL, NULL)\n#1 \/var\/www\/nextcloud\/apps\/ocr\/lib\/Db\/ShareMapper.php(42): OCP\\AppFramework\\Db\\Mapper->findEntity('SELECT file_tar...', Array)\n#2 \/var\/www\/nextcloud\/apps\/ocr\/lib\/Service\/OcrService.php(320): OCA\\Ocr\\Db\\ShareMapper->find(320, '[email protected]...', 'local::\/data\/da...')\n#3 \/var\/www\/nextcloud\/apps\/ocr\/lib\/Service\/OcrService.php(173): OCA\\Ocr\\Service\\OcrService->buildTargetForShared(Object(OCA\\Ocr\\Db\\File))\n#4 \/var\/www\/nextcloud\/apps\/ocr\/lib\/Controller\/OcrController.php(74): OCA\\Ocr\\Service\\OcrService->process(Array, Array)\n#5 \/var\/www\/nextcloud\/apps\/ocr\/lib\/Controller\/Errors.php(35): OCA\\Ocr\\Controller\\OcrController->OCA\\Ocr\\Controller\\{closure}()\n#6 \/var\/www\/nextcloud\/apps\/ocr\/lib\/Controller\/OcrController.php(75): OCA\\Ocr\\Controller\\OcrController->handleNotFound(Object(Closure))\n#7 [internal function]: OCA\\Ocr\\Controller\\OcrController->process(Array, Array)\n#8 \/var\/www\/nextcloud\/lib\/private\/AppFramework\/Http\/Dispatcher.php(160): call_user_func_array(Array, Array)\n#9 \/var\/www\/nextcloud\/lib\/private\/AppFramework\/Http\/Dispatcher.php(90): OC\\AppFramework\\Http\\Dispatcher->executeController(Object(OCA\\Ocr\\Controller\\OcrController), 'process')\n#10 \/var\/www\/nextcloud\/lib\/private\/AppFramework\/App.php(114): OC\\AppFramework\\Http\\Dispatcher->dispatch(Object(OCA\\Ocr\\Controller\\OcrController), 'process')\n#11 \/var\/www\/nextcloud\/lib\/private\/AppFramework\/Routing\/RouteActionHandler.php(47): OC\\AppFramework\\App::main('OcrController', 'process', Object(OC\\AppFramework\\DependencyInjection\\DIContainer), Array)\n#12 [internal function]: OC\\AppFramework\\Routing\\RouteActionHandler->__invoke(Array)\n#13 \/var\/www\/nextcloud\/lib\/private\/Route\/Router.php(299): call_user_func(Object(OC\\AppFramework\\Routing\\RouteActionHandler), Array)\n#14 \/var\/www\/nextcloud\/lib\/base.php(1010): OC\\Route\\Router->match('\/apps\/ocr')\n#15 \/var\/www\/nextcloud\/index.php(40): OC::handleRequest()\n#16 {main}","File":"\/var\/www\/nextcloud\/lib\/public\/AppFramework\/Db\/Mapper.php","Line":289}","level":3,"time":"2017-02-14T18:04:15+00:00","method":"POST","url":"/nextcloud/index.php/apps/ocr","user":"[email protected]","version":"11.0.1.2"}
{"reqId":"2cHVIjfj1kBYuU64e6xu","remoteAddr":"192.168.1.104","app":"ocr","message":"Exception during ocr service function processing: {"Exception":"OCP\\AppFramework\\Db\\DoesNotExistException","Message":"Did expect one result but found none when executing: query \"SELECT file_target FROM PREFIXshare WHERE file_source = ? AND share_with = ? AND uid_owner = ?\"; parameters Array\n(\n [0] => 320\n [1] => [email protected]\n [2] => local::\/data\/data\/\n)\n; limit \"\"; offset \"\"","Code":0,"Trace":"#0 \/var\/www\/nextcloud\/lib\/public\/AppFramework\/Db\/Mapper.php(373): OCP\\AppFramework\\Db\\Mapper->findOneQuery('SELECT file_tar...', Array, NULL, NULL)\n#1 \/var\/www\/nextcloud\/apps\/ocr\/lib\/Db\/ShareMapper.php(42): OCP\\AppFramework\\Db\\Mapper->findEntity('SELECT file_tar...', Array)\n#2 \/var\/www\/nextcloud\/apps\/ocr\/lib\/Service\/OcrService.php(320): OCA\\Ocr\\Db\\ShareMapper->find(320, '[email protected]...', 'local::\/data\/da...')\n#3 \/var\/www\/nextcloud\/apps\/ocr\/lib\/Service\/OcrService.php(173): OCA\\Ocr\\Service\\OcrService->buildTargetForShared(Object(OCA\\Ocr\\Db\\File))\n#4 \/var\/www\/nextcloud\/apps\/ocr\/lib\/Controller\/OcrController.php(74): OCA\\Ocr\\Service\\OcrService->process(Array, Array)\n#5 \/var\/www\/nextcloud\/apps\/ocr\/lib\/Controller\/Errors.php(35): OCA\\Ocr\\Controller\\OcrController->OCA\\Ocr\\Controller\\{closure}()\n#6 \/var\/www\/nextcloud\/apps\/ocr\/lib\/Controller\/OcrController.php(75): OCA\\Ocr\\Controller\\OcrController->handleNotFound(Object(Closure))\n#7 [internal function]: OCA\\Ocr\\Controller\\OcrController->process(Array, Array)\n#8 \/var\/www\/nextcloud\/lib\/private\/AppFramework\/Http\/Dispatcher.php(160): call_user_func_array(Array, Array)\n#9 \/var\/www\/nextcloud\/lib\/private\/AppFramework\/Http\/Dispatcher.php(90): OC\\AppFramework\\Http\\Dispatcher->executeController(Object(OCA\\Ocr\\Controller\\OcrController), 'process')\n#10 \/var\/www\/nextcloud\/lib\/private\/AppFramework\/App.php(114): OC\\AppFramework\\Http\\Dispatcher->dispatch(Object(OCA\\Ocr\\Controller\\OcrController), 'process')\n#11 \/var\/www\/nextcloud\/lib\/private\/AppFramework\/Routing\/RouteActionHandler.php(47): OC\\AppFramework\\App::main('OcrController', 'process', Object(OC\\AppFramework\\DependencyInjection\\DIContainer), Array)\n#12 [internal function]: OC\\AppFramework\\Routing\\RouteActionHandler->__invoke(Array)\n#13 \/var\/www\/nextcloud\/lib\/private\/Route\/Router.php(299): call_user_func(Object(OC\\AppFramework\\Routing\\RouteActionHandler), Array)\n#14 \/var\/www\/nextcloud\/lib\/base.php(1010): OC\\Route\\Router->match('\/apps\/ocr')\n#15 \/var\/www\/nextcloud\/index.php(40): OC::handleRequest()\n#16 {main}","File":"\/var\/www\/nextcloud\/lib\/public\/AppFramework\/Db\/Mapper.php","Line":289}","level":3,"time":"2017-02-14T18:04:15+00:00","method":"POST","url":"/nextcloud/index.php/apps/ocr","user":"[email protected]","version":"11.0.1.2"}
{"reqId":"2cHVIjfj1kBYuU64e6xu","remoteAddr":"192.168.1.104","app":"index","message":"Exception: {"Exception":"OCP\\AppFramework\\Db\\DoesNotExistException","Message":"Did expect one result but found none when executing: query \"SELECT file_target FROM PREFIXshare WHERE file_source = ? AND share_with = ? AND uid_owner = ?\"; parameters Array\n(\n [0] => 320\n [1] => [email protected]\n [2] => local::\/data\/data\/\n)\n; limit \"\"; offset \"\"","Code":0,"Trace":"#0 \/var\/www\/nextcloud\/lib\/public\/AppFramework\/Db\/Mapper.php(373): OCP\\AppFramework\\Db\\Mapper->findOneQuery('SELECT file_tar...', Array, NULL, NULL)\n#1 \/var\/www\/nextcloud\/apps\/ocr\/lib\/Db\/ShareMapper.php(42): OCP\\AppFramework\\Db\\Mapper->findEntity('SELECT file_tar...', Array)\n#2 \/var\/www\/nextcloud\/apps\/ocr\/lib\/Service\/OcrService.php(320): OCA\\Ocr\\Db\\ShareMapper->find(320, '[email protected]...', 'local::\/data\/da...')\n#3 \/var\/www\/nextcloud\/apps\/ocr\/lib\/Service\/OcrService.php(173): OCA\\Ocr\\Service\\OcrService->buildTargetForShared(Object(OCA\\Ocr\\Db\\File))\n#4 \/var\/www\/nextcloud\/apps\/ocr\/lib\/Controller\/OcrController.php(74): OCA\\Ocr\\Service\\OcrService->process(Array, Array)\n#5 \/var\/www\/nextcloud\/apps\/ocr\/lib\/Controller\/Errors.php(35): OCA\\Ocr\\Controller\\OcrController->OCA\\Ocr\\Controller\\{closure}()\n#6 \/var\/www\/nextcloud\/apps\/ocr\/lib\/Controller\/OcrController.php(75): OCA\\Ocr\\Controller\\OcrController->handleNotFound(Object(Closure))\n#7 [internal function]: OCA\\Ocr\\Controller\\OcrController->process(Array, Array)\n#8 \/var\/www\/nextcloud\/lib\/private\/AppFramework\/Http\/Dispatcher.php(160): call_user_func_array(Array, Array)\n#9 \/var\/www\/nextcloud\/lib\/private\/AppFramework\/Http\/Dispatcher.php(90): OC\\AppFramework\\Http\\Dispatcher->executeController(Object(OCA\\Ocr\\Controller\\OcrController), 'process')\n#10 \/var\/www\/nextcloud\/lib\/private\/AppFramework\/App.php(114): OC\\AppFramework\\Http\\Dispatcher->dispatch(Object(OCA\\Ocr\\Controller\\OcrController), 'process')\n#11 \/var\/www\/nextcloud\/lib\/private\/AppFramework\/Routing\/RouteActionHandler.php(47): OC\\AppFramework\\App::main('OcrController', 'process', Object(OC\\AppFramework\\DependencyInjection\\DIContainer), Array)\n#12 [internal function]: OC\\AppFramework\\Routing\\RouteActionHandler->__invoke(Array)\n#13 \/var\/www\/nextcloud\/lib\/private\/Route\/Router.php(299): call_user_func(Object(OC\\AppFramework\\Routing\\RouteActionHandler), Array)\n#14 \/var\/www\/nextcloud\/lib\/base.php(1010): OC\\Route\\Router->match('\/apps\/ocr')\n#15 \/var\/www\/nextcloud\/index.php(40): OC::handleRequest()\n#16 {main}","File":"\/var\/www\/nextcloud\/lib\/public\/AppFramework\/Db\/Mapper.php","Line":289}","level":3,"time":"2017-02-14T18:04:15+00:00","method":"POST","url":"/nextcloud/index.php/apps/ocr","user":"[email protected]","version":"11.0.1.2"}