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 and shared via folder #660

Closed
timm2k opened this issue Jun 28, 2022 · 5 comments
Labels
bug Something isn't working

Comments

@timm2k
Copy link

timm2k commented Jun 28, 2022

Hi,

since we've updated OnlyOffice App to 5.4.2 with Nextcloud 22.2.9 and DocumentServer 7.1.1 some documents are not saved back to Nextcloud. This comes into place if files_versions is enabled and the file is stored on SMB and is shared via folder to other users directly.
I get following exception:

{"reqId":"t5xkQb4ujAJ9ZNVVaQ1A","level":3,"time":"2022-06-28T11:06:18+02:00","remoteAddr":"10.20.30.40","user":"user1","app":"index","method":"POST","url":"/apps/onlyoffice/track?doc=<removed>","message":"{\"Exception\":\"Exception\",\"Message\":\"Call to a member function getId() on bool\",\"Code\":0,\"Trace\":[{\"file\":\"/var/www/html/nextcloud/lib/private/AppFramework/App.php\",\"line\":156,\"function\":\"dispatch\",\"class\":\"OC\\\\AppFramework\\\\Http\\\\Dispatcher\",\"type\":\"->\",\"args\":[{\"__class__\":\"OCA\\\\Onlyoffice\\\\Controller\\\\CallbackController\"},\"track\"]},{\"file\":\"/var/www/html/nextcloud/lib/private/Route/Router.php\",\"line\":302,\"function\":\"main\",\"class\":\"OC\\\\AppFramework\\\\App\",\"type\":\"::\",\"args\":[\"OCA\\\\Onlyoffice\\\\Controller\\\\CallbackController\",\"track\",{\"__class__\":\"OC\\\\AppFramework\\\\DependencyInjection\\\\DIContainer\"},[\"onlyoffice.callback.track\"]]},{\"file\":\"/var/www/html/nextcloud/lib/base.php\",\"line\":1008,\"function\":\"match\",\"class\":\"OC\\\\Route\\\\Router\",\"type\":\"->\",\"args\":[\"/apps/onlyoffice/track\"]},{\"file\":\"/var/www/html/nextcloud/index.php\",\"line\":36,\"function\":\"handleRequest\",\"class\":\"OC\",\"type\":\"::\",\"args\":[]}],\"File\":\"/var/www/html/nextcloud/lib/private/AppFramework/Http/Dispatcher.php\",\"Line\":158,\"Previous\":{\"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\":56,\"function\":\"store\",\"class\":\"OCA\\\\Files_Versions\\\\Storage\",\"type\":\"::\",\"args\":[\"/Home-Cloud/Spreadsheet1.xlsx\"]},{\"file\":\"/var/www/html/nextcloud/lib/private/legacy/OC_Hook.php\",\"line\":106,\"function\":\"write_hook\",\"class\":\"OCA\\\\Files_Versions\\\\Hooks\",\"type\":\"::\",\"args\":[[true,\"/Home-Cloud/Spreadsheet1.xlsx\"]]},{\"file\":\"/var/www/html/nextcloud/lib/private/Files/View.php\",\"line\":1284,\"function\":\"emit\",\"class\":\"OC_Hook\",\"type\":\"::\",\"args\":[\"OC_Filesystem\",\"write\",[true,\"/Home-Cloud/Spreadsheet1.xlsx\"]]},{\"file\":\"/var/www/html/nextcloud/lib/private/Files/View.php\",\"line\":1154,\"function\":\"runHooks\",\"class\":\"OC\\\\Files\\\\View\",\"type\":\"->\",\"args\":[[\"update\",\"write\"],\"/Home-Cloud/Spreadsheet1.xlsx\"]},{\"file\":\"/var/www/html/nextcloud/lib/private/Files/View.php\",\"line\":706,\"function\":\"basicOperation\",\"class\":\"OC\\\\Files\\\\View\",\"type\":\"->\",\"args\":[\"file_put_contents\",\"/user2/files/Home-Cloud/Spreadsheet1.xlsx\",[\"update\",\"write\"],null]},{\"file\":\"/var/www/html/nextcloud/lib/private/Files/Node/File.php\",\"line\":71,\"function\":\"file_put_contents\",\"class\":\"OC\\\\Files\\\\View\",\"type\":\"->\",\"args\":[\"/user2/files/Home-Cloud/Spreadsheet1.xlsx\",null]},{\"file\":\"/var/www/html/nextcloud/apps/onlyoffice/controller/callbackcontroller.php\",\"line\":543,\"function\":\"putContent\",\"class\":\"OC\\\\Files\\\\Node\\\\File\",\"type\":\"->\",\"args\":[null]},{\"file\":\"/var/www/html/nextcloud/apps/onlyoffice/controller/callbackcontroller.php\",\"line\":771,\"function\":\"OCA\\\\Onlyoffice\\\\Controller\\\\{closure}\",\"class\":\"OCA\\\\Onlyoffice\\\\Controller\\\\CallbackController\",\"type\":\"->\",\"args\":[\"*** sensitive parameters replaced ***\"]},{\"file\":\"/var/www/html/nextcloud/apps/onlyoffice/controller/callbackcontroller.php\",\"line\":544,\"function\":\"retryOperation\",\"class\":\"OCA\\\\Onlyoffice\\\\Controller\\\\CallbackController\",\"type\":\"->\",\"args\":[{\"__class__\":\"Closure\"}]},{\"file\":\"/var/www/html/nextcloud/lib/private/AppFramework/Http/Dispatcher.php\",\"line\":217,\"function\":\"track\",\"class\":\"OCA\\\\Onlyoffice\\\\Controller\\\\CallbackController\",\"type\":\"->\",\"args\":[\"<removed>\",[\"ocid_user1\"],\"3184343962\",2,\"https://oo.example.net/cache/files/3184343962_1342/output.xlsx/output.xlsx?md5=V3yjpwO_kRNb4hUZSXB94Q&expires=1656408079&filename=output.xlsx\",null,[\"7.1.1\",[[\"2022-06-28 09:06:05\",[\"ocid_user1\",\"[email protected]\"]]]],\"https://oo.example.net/cache/files/3184343962_1342/changes.zip/changes.zip?md5=HZWaTJAe0c5p53UA79Rseg&expires=1656408079&filename=changes.zip\",null,[[0,\"ocid_user1\"]]]},{\"file\":\"/var/www/html/nextcloud/lib/private/AppFramework/Http/Dispatcher.php\",\"line\":126,\"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\":156,\"function\":\"dispatch\",\"class\":\"OC\\\\AppFramework\\\\Http\\\\Dispatcher\",\"type\":\"->\",\"args\":[{\"__class__\":\"OCA\\\\Onlyoffice\\\\Controller\\\\CallbackController\"},\"track\"]},{\"file\":\"/var/www/html/nextcloud/lib/private/Route/Router.php\",\"line\":302,\"function\":\"main\",\"class\":\"OC\\\\AppFramework\\\\App\",\"type\":\"::\",\"args\":[\"OCA\\\\Onlyoffice\\\\Controller\\\\CallbackController\",\"track\",{\"__class__\":\"OC\\\\AppFramework\\\\DependencyInjection\\\\DIContainer\"},[\"onlyoffice.callback.track\"]]},{\"file\":\"/var/www/html/nextcloud/lib/base.php\",\"line\":1008,\"function\":\"match\",\"class\":\"OC\\\\Route\\\\Router\",\"type\":\"->\",\"args\":[\"/apps/onlyoffice/track\"]},{\"file\":\"/var/www/html/nextcloud/index.php\",\"line\":36,\"function\":\"handleRequest\",\"class\":\"OC\",\"type\":\"::\",\"args\":[]}],\"File\":\"/var/www/html/nextcloud/apps/files_versions/lib/Storage.php\",\"Line\":181},\"CustomMessage\":\"--\"}","userAgent":"Node.js/6.13","version":"22.2.9.1"

more eye-friendly:

{

    "reqId":"t5xkQb4ujAJ9ZNVVaQ1A",
    "level":3,
    "time":"2022-06-28T11:06:18+02:00",
    "remoteAddr":"10.20.30.40",
    "user":"user1",
    "app":"index",
    "method":"POST",
    "url":"/apps/onlyoffice/track?doc=<removed>",
    "message":
{

    \"Exception\":\"Exception\",
    \"Message\":\"Call to a member function getId() on bool\",
    \"Code\":0,
    \"Trace\":[
        {
            \"file\":\"/var/www/html/nextcloud/lib/private/AppFramework/App.php\",
            \"line\":156,
            \"function\":\"dispatch\",
            \"class\":\"OC\\\\AppFramework\\\\Http\\\\Dispatcher\",
            \"type\":\"->\",
            \"args\":[
                {
                    \"__class__\":\"OCA\\\\Onlyoffice\\\\Controller\\\\CallbackController\"
                },
                \"track\"
            ]
        },
        {
            \"file\":\"/var/www/html/nextcloud/lib/private/Route/Router.php\",
            \"line\":302,
            \"function\":\"main\",
            \"class\":\"OC\\\\AppFramework\\\\App\",
            \"type\":\"::\",
            \"args\":[
                \"OCA\\\\Onlyoffice\\\\Controller\\\\CallbackController\",
                \"track\",
                {
                    \"__class__\":\"OC\\\\AppFramework\\\\DependencyInjection\\\\DIContainer\"
                },
                [
                    \"onlyoffice.callback.track\"
                ]
            ]
        },
        {
            \"file\":\"/var/www/html/nextcloud/lib/base.php\",
            \"line\":1008,
            \"function\":\"match\",
            \"class\":\"OC\\\\Route\\\\Router\",
            \"type\":\"->\",
            \"args\":[
                \"/apps/onlyoffice/track\"
            ]
        },
        {
            \"file\":\"/var/www/html/nextcloud/index.php\",
            \"line\":36,
            \"function\":\"handleRequest\",
            \"class\":\"OC\",
            \"type\":\"::\",
            \"args\":[
            ]
        }
    ],
    \"File\":\"/var/www/html/nextcloud/lib/private/AppFramework/Http/Dispatcher.php\",
    \"Line\":158,
    \"Previous\":{
        \"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\":56,
                \"function\":\"store\",
                \"class\":\"OCA\\\\Files_Versions\\\\Storage\",
                \"type\":\"::\",
                \"args\":[
                    \"/Home-Cloud/Spreadsheet1.xlsx\"
                ]
            },
            {
                \"file\":\"/var/www/html/nextcloud/lib/private/legacy/OC_Hook.php\",
                \"line\":106,
                \"function\":\"write_hook\",
                \"class\":\"OCA\\\\Files_Versions\\\\Hooks\",
                \"type\":\"::\",
                \"args\":[
                    [
                        true,
                        \"/Home-Cloud/Spreadsheet1.xlsx\"
                    ]
                ]
            },
            {
                \"file\":\"/var/www/html/nextcloud/lib/private/Files/View.php\",
                \"line\":1284,
                \"function\":\"emit\",
                \"class\":\"OC_Hook\",
                \"type\":\"::\",
                \"args\":[
                    \"OC_Filesystem\",
                    \"write\",
                    [
                        true,
                        \"/Home-Cloud/Spreadsheet1.xlsx\"
                    ]
                ]
            },
            {
                \"file\":\"/var/www/html/nextcloud/lib/private/Files/View.php\",
                \"line\":1154,
                \"function\":\"runHooks\",
                \"class\":\"OC\\\\Files\\\\View\",
                \"type\":\"->\",
                \"args\":[
                    [
                        \"update\",
                        \"write\"
                    ],
                    \"/Home-Cloud/Spreadsheet1.xlsx\"
                ]
            },
            {
                \"file\":\"/var/www/html/nextcloud/lib/private/Files/View.php\",
                \"line\":706,
                \"function\":\"basicOperation\",
                \"class\":\"OC\\\\Files\\\\View\",
                \"type\":\"->\",
                \"args\":[
                    \"file_put_contents\",
                    \"/user2/files/Home-Cloud/Spreadsheet1.xlsx\",
                    [
                        \"update\",
                        \"write\"
                    ],
                    null
                ]
            },
            {
                \"file\":\"/var/www/html/nextcloud/lib/private/Files/Node/File.php\",
                \"line\":71,
                \"function\":\"file_put_contents\",
                \"class\":\"OC\\\\Files\\\\View\",
                \"type\":\"->\",
                \"args\":[
                    \"/user2/files/Home-Cloud/Spreadsheet1.xlsx\",
                    null
                ]
            },
            {
                \"file\":\"/var/www/html/nextcloud/apps/onlyoffice/controller/callbackcontroller.php\",
                \"line\":543,
                \"function\":\"putContent\",
                \"class\":\"OC\\\\Files\\\\Node\\\\File\",
                \"type\":\"->\",
                \"args\":[
                    null
                ]
            },
            {
                \"file\":\"/var/www/html/nextcloud/apps/onlyoffice/controller/callbackcontroller.php\",
                \"line\":771,
                \"function\":\"OCA\\\\Onlyoffice\\\\Controller\\\\{closure
            }\"
        ]\"class\":\"OCA\\\\Onlyoffice\\\\Controller\\\\CallbackController\",\"type\":\"->\",\"args\":[\"*** sensitive parameters replaced ***\"]
    },
    {\"file\":\"/var/www/html/nextcloud/apps/onlyoffice/controller/callbackcontroller.php\",
    \"line\":544,
    \"function\":\"retryOperation\",
    \"class\":\"OCA\\\\Onlyoffice\\\\Controller\\\\CallbackController\",
    \"type\":\"->\",
    \"args\":[
        {
            \"__class__\":\"Closure\"
        }
    ]

},
\"file\":\"/var/www/html/nextcloud/lib/private/AppFramework/Http/Dispatcher.php\",
    \"line\":217,
    \"function\":\"track\",
    \"class\":\"OCA\\\\Onlyoffice\\\\Controller\\\\CallbackController\",
    \"type\":\"->\",
    \"args\":[
        \"<removed>\",
        [
            \"ocid_user1\"
        ],
        \"3184343962\",
        2,
        \"https://oo.example.net/cache/files/3184343962_1342/output.xlsx/output.xlsx?md5=V3yjpwO_kRNb4hUZSXB94Q&expires=1656408079&filename=output.xlsx\",
        null,
        [
            \"7.1.1\",
            [
                [
                    \"2022-06-28 09:06:05\",
                    [
                        \"ocid_user1\",
                        \"[email protected]\"
                    ]
                ]
            ]
        ],
        \"https://oo.example.net/cache/files/3184343962_1342/changes.zip/changes.zip?md5=HZWaTJAe0c5p53UA79Rseg&expires=1656408079&filename=changes.zip\",
        null,
        [
            [
                0,
                \"ocid_user1\"
            ]
        ]
    ]

},
{

    \"file\":\"/var/www/html/nextcloud/lib/private/AppFramework/Http/Dispatcher.php\",
    \"line\":126,
    \"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\":156,
    \"function\":\"dispatch\",
    \"class\":\"OC\\\\AppFramework\\\\Http\\\\Dispatcher\",
    \"type\":\"->\",
    \"args\":[
        {
            \"__class__\":\"OCA\\\\Onlyoffice\\\\Controller\\\\CallbackController\"
        },
        \"track\"
    ]

},
{

    \"file\":\"/var/www/html/nextcloud/lib/private/Route/Router.php\",
    \"line\":302,
    \"function\":\"main\",
    \"class\":\"OC\\\\AppFramework\\\\App\",
    \"type\":\"::\",
    \"args\":[
        \"OCA\\\\Onlyoffice\\\\Controller\\\\CallbackController\",
        \"track\",
        {
            \"__class__\":\"OC\\\\AppFramework\\\\DependencyInjection\\\\DIContainer\"
        },
        [
            \"onlyoffice.callback.track\"
        ]
    ]

},
{

    \"file\":\"/var/www/html/nextcloud/lib/base.php\",
    \"line\":1008,
    \"function\":\"match\",
    \"class\":\"OC\\\\Route\\\\Router\",
    \"type\":\"->\",
    \"args\":[
        \"/apps/onlyoffice/track\"
    ]

},
{

    \"file\":\"/var/www/html/nextcloud/index.php\",
    \"line\":36,
    \"function\":\"handleRequest\",
    \"class\":\"OC\",
    \"type\":\"::\",
    \"args\":[
    ]

}],\"File\":\"/var/www/html/nextcloud/apps/files_versions/lib/Storage.php\",\"Line\":181},\"CustomMessage\":\"--\"}

"userAgent":"Node.js/6.13",
"version":"22.2.9.1"

Kind Regads,
Timm

@timm2k timm2k changed the title Regression: Documents not saved back to Nextcloud when file is shared and stored on files_external and files_versions is enabled Documents not saved back to Nextcloud Jun 28, 2022
@timm2k timm2k changed the title Documents not saved back to Nextcloud Documents not saved back to Nextcloud if files_versions is enabled Jun 28, 2022
@timm2k timm2k changed the title Documents not saved back to Nextcloud if files_versions is enabled Documents not saved back to Nextcloud if files_versions is enabled and file is located on files_external storage Jun 28, 2022
@timm2k timm2k changed the title Documents not saved back to Nextcloud if files_versions is enabled and file is located on files_external storage Documents not saved back to Nextcloud if files_versions is enabled and file is located on files_external storage and shared via folder Jun 28, 2022
@timm2k
Copy link
Author

timm2k commented Jun 28, 2022

If I disable files_versions saving this document works fine.
If I share a files directly document is saved but no version is taken.

Steps to reproduce

  • check for files_versions is enabled
  • have two users: u1, u2
  • u1: use files_external to mount a SMB share
  • u1: create folder F1 on SMB share
  • u1: create spreadsheet1.xlsx in F1
  • u1: use OnlyOffice to edit spreadsheet1.xlsx
  • u1: check for new versions after edit (should be created)
  • u1: share F1 with u2
  • u2: use OnlyOffice to edit spreadsheet1.xlsx
  • u2: close spreadsheet1.xlsx and see no update happens
  • admin: check nextcloud.log for exception
  • u1: share spreadsheet1.xlsx to u2 directly
  • u2: use OnlyOffice to edit spreadsheet1.xlsx
  • u2: close spreadsheet1.xlsx and see update happens but no new version is created

@timm2k
Copy link
Author

timm2k commented Jun 28, 2022

Regression of #118

@alexanderonlyoffice
Copy link

@timm2k, we are working on the issue and will fix it in the next version of the connector for Nextcloud. I cannot specify any time frames at the moment, as the version is in development.

@LinneyS
Copy link
Member

LinneyS commented Oct 4, 2022

Fixed by nextcloud/server#33804

@kintaro1981
Copy link

Same problem here. 😢
I'm on Nextcloud (Storage Share from Hetzner) with Onlyoffice activated.

I really want to runaway from Google Drive but with this issue I can't. 😞

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

No branches or pull requests

4 participants