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 if files_versions is enabled and file is located on files_external storage #722

Open
ZID-TU-Graz-Collab opened this issue Oct 18, 2022 · 3 comments

Comments

@ZID-TU-Graz-Collab
Copy link

similar to #660

We were affected by #660 and updated already to Nextcloud 24.0.6 which should include the patch (nextcloud/server#33804), but we still get an error an the document is not saved back, if the file is located on an SMB storage.

Bildschirmfoto 2022-09-12 um 12 07 04(1)

Stack trace
{"reqId":"****","level":3,"time":"2022-10-18T09:18:29+00:00","remoteAddr":"*****","user":"dokolade","app":"index","method":"POST","url":"/index.php/apps/onlyoffice/track?doc=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9*****","message":"OCA\\Files_Versions\\Command\\Expire::__construct(): Argument #2 ($fileName) must be of type string, null given, called in /path/to/nextcloud/apps/files_versions/lib/Storage.php on line 743 in file '/path/to/nextcloud/apps/files_versions/lib/Command/Expire.php' line 46","userAgent":"Node.js/6.13","version":"24.0.6.1","exception":{"Exception":"Exception","Message":"OCA\\Files_Versions\\Command\\Expire::__construct(): Argument #2 ($fileName) must be of type string, null given, called in /path/to/nextcloud/apps/files_versions/lib/Storage.php on line 743 in file '/path/to/nextcloud/apps/files_versions/lib/Command/Expire.php' line 46","Code":0,"Trace":[{"file":"/path/to/nextcloud/lib/private/AppFramework/App.php","line":172,"function":"dispatch","class":"OC\\AppFramework\\Http\\Dispatcher","type":"->"},{"file":"/path/to/nextcloud/lib/private/Route/Router.php","line":298,"function":"main","class":"OC\\AppFramework\\App","type":"::"},{"file":"/path/to/nextcloud/lib/base.php","line":1030,"function":"match","class":"OC\\Route\\Router","type":"->"},{"file":"/path/to/nextcloud/index.php","line":36,"function":"handleRequest","class":"OC","type":"::"}],"File":"/path/to/nextcloud/lib/private/AppFramework/Http/Dispatcher.php","Line":165,"Previous":{"Exception":"TypeError","Message":"OCA\\Files_Versions\\Command\\Expire::__construct(): Argument #2 ($fileName) must be of type string, null given, called in /path/to/nextcloud/apps/files_versions/lib/Storage.php on line 743","Code":0,"Trace":[{"file":"/path/to/nextcloud/apps/files_versions/lib/Storage.php","line":743,"function":"__construct","class":"OCA\\Files_Versions\\Command\\Expire","type":"->"},{"file":"/path/to/nextcloud/apps/files_versions/lib/Versions/LegacyVersionsBackend.php","line":90,"function":"scheduleExpire","class":"OCA\\Files_Versions\\Storage","type":"::"},{"file":"/path/to/nextcloud/apps/files_versions/lib/Versions/VersionManager.php","line":92,"function":"createVersion","class":"OCA\\Files_Versions\\Versions\\LegacyVersionsBackend","type":"->"},{"file":"/path/to/nextcloud/apps/files_versions/lib/Storage.php","line":230,"function":"createVersion","class":"OCA\\Files_Versions\\Versions\\VersionManager","type":"->"},{"file":"/path/to/nextcloud/apps/files_versions/lib/Hooks.php","line":56,"function":"store","class":"OCA\\Files_Versions\\Storage","type":"::"},{"file":"/path/to/nextcloud/lib/private/legacy/OC_Hook.php","line":106,"function":"write_hook","class":"OCA\\Files_Versions\\Hooks","type":"::"},{"file":"/path/to/nextcloud/lib/private/Files/View.php","line":1290,"function":"emit","class":"OC_Hook","type":"::"},{"file":"/path/to/nextcloud/lib/private/Files/View.php","line":1160,"function":"runHooks","class":"OC\\Files\\View","type":"->"},{"file":"/path/to/nextcloud/lib/private/Files/View.php","line":711,"function":"basicOperation","class":"OC\\Files\\View","type":"->"},{"file":"/path/to/nextcloud/lib/private/Files/Node/File.php","line":71,"function":"file_put_contents","class":"OC\\Files\\View","type":"->"},{"file":"/path/to/nextcloud/apps/onlyoffice/controller/callbackcontroller.php","line":543,"function":"putContent","class":"OC\\Files\\Node\\File","type":"->"},{"file":"/path/to/nextcloud/apps/onlyoffice/controller/callbackcontroller.php","line":771,"function":"OCA\\Onlyoffice\\Controller\\{closure}","class":"OCA\\Onlyoffice\\Controller\\CallbackController","type":"->","args":["*** sensitive parameters replaced ***"]},{"file":"/path/to/nextcloud/apps/onlyoffice/controller/callbackcontroller.php","line":544,"function":"retryOperation","class":"OCA\\Onlyoffice\\Controller\\CallbackController","type":"->"},{"file":"/path/to/nextcloud/lib/private/AppFramework/Http/Dispatcher.php","line":225,"function":"track","class":"OCA\\Onlyoffice\\Controller\\CallbackController","type":"->"},{"file":"/path/to/nextcloud/lib/private/AppFramework/Http/Dispatcher.php","line":133,"function":"executeController","class":"OC\\AppFramework\\Http\\Dispatcher","type":"->"},{"file":"/path/to/nextcloud/lib/private/AppFramework/App.php","line":172,"function":"dispatch","class":"OC\\AppFramework\\Http\\Dispatcher","type":"->"},{"file":"/path/to/nextcloud/lib/private/Route/Router.php","line":298,"function":"main","class":"OC\\AppFramework\\App","type":"::"},{"file":"/path/to/nextcloud/lib/base.php","line":1030,"function":"match","class":"OC\\Route\\Router","type":"->"},{"file":"/path/to/nextcloud/index.php","line":36,"function":"handleRequest","class":"OC","type":"::"}],"File":"/path/to/nextcloud/apps/files_versions/lib/Command/Expire.php","Line":46},"CustomMessage":"--"}}

Versions:

  • nextcloud: 24.0.6
  • onlyoffice: 7.2.0 (docker images)
@javielico
Copy link

Same issue here, documents are lost and versions not available, any thoughts?

@JeanBaptisteLouvet
Copy link

JeanBaptisteLouvet commented Nov 4, 2022

I'm experiencing the same issue and after several tests on my server (NextCloud 24.0.6, OnlyOffice 7.5.8), this behavior is quite strange as it is not happening in all the folders of my cloud. In fact it's happening in only one folder and I don't find a repeatable process to trigger somewhere else.

It may be related to #740 as the folder having this bug in my cloud had a public share, but I deleted it and it didn't change anything.

@wittj
Copy link

wittj commented Jul 21, 2023

I have a similar problem that documents cannot be saved back after editing. It is reproducable for me

Versions:

  • nextcloud 27.0.1
  • versions app 1.20.0
  • collabora office (latest version, but doesn't seem to matter)
  • nextcloud app for Android (dev version, but doesn't seem to matter)

Steps to reproduce:

  • Share a document from user A for user B (read/write access), files_external_storage is not involved in my case
  • As user B edit shared document using nextcloud app for Android
  • Save document back

Actual result:

  • Document is not saved back, nextcloud logging displays exception

Findings:

  • When disabling version app saving the document works for me, after re-enabling error occurs
  • error was introduced after nextcloud update to 27.0.0, not sure whether version app had an update in this context

[index] Error: Exception: OC\Files\View::basicOperation(): Argument #2 ($path) must be of type string, null given, called in /var/www/html/lib/private/Files/View.php on line 518 in file '/var/www/html/lib/private/Files/View.php' line 1110 at <>

  1. /var/www/html/lib/private/AppFramework/App.php line 183
    OC\AppFramework\Http\Dispatcher->dispatch(["OCA\Richdocum ... "], "putFile")
  2. /var/www/html/lib/private/Route/Router.php line 315
    OC\AppFramework\App::main("OCA\Richdocume ... r", "putFile", ["OC\AppFramewo ... "], ["23650_oc2cec09 ... "])
  3. /var/www/html/lib/base.php line 1071
    OC\Route\Router->match("/apps/richdocum ... s")
  4. /var/www/html/index.php line 36
    OC::handleRequest()

Caused by:

TypeError: OC\Files\View::basicOperation(): Argument #2 ($path) must be of type string, null given, called in /var/www/html/lib/private/Files/View.php on line 518 at <>

  1. /var/www/html/lib/private/Files/View.php line 518
    OC\Files\View->basicOperation("file_exists", null)
  2. /var/www/html/lib/private/Files/Filesystem.php line 545
    OC\Files\View->file_exists(null)
  3. /var/www/html/apps/files_versions/lib/Storage.php line 189
    OC\Files\Filesystem::file_exists(null)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants