richdocuments icon indicating copy to clipboard operation
richdocuments copied to clipboard

Unable to open files stored in an external storage

Open Kushul-ain opened this issue 9 years ago • 12 comments

I'm currently messing around with the CODE vm and manage to recreate this error with every instance a created.

on the owncloud of the vm itself on another server running ubuntu server 14.4 and owncloud 9.0.2

everything works fine as long as you work on the data folder of owncloud, but when you try to open a file located somewhere else on the server (that is the external storage type I use : local)

Collabora Online lauch itself, try to load the file for a few seconds then give the message : 'We are sorry, this is an unexpected connection error. Please try again.'

and the log look like :

Exception: {"Exception":"Exception","Message":"Invalid file path.","Code":0,"Trace":"#0 /srv/www/htdocs/owncloud/apps/richdocuments/controller/documentcontroller.php(391): OCA\Richdocuments\Db\Wopi->getPathForToken('38', '0', 'Kxh6BNdidV8xTKY...')\n#1 [internal function]: OCA\Richdocuments\Controller\DocumentController->wopiCheckFileInfo('38')\n#2 /srv/www/htdocs/owncloud/lib/private/appframework/http/dispatcher.php(159): call_user_func_array(Array, Array)\n#3 /srv/www/htdocs/owncloud/lib/private/appframework/http/dispatcher.php(89): OC\AppFramework\Http\Dispatcher->executeController(Object(OCA\Richdocuments\Controller\DocumentController), 'wopiCheckFileIn...')\n#4 /srv/www/htdocs/owncloud/lib/private/appframework/app.php(108): OC\AppFramework\Http\Dispatcher->dispatch(Object(OCA\Richdocuments\Controller\DocumentController), 'wopiCheckFileIn...')\n#5 /srv/www/htdocs/owncloud/lib/private/appframework/routing/routeactionhandler.php(45): OC\AppFramework\App::main('DocumentControl...', 'wopiCheckFileIn...', Object(OC\AppFramework\DependencyInjection\DIContainer), Array)\n#6 [internal function]: OC\AppFramework\routing\RouteActionHandler->__invoke(Array)\n#7 /srv/www/htdocs/owncloud/lib/private/route/router.php(291): call_user_func(Object(OC\AppFramework\routing\RouteActionHandler), Array)\n#8 /srv/www/htdocs/owncloud/lib/base.php(853): OC\Route\Router->match('/apps/richdocum...')\n#9 /srv/www/htdocs/owncloud/index.php(39): OC::handleRequest()\n#10 {main}","File":"/srv/www/htdocs/owncloud/apps/richdocuments/lib/db/wopi.php","Line":128}

Kushul-ain avatar Jul 08 '16 09:07 Kushul-ain

Thanks for the bug report, we'll investigate.

timar avatar Jul 08 '16 11:07 timar

Here is more logs about same problem:

Debug   no app in context   getDiscovery(): Getting discovery.xml from the cache.   


2016-07-15T07:20:41+00:00
Warning     richdocuments   Starting a session failed. Reason: File with id "85816" has not been found.     2016-07-15T07:20:40+00:00
Error   PHP     Undefined index: fileid at /apps/richdocuments/controller/documentcontroller.php#185    2016-07-15T07:20:40+00:00
Error   PHP Undefined index: mimetype at /apps/richdocuments/controller/documentcontroller.php#183  2016-07-15T07:20:40+00:00
Error   PHP Undefined index: mimetype at /apps/richdocuments/controller/documentcontroller.php#182  2016-07-15T07:20:40+00:00
Error   PHP Undefined index: mimetype at /apps/richdocuments/controller/documentcontroller.php#181  2016-07-15T07:20:40+00:00
Debug   no app in context   getDiscovery(): Getting discovery.xml from the cache.   2016-07-15T07:20:40+00:00
Error   PHP Undefined offset: 0 at /apps/richdocuments/lib/storage.php#81   2016-07-15T07:20:40+00:00

marxxx avatar Jul 15 '16 07:07 marxxx

I also have the same problem, any news?

billtzim avatar Aug 01 '16 19:08 billtzim

More info on client side: TypeError: document.path is undefined https://owncloud/apps/richdocuments/js/documents.js?v=3d153d42095c93d3f71fda0fa591e95b Line 45

Happens with documents that are on shared external storage.

marxxx avatar Aug 03 '16 05:08 marxxx

Same here, problem with excel files on external storage. I get this to:

Error index Exception: {"Exception":"Exception","Message":"Invalid file path.","Code":0,"Trace":"#0 /srv/www/htdocs/owncloud/apps/richdocuments/controller/documentcontroller.php(391): OCA\Richdocuments\Db\Wopi->getPathForToken('107', '0', 'o62fYF2BowHTU52...')\n#1 [internal function]: OCA\Richdocuments\Controller\DocumentController->wopiCheckFileInfo('107')\n#2 /srv/www/htdocs/owncloud/lib/private/appframework/http/dispatcher.php(159): call_user_func_array(Array, Array)\n#3 /srv/www/htdocs/owncloud/lib/private/appframework/http/dispatcher.php(89): OC\AppFramework\Http\Dispatcher->executeController(Object(OCA\Richdocuments\Controller\DocumentController), 'wopiCheckFileIn...')\n#4 /srv/www/htdocs/owncloud/lib/private/appframework/app.php(108): OC\AppFramework\Http\Dispatcher->dispatch(Object(OCA\Richdocuments\Controller\DocumentController), 'wopiCheckFileIn...')\n#5 /srv/www/htdocs/owncloud/lib/private/appframework/routing/routeactionhandler.php(45): OC\AppFramework\App::main('DocumentControl...', 'wopiCheckFileIn...', Object(OC\AppFramework\DependencyInjection\DIContainer), Array)\n#6 [internal function]: OC\AppFramework\routing\RouteActionHandler->__invoke(Array)\n#7 /srv/www/htdocs/owncloud/lib/private/route/router.php(291): call_user_func(Object(OC\AppFramework\routing\RouteActionHandler), Array)\n#8 /srv/www/htdocs/owncloud/lib/base.php(853): OC\Route\Router->match('/apps/richdocum...')\n#9 /srv/www/htdocs/owncloud/index.php(39): OC::handleRequest()\n#10 {main}","File":"/srv/www/htdocs/owncloud/apps/richdocuments/lib/db/wopi.php","Line":128} 2016-08-09T13:21:45+00:00

Error PHP Undefined index: dir at /srv/www/htdocs/owncloud/apps/richdocuments/controller/documentcontroller.php#258

PS: i updated the CODE to 8.2.7 , all others things works. Tnx.

ppetre avatar Aug 09 '16 13:08 ppetre

This was fixed 24 days ago in https://github.com/owncloud/richdocuments/commit/45d76a1c6855b56ed226d6ae08b4bd82291a3678

Are you sure that you are using latest version of richdocuments with this fix ?

pranavk avatar Aug 12 '16 11:08 pranavk

@pranavk it fixed for me external storage issue but there is still same issue when external storage is shared. PS. I have also configured shared folder: 'share_folder' => '/SHARED',

So basically I have mounted external storage as admin user and shared it with some groups but users in this group are unable to open files in this share with the error of my previous post.

marxxx avatar Aug 23 '16 11:08 marxxx

I have also the same error. All local files working.

only the files on the external storage (smb/cifs) can´t be open.

WOPI::CheckFileInfo is missing JSON payload wsd-00026-0032 2:08:27.683001 [ client_ws_0025 ] ERR Invalid fileinfo for URI [https://$myserver/apps/richdocuments/wopi/files/366?access_token=uHsLALFu40o3EpBcCtCYfYPlAoRRWCMu&permission=edit].| DocumentBroker.cpp:281 wsd-00026-0032 2:08:27.683026 [ client_ws_0025 ] ERR Failed to load document with URI [https://myserver/apps/richdocuments/wopi/files/366?access_token=uHsLALFu40o3EpBcCtCYfYPlAoRRWCMu&permission=edit].| DocumentBroker.cpp:493 wsd-00026-0032 2:08:27.683076 [ client_ws_0025 ] ERR Error in client request handler: Failed to load document with URI [https://myserver/apps/richdocuments/wopi/files/366?access_token=uHsLALFu40o3EpBcCtCYfYPlAoRRWCMu&permission=edit].| LOOLWSD.cpp:966

zebinho26 avatar Nov 17 '16 15:11 zebinho26

same problem here could this issue be caused by session credentials for smb?

aHVzY2g avatar Jul 10 '17 19:07 aHVzY2g

Experiencing a similar issue in Openshift when the storage is mounted via glusterfs (and the relevant files are shared, this does not happen 100% of the times though):

{"reqId":"2o2UZ17AQzSNLES3WC5T","level":3,"time":"2019-03-06T23:22:18+00:00","remoteAddr":"x.x.x.x","user":"foo","app":"PHP","method":"GET","url":"/apps/richdocuments/settings/check","message":"Undefined offset: 0 at /var/www/html/lib/private/AppFramework/Http.php#150","userAgent":"Mozilla/5.0 (X11; Fedora; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/72.0.3626.121 Safari/537.36","version":"13.0.12.1"}

averi avatar Mar 06 '19 23:03 averi

For reference: Here is the workaround for the problem.

santifa avatar Feb 26 '21 11:02 santifa

Is there an update on this? I am still having this issue with the latest version.

TotallyNotASecret avatar Aug 02 '22 07:08 TotallyNotASecret