Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Documents not saved back to Nextcloud 15 when file is shared and stored on files_external and files_versions is enabled #118

Closed
timm2k opened this issue Jul 25, 2019 · 17 comments
Labels
bug Something isn't working external storage

Comments

@timm2k
Copy link

timm2k commented Jul 25, 2019

Hi,

with Nextcloud 15.0.10, DocumentServer 5.3.4-3 and OnlyOffice App 2.4.0 documents are not saved back to Nextcloud when its edited via a share and the file is located on files_external storage (SMB). The exception hints to an issue with files_versions. If I disabled files_versions everything is fine. If I replace the document with a new version in NC's webinterface and files_versions is enabled everything is fine, too.

Exception:
{"reqId":"LA7d7EniXUv3HMtJrdqH","level":3,"time":"2019-07-25T09:52:13+02:00","remoteAddr":"10.1.1.17","user":"user-b","app":"index","method":"POST","url":"\/apps\/onlyoffice\/track?doc=<removed>","message":{"Exception":"Error","Message":"Call to a member function getId() on bool","Code":0,"Trace":[{"file":"\/var\/www\/html\/nextcloud\/apps\/files_versions\/lib\/Hooks.php","line":61,"function":"store","class":"OCA\\Files_Versions\\Storage","type":"::","args":["\/SMB\/document.docx"]},{"file":"\/var\/www\/html\/nextcloud\/lib\/private\/legacy\/hook.php","line":106,"function":"write_hook","class":"OCA\\Files_Versions\\Hooks","type":"::","args":[{"run":true,"path":"\/SMB\/document.docx"}]},{"file":"\/var\/www\/html\/nextcloud\/lib\/private\/Files\/View.php","line":1268,"function":"emit","class":"OC_Hook","type":"::","args":["OC_Filesystem","write",{"run":true,"path":"\/SMB\/document.docx"}]},{"file":"\/var\/www\/html\/nextcloud\/lib\/private\/Files\/View.php","line":1138,"function":"runHooks","class":"OC\\Files\\View","type":"->","args":[["update","write"],"\/SMB\/document.docx"]},{"file":"\/var\/www\/html\/nextcloud\/lib\/private\/Files\/View.php","line":689,"function":"basicOperation","class":"OC\\Files\\View","type":"->","args":["file_put_contents","\/user-a\/files\/SMB\/document.docx",["update","write"],null]},{"file":"\/var\/www\/html\/nextcloud\/lib\/private\/Files\/Node\/File.php","line":66,"function":"file_put_contents","class":"OC\\Files\\View","type":"->","args":["\/user-a\/files\/SMB\/document.docx",null]},{"file":"\/var\/www\/html\/nextcloud\/apps\/onlyoffice\/controller\/callbackcontroller.php","line":439,"function":"putContent","class":"OC\\Files\\Node\\File","type":"->","args":[null]},{"file":"\/var\/www\/html\/nextcloud\/lib\/private\/AppFramework\/Http\/Dispatcher.php","line":166,"function":"track","class":"OCA\\Onlyoffice\\Controller\\CallbackController","type":"->","args":["<removed>",["user-b"],"39",2,"https:\/\/<onlyofficeserver>//cache\/files\/39_2140\/output.docx\/output.docx?md5=lsaGS02rEyLExq2Sj_YZKg==&expires=1564042034&disposition=attachment&ooname=output.docx",null]},{"file":"\/var\/www\/html\/nextcloud\/lib\/private\/AppFramework\/Http\/Dispatcher.php","line":99,"function":"executeController","class":"OC\\AppFramework\\Http\\Dispatcher","type":"->","args":[{"__class__":"OCA\\Onlyoffice\\Controller\\CallbackController"},"track"]},{"file":"\/var\/www\/html\/nextcloud\/lib\/private\/AppFramework\/App.php","line":118,"function":"dispatch","class":"OC\\AppFramework\\Http\\Dispatcher","type":"->","args":[{"__class__":"OCA\\Onlyoffice\\Controller\\CallbackController"},"track"]},{"file":"\/var\/www\/html\/nextcloud\/lib\/private\/AppFramework\/Routing\/RouteActionHandler.php","line":47,"function":"main","class":"OC\\AppFramework\\App","type":"::","args":["OCA\\Onlyoffice\\Controller\\CallbackController","track",{"__class__":"OC\\AppFramework\\DependencyInjection\\DIContainer"},{"_route":"onlyoffice.callback.track"}]},{"function":"__invoke","class":"OC\\AppFramework\\Routing\\RouteActionHandler","type":"->","args":[{"_route":"onlyoffice.callback.track"}]},{"file":"\/var\/www\/html\/nextcloud\/lib\/private\/Route\/Router.php","line":297,"function":"call_user_func","args":[{"__class__":"OC\\AppFramework\\Routing\\RouteActionHandler"},{"_route":"onlyoffice.callback.track"}]},{"file":"\/var\/www\/html\/nextcloud\/lib\/base.php","line":987,"function":"match","class":"OC\\Route\\Router","type":"->","args":["\/apps\/onlyoffice\/track"]},{"file":"\/var\/www\/html\/nextcloud\/index.php","line":42,"function":"handleRequest","class":"OC","type":"::","args":[]}],"File":"\/var\/www\/html\/nextcloud\/apps\/files_versions\/lib\/Storage.php","Line":185,"CustomMessage":"--"},"userAgent":"--","version":"15.0.10.0"}

Steps to reproduce

  • setup Nextcloud 15.0.10
  • enable apps files_external, files_versions and onlyoffice
  • create user-a and user-b
  • add an external SMB storage named 'SMB' to user-a (username+password)
  • create a new document inside of SMB
  • share the docuement with user-b
  • let user-b do some changes with OnlyOffice and close editor window
  • see exception in nextcloud.log

I've also opened Ticket 967225 at Nextcloud's support platform.
We're paying customers of Nextcloud and Onlyoffice.
Please help to solve this issue.

Kind Regads,
Timm

@timm2k
Copy link
Author

timm2k commented Jul 25, 2019

Verified this also with Nextcloud 16.0.3 + Onlyoffice App 2.4.0 + files_versions 1.9.0 + files_external 1.7.0

@winvan
Copy link

winvan commented Jul 31, 2019

I have same error. Onlyoffice, nextcloud and all NC apps updated to latest stable versions.

@winvan
Copy link

winvan commented Jul 31, 2019

When i disable "Versions" app, i get other error in NC:

[no app in context] Error: OCP\Files\NotFoundException: File with id "653843" has not been found. at <<closure>>

 0. /var/www/nextcloud/apps/activity/lib/FilesHooks.php line 664
    OC\Files\View->getPath(653843)
 1. /var/www/nextcloud/apps/activity/lib/FilesHooks.php line 190
    OCA\Activity\FilesHooks->getSourcePathAndOwner("/Общие папки/Об ... x")
 2. /var/www/nextcloud/apps/activity/lib/FilesHooks.php line 157
    OCA\Activity\FilesHooks->addNotificationsForFileAction("/Общие папки/Об ... x", "file_changed", "changed_self", "changed_by")
 3. /var/www/nextcloud/apps/activity/lib/FilesHooksStatic.php line 55
    OCA\Activity\FilesHooks->fileUpdate("/Общие папки/Об ... x")
 4. /var/www/nextcloud/lib/private/legacy/hook.php line 106
    OCA\Activity\FilesHooksStatic::fileUpdate({run: true,path: ... "})
 5. /var/www/nextcloud/lib/private/Files/View.php line 1273
    OC_Hook::emit("OC_Filesystem", "post_update", {run: true,path: ... "})
 6. /var/www/nextcloud/lib/private/Files/View.php line 1201
    OC\Files\View->runHooks(["update","write"], "/Общие папки/Об ... x", true)
 7. /var/www/nextcloud/lib/private/Files/View.php line 694
    OC\Files\View->basicOperation("file_put_contents", "/admin/files/Об ... x", ["update","write"], null)
 8. /var/www/nextcloud/lib/private/Files/Node/File.php line 66
    OC\Files\View->file_put_contents("/admin/files/Об ... x", null)
 9. /var/www/nextcloud/apps/onlyoffice/controller/callbackcontroller.php line 439
    OC\Files\Node\File->putContent(null)
10. /var/www/nextcloud/lib/private/AppFramework/Http/Dispatcher.php line 166
    OCA\Onlyoffice\Controller\CallbackController->track("eyJ0eXAiOiJKV1Q ... 8", ["97E606A0-6777-4163-A927-D617E73119B3"], "624112445", 2, "https://docsrv. ... x", null)
11. /var/www/nextcloud/lib/private/AppFramework/Http/Dispatcher.php line 99
    OC\AppFramework\Http\Dispatcher->executeController(OCA\Onlyoffice\C ... {}, "track")
12. /var/www/nextcloud/lib/private/AppFramework/App.php line 126
    OC\AppFramework\Http\Dispatcher->dispatch(OCA\Onlyoffice\C ... {}, "track")
13. /var/www/nextcloud/lib/private/AppFramework/Routing/RouteActionHandler.php line 47
    OC\AppFramework\App::main("OCA\\Onlyoffice ... r", "track", OC\AppFramework\ ... {}, {_route: "onlyoffice.callback.track"})
14. <<closure>>
    OC\AppFramework\Routing\RouteActionHandler->__invoke({_route: "onlyoffice.callback.track"})
15. /var/www/nextcloud/lib/private/Route/Router.php line 297
    undefinedundefinedcall_user_func(OC\AppFramework\ ... {}, {_route: "onlyoffice.callback.track"})
16. /var/www/nextcloud/lib/base.php line 975
    OC\Route\Router->match("/apps/onlyoffice/track")
17. /var/www/nextcloud/index.php line 42
    OC::handleRequest()

POST /apps/onlyoffice/track?doc=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJmaWxlSWQiOjY1Mzg0Mywib3duZXJJZCI6ImFkbWluIiwidG9rZW4iOm51bGwsImFjdGlvbiI6InRyYWNrIn0.JQUt2HjGiEeJpLJj_IFox65M_8WZhj02FPY3_wsx0q8
from 192.168.39.35 by 97E606A0-6777-4163-A927-D617E73119B3 at 2019-07-31T12:53:28+00:00

File ID (653843) is a ID of file that i try to edit. File was saved after editing with same ID

@msumm
Copy link

msumm commented Aug 20, 2019

I had to experience the same issue.
[Nextcloud 16.0.3 + Onlyoffice App 2.4.0 + files_versions 1.9.0 + files_external 1.7.0]

Files from a shared folder being located on an external WebDav-Folder that have been edited with the OnlyOffice App were not saved back to Nextcloud and hence not updated on the external storage.

Disabling the Versions App fixed that problem (apart from the ~1min delay the OnlyOffice Document Server needs to convert/write/send the document back to Nextcloud).
Thanks for pointing out this Hot-fix!

Is there any work in progress to solve this issue?

Besides that the problem remains, that the collaborative editing is not reported reliably by the Activity App. Consecutive editing by different users is not tracked by the Activity App, at least not within a certain time interval (several hours). This problem has already been described in other threads.

@jannishuebl
Copy link

Hi,
I am facing the same issue, the hotfix with the versions app helps, but the file only gets saved after I close the tab of the editor. The autosaving is not working. Is there some "force save" going on when the tab gets closed? Could this be triggered manually?

@timm2k
Copy link
Author

timm2k commented Sep 9, 2019

but the file only gets saved after I close the tab of the editor.
This is the normal behavior of OnlyOffice.

@LinneyS
Copy link
Member

LinneyS commented Sep 14, 2019

@juliushaertl

@rasos
Copy link

rasos commented Sep 16, 2019

Force save would be great - and getting some confirmation that saving was successful.

@juliusknorr
Copy link
Contributor

I cannot reproduce the issue, could you share your actual external storage config?

@jakeh999
Copy link

I'm having the exact same issue, and disabling the Versions app seems to have resolved it. [NC 16.0.5, OO App 3.0.2, OO Server 5.4.1, Versions 1.9.0, PHP 7.3.10]

@juliushaertl My external storage setup is something like this: Local storage, with previews and sharing (obviously) enabled. It should be noted that encryption is enabled on the main storage, but disabled on the external storage.

@timm2k
Copy link
Author

timm2k commented Oct 21, 2019

you'll find my config at https://cloud.uol.de/s/XWpZQ6ZRLtfk9Rd @juliushaertl

@timm2k
Copy link
Author

timm2k commented Nov 8, 2019

Are there any news on this? I also can provide access to a test system if your not able to reproduce it on your own @juliushaertl .

@juliusknorr
Copy link
Contributor

I've pushed a possible fix to #162 - testing is very welcome

@timm2k
Copy link
Author

timm2k commented Nov 15, 2019

Works for me 👍 🚀

@jakeh999
Copy link

Works for me as well! Thanks a lot @juliushaertl!

@LinneyS
Copy link
Member

LinneyS commented Dec 16, 2019

Hello to all
please check version 4.0.0

@LinneyS LinneyS removed the help wanted Extra attention is needed label Dec 16, 2019
@timm2k
Copy link
Author

timm2k commented Dec 17, 2019

I can confirm that the problem is resolved in 4.0.0.

Thanks :-)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working external storage
Projects
None yet
Development

No branches or pull requests

8 participants