owncloud / ocis

:atom_symbol: ownCloud Infinite Scale Stack
https://doc.owncloud.com/ocis/next/
Apache License 2.0
1.4k stars 183 forks source link

Cannot open office document from a public link #4382

Closed wkloucek closed 2 years ago

wkloucek commented 2 years ago

Describe the bug

On a public link, you can't edit office files with Collabora / OnlyOffice

Steps to reproduce

Steps to reproduce the behavior:

  1. Upload office document files as user
  2. share them via public link
  3. try to edit them on the public link with Collabora /onlyOffice

Expected behavior

The document can be edited.

Actual behavior

The document cannot be edited.

wopiserver log:

ocis_wopi-wopiserver-1  | INFO:wopiserver:"module": "cs3iface", "msg": "Invoked stat", "fileref": "4c55e405-553a-4e2b-8306-f6db7e51bdbf", "trace": "00000000000000000000000000000000", "inode": "1284d238-aa92-42ce-bdc4-0b0000009157-NGM1NWU0MDUtNTUzYS00ZTJiLTgzMDYtZjZkYjdlNTFiZGJm", "filepath": "869198b4-2987-44fe-a1a5-caaa5f16f79f/file-sample_1MB.odt", "elapsedTimems": "6.8"
ocis_wopi-wopiserver-1  | {"time": "2022-08-11T06:25:46.270", "host": "d2fd77ffe090", "level": "INFO", "process": "wopiserver", "module": "cs3iface", "msg": "Invoked stat", "fileref": "4c55e405-553a-4e2b-8306-f6db7e51bdbf", "trace": "00000000000000000000000000000000", "inode": "1284d238-aa92-42ce-bdc4-0b0000009157-NGM1NWU0MDUtNTUzYS00ZTJiLTgzMDYtZjZkYjdlNTFiZGJm", "filepath": "869198b4-2987-44fe-a1a5-caaa5f16f79f/file-sample_1MB.odt", "elapsedTimems": "6.8"}
ocis_wopi-wopiserver-1  | INFO:wopiserver:"module": "wopiutils", "msg": "Access token generated", "userid": "SG6Qhg-uuZMDp0YyyQqQ", "wopiuser": "53472996-65c3-4bf6-b5fc-99d22082efa2@https://ocis.owncloud.test", "mode": "ViewMode.READ_WRITE", "endpoint": "1284d238-aa92-42ce-bdc4-0b0000009157$53472996-65c3-4bf6-b5fc-99d22082efa2", "filename": "869198b4-2987-44fe-a1a5-caaa5f16f79f/file-sample_1MB.odt", "inode": "1284d238-aa92-42ce-bdc4-0b0000009157-NGM1NWU0MDUtNTUzYS00ZTJiLTgzMDYtZjZkYjdlNTFiZGJm", "mtime": "1660198933", "folderurl": "/", "appname": "Collabora", "expiration": "1660285546", "token": "u-fEpM7cZIf99V-yTr6o"
ocis_wopi-wopiserver-1  | {"time": "2022-08-11T06:25:46.271", "host": "d2fd77ffe090", "level": "INFO", "process": "wopiserver", "module": "wopiutils", "msg": "Access token generated", "userid": "SG6Qhg-uuZMDp0YyyQqQ", "wopiuser": "53472996-65c3-4bf6-b5fc-99d22082efa2@https://ocis.owncloud.test", "mode": "ViewMode.READ_WRITE", "endpoint": "1284d238-aa92-42ce-bdc4-0b0000009157$53472996-65c3-4bf6-b5fc-99d22082efa2", "filename": "869198b4-2987-44fe-a1a5-caaa5f16f79f/file-sample_1MB.odt", "inode": "1284d238-aa92-42ce-bdc4-0b0000009157-NGM1NWU0MDUtNTUzYS00ZTJiLTgzMDYtZjZkYjdlNTFiZGJm", "mtime": "1660198933", "folderurl": "/", "appname": "Collabora", "expiration": "1660285546", "token": "u-fEpM7cZIf99V-yTr6o"}
ocis_wopi-wopiserver-1  | INFO:wopiserver:"module": "cs3iface", "msg": "Invoked stat", "fileref": "4c55e405-553a-4e2b-8306-f6db7e51bdbf", "trace": "00000000000000000000000000000000", "inode": "1284d238-aa92-42ce-bdc4-0b0000009157-NGM1NWU0MDUtNTUzYS00ZTJiLTgzMDYtZjZkYjdlNTFiZGJm", "filepath": "869198b4-2987-44fe-a1a5-caaa5f16f79f/file-sample_1MB.odt", "elapsedTimems": "2.9"
ocis_wopi-wopiserver-1  | {"time": "2022-08-11T06:25:55.957", "host": "d2fd77ffe090", "level": "INFO", "process": "wopiserver", "module": "cs3iface", "msg": "Invoked stat", "fileref": "4c55e405-553a-4e2b-8306-f6db7e51bdbf", "trace": "00000000000000000000000000000000", "inode": "1284d238-aa92-42ce-bdc4-0b0000009157-NGM1NWU0MDUtNTUzYS00ZTJiLTgzMDYtZjZkYjdlNTFiZGJm", "filepath": "869198b4-2987-44fe-a1a5-caaa5f16f79f/file-sample_1MB.odt", "elapsedTimems": "2.9"}
ocis_wopi-wopiserver-1  | {"time": "2022-08-11T06:25:55.958", "host": "d2fd77ffe090", "level": "INFO", "process": "wopiserver", "module": "wopiutils", "msg": "Access token generated", "userid": "yWFrM9_yq_N2jCRN3VXk", "wopiuser": "53472996-65c3-4bf6-b5fc-99d22082efa2@https://ocis.owncloud.test", "mode": "ViewMode.READ_WRITE", "endpoint": "1284d238-aa92-42ce-bdc4-0b0000009157$53472996-65c3-4bf6-b5fc-99d22082efa2", "filename": "869198b4-2987-44fe-a1a5-caaa5f16f79f/file-sample_1MB.odt", "inode": "1284d238-aa92-42ce-bdc4-0b0000009157-NGM1NWU0MDUtNTUzYS00ZTJiLTgzMDYtZjZkYjdlNTFiZGJm", "mtime": "1660198933", "folderurl": "/", "appname": "Collabora", "expiration": "1660285555", "token": "IOJjl7WC7da7-TdFN6tg"}
ocis_wopi-wopiserver-1  | INFO:wopiserver:"module": "wopiutils", "msg": "Access token generated", "userid": "yWFrM9_yq_N2jCRN3VXk", "wopiuser": "53472996-65c3-4bf6-b5fc-99d22082efa2@https://ocis.owncloud.test", "mode": "ViewMode.READ_WRITE", "endpoint": "1284d238-aa92-42ce-bdc4-0b0000009157$53472996-65c3-4bf6-b5fc-99d22082efa2", "filename": "869198b4-2987-44fe-a1a5-caaa5f16f79f/file-sample_1MB.odt", "inode": "1284d238-aa92-42ce-bdc4-0b0000009157-NGM1NWU0MDUtNTUzYS00ZTJiLTgzMDYtZjZkYjdlNTFiZGJm", "mtime": "1660198933", "folderurl": "/", "appname": "Collabora", "expiration": "1660285555", "token": "IOJjl7WC7da7-TdFN6tg"
ocis_wopi-wopiserver-1  | DEBUG:wopiserver:"module": "wopiutils", "msg": "Checkfileinfo: client context", "user": "yWFrM9_yq_N2jCRN3VXk", "filename": "869198b4-2987-44fe-a1a5-caaa5f16f79f/file-sample_1MB.odt", "token": "IOJjl7WC7da7-TdFN6tg", "deviceId": "None", "reqId": "None", "sessionId": "None", "app": "None", "appEndpoint": "None", "correlationId": "None", "wopits": "63795795956.186935"
ocis_wopi-wopiserver-1  | {"time": "2022-08-11T06:25:56.200", "host": "d2fd77ffe090", "level": "DEBUG", "process": "wopiserver", "module": "wopiutils", "msg": "Checkfileinfo: client context", "user": "yWFrM9_yq_N2jCRN3VXk", "filename": "869198b4-2987-44fe-a1a5-caaa5f16f79f/file-sample_1MB.odt", "token": "IOJjl7WC7da7-TdFN6tg", "deviceId": "None", "reqId": "None", "sessionId": "None", "app": "None", "appEndpoint": "None", "correlationId": "None", "wopits": "63795795956.186935"}
ocis_wopi-wopiserver-1  | INFO:wopiserver:"module": "cs3iface", "msg": "Failed stat", "fileref": "869198b4-2987-44fe-a1a5-caaa5f16f79f/file-sample_1MB.odt", "trace": "00000000000000000000000000000000", "reason": "gateway could not find space for ref=resource_id:<storage_id:'1284d238-aa92-42ce-bdc4-0b0000009157' opaque_id:'869198b4-2987-44fe-a1a5-caaa5f16f79f' space_id:'53472996-65c3-4bf6-b5fc-99d22082efa2' > path:'./file-sample_1MB.odt' "
ocis_wopi-wopiserver-1  | {"time": "2022-08-11T06:25:56.211", "host": "d2fd77ffe090", "level": "INFO", "process": "wopiserver", "module": "cs3iface", "msg": "Failed stat", "fileref": "869198b4-2987-44fe-a1a5-caaa5f16f79f/file-sample_1MB.odt", "trace": "00000000000000000000000000000000", "reason": "gateway could not find space for ref=resource_id:<storage_id:'1284d238-aa92-42ce-bdc4-0b0000009157' opaque_id:'869198b4-2987-44fe-a1a5-caaa5f16f79f' space_id:'53472996-65c3-4bf6-b5fc-99d22082efa2' > path:'./file-sample_1MB.odt' "}
ocis_wopi-wopiserver-1  | INFO:wopiserver:"module": "wopi", "msg": "Requested file not found", "filename": "869198b4-2987-44fe-a1a5-caaa5f16f79f/file-sample_1MB.odt", "token": "IOJjl7WC7da7-TdFN6tg", "error": "No such file or directory"
ocis_wopi-wopiserver-1  | {"time": "2022-08-11T06:25:56.212", "host": "d2fd77ffe090", "level": "INFO", "process": "wopiserver", "module": "wopi", "msg": "Requested file not found", "filename": "869198b4-2987-44fe-a1a5-caaa5f16f79f/file-sample_1MB.odt", "token": "IOJjl7WC7da7-TdFN6tg", "error": "No such file or directory"}
ocis_wopi-wopiserver-1  | {"time": "2022-08-11T06:25:58.877", "host": "d2fd77ffe090", "level": "DEBUG", "process": "wopiserver", "module": "wopiutils", "msg": "Checkfileinfo: client context", "user": "yWFrM9_yq_N2jCRN3VXk", "filename": "869198b4-2987-44fe-a1a5-caaa5f16f79f/file-sample_1MB.odt", "token": "IOJjl7WC7da7-TdFN6tg", "deviceId": "None", "reqId": "None", "sessionId": "None", "app": "None", "appEndpoint": "None", "correlationId": "None", "wopits": "63795795958.862885"}
ocis_wopi-wopiserver-1  | DEBUG:wopiserver:"module": "wopiutils", "msg": "Checkfileinfo: client context", "user": "yWFrM9_yq_N2jCRN3VXk", "filename": "869198b4-2987-44fe-a1a5-caaa5f16f79f/file-sample_1MB.odt", "token": "IOJjl7WC7da7-TdFN6tg", "deviceId": "None", "reqId": "None", "sessionId": "None", "app": "None", "appEndpoint": "None", "correlationId": "None", "wopits": "63795795958.862885"
ocis_wopi-wopiserver-1  | INFO:wopiserver:"module": "cs3iface", "msg": "Failed stat", "fileref": "869198b4-2987-44fe-a1a5-caaa5f16f79f/file-sample_1MB.odt", "trace": "00000000000000000000000000000000", "reason": "gateway could not find space for ref=resource_id:<storage_id:'1284d238-aa92-42ce-bdc4-0b0000009157' opaque_id:'869198b4-2987-44fe-a1a5-caaa5f16f79f' space_id:'53472996-65c3-4bf6-b5fc-99d22082efa2' > path:'./file-sample_1MB.odt' "
ocis_wopi-wopiserver-1  | INFO:wopiserver:"module": "wopi", "msg": "Requested file not found", "filename": "869198b4-2987-44fe-a1a5-caaa5f16f79f/file-sample_1MB.odt", "token": "IOJjl7WC7da7-TdFN6tg", "error": "No such file or directory"
ocis_wopi-wopiserver-1  | {"time": "2022-08-11T06:25:58.888", "host": "d2fd77ffe090", "level": "INFO", "process": "wopiserver", "module": "cs3iface", "msg": "Failed stat", "fileref": "869198b4-2987-44fe-a1a5-caaa5f16f79f/file-sample_1MB.odt", "trace": "00000000000000000000000000000000", "reason": "gateway could not find space for ref=resource_id:<storage_id:'1284d238-aa92-42ce-bdc4-0b0000009157' opaque_id:'869198b4-2987-44fe-a1a5-caaa5f16f79f' space_id:'53472996-65c3-4bf6-b5fc-99d22082efa2' > path:'./file-sample_1MB.odt' "}
ocis_wopi-wopiserver-1  | {"time": "2022-08-11T06:25:58.889", "host": "d2fd77ffe090", "level": "INFO", "process": "wopiserver", "module": "wopi", "msg": "Requested file not found", "filename": "869198b4-2987-44fe-a1a5-caaa5f16f79f/file-sample_1MB.odt", "token": "IOJjl7WC7da7-TdFN6tg", "error": "No such file or directory"}

Setup

wopiserver 8.3.3 oCIS https://github.com/owncloud/ocis/commit/cf8533cbb90dd8128ec614db8f36103f9453bbc5

-> oCIS wopi deployment example

Additional context

pmaier1 commented 2 years ago

Turns out to be a regression. Needs fixing for GA.

C0rby commented 2 years ago

The reva part of the fix is here: https://github.com/cs3org/reva/pull/3257

C0rby commented 2 years ago

And here is the ocis part: https://github.com/owncloud/ocis/pull/4631