-
Notifications
You must be signed in to change notification settings - Fork 187
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
Only Office could not be loaded if editor is already open #4366
Comments
Needs some investigation. Is most likely a backend issue, therefore I move this issue to the oCIS Repo |
Seems to be a bug with OnlyOffice. With Collabora, I could open multiple tabs. |
Same happens to me when opening the file with two different users. Logs ocis-wopiserver-1 | ERROR:wopiserver:"module": "cs3iface", "msg": "Failed to setlock", "filepath": "d5efa44e-ff1c-4ee3-a9dd-984142b84d0e/Neue Datei.docx", "appname": "OnlyOffice", "value": "opaquelocktoken:797356a8-0500-4ceb-a8a0-c94c8cde7eba c1h4OGVWck9zeEZYMjNjWFRVQ3phZz09", "trace": "51f62c05d18b1c5e8f41f586988bf78e", "code": "12", "reason": "set lock: error: aborted: already locked"
ocis-wopiserver-1 | {"time": "2022-08-11T09:21:57.844", "host": "dcdeacba2ed2", "level": "ERROR", "process": "wopiserver", "module": "cs3iface", "msg": "Failed to setlock", "filepath": "d5efa44e-ff1c-4ee3-a9dd-984142b84d0e/Neue Datei.docx", "appname": "OnlyOffice", "value": "opaquelocktoken:797356a8-0500-4ceb-a8a0-c94c8cde7eba c1h4OGVWck9zeEZYMjNjWFRVQ3phZz09", "trace": "51f62c05d18b1c5e8f41f586988bf78e", "code": "12", "reason": "set lock: error: aborted: already locked"}
ocis-wopiserver-1 | ERROR:wopiserver:"module": "wopi", "msg": "Unable to store WOPI lock", "lockop": "Lock", "filename": "d5efa44e-ff1c-4ee3-a9dd-984142b84d0e/Neue Datei.docx", "token": "7mPaZ61FOCJbpKKrIwJs", "lock": "sXx8eVrOsxFX23cXTUCzag==", "error": "set lock: error: aborted: already locked"
ocis-wopiserver-1 | {"time": "2022-08-11T09:21:57.846", "host": "dcdeacba2ed2", "level": "ERROR", "process": "wopiserver", "module": "wopi", "msg": "Unable to store WOPI lock", "lockop": "Lock", "filename": "d5efa44e-ff1c-4ee3-a9dd-984142b84d0e/Neue Datei.docx", "token": "7mPaZ61FOCJbpKKrIwJs", "lock": "sXx8eVrOsxFX23cXTUCzag==", "error": "set lock: error: aborted: already locked"}
ocis-onlyoffice-1 | [2022-08-11T09:21:57.850] [ERROR] nodeJS - wopi error LOCK:Error: Error response: statusCode:500; headers:{"content-length":"33","content-type":"text/html; charset=utf-8","date":"Thu, 11 Aug 2022 09:21:57 GMT","server":"waitress"}; body:
ocis-onlyoffice-1 | I/O Error, please contact support
ocis-onlyoffice-1 | at Request._callback (/snapshot/server/build/server/Common/sources/utils.js)
ocis-onlyoffice-1 | at Request.callback (/snapshot/server/build/server/Common/node_modules/request/request.js:185:22)
ocis-onlyoffice-1 | at Request.emit (events.js:400:28)
ocis-onlyoffice-1 | at Request.<anonymous> (/snapshot/server/build/server/Common/node_modules/request/request.js:1154:10)
ocis-onlyoffice-1 | at Request.emit (events.js:400:28)
ocis-onlyoffice-1 | at IncomingMessage.<anonymous> (/snapshot/server/build/server/Common/node_modules/request/request.js:1076:12)
ocis-onlyoffice-1 | at Object.onceWrapper (events.js:519:28)
ocis-onlyoffice-1 | at IncomingMessage.emit (events.js:412:35)
ocis-onlyoffice-1 | at endReadableNT (internal/streams/readable.js:1317:12)
ocis-onlyoffice-1 | at processTicksAndRejections (internal/process/task_queues.js:82:21) |
The cs3org/wopiserver is not behaving accordingly to the wopi spec from here https://docs.microsoft.com/en-us/microsoft-365/cloud-storage-partner-program/rest/files/lock. This is because of a response code in reva changed when trying to lock an already locked file. This would be a workaround on the wopiserver side: https://github.com/wkloucek/wopiserver/pull/3/files. But we should fix it in REVA I think. |
The changed return code was introduced in cs3org/reva#3003 and is here: |
I rember reading docs that mentioned locks and etags but can no longer find them. Hoowever, rereading https://developers.google.com/maps-booking/reference/grpc-api/status_codes I would highlight this:
For me a client-specified test-and-set translates into the http preconditions that the client sents along, which is what WOPI does as well, does it not? That is why I would argue that the GRPC API should use tha ABORTED code. You could argue that if the client does not send the LockID in the request the serler neets to respond with a For now I'd make the wopi client treat @wkloucek does that explanation help? |
hah! In https://cloud.google.com/apis/design/errors#generating_errors you can find:
|
To be clear: when a client sends a request without a condition, eg. please lock file /foo, then the server MUST return a |
will be fixed when cs3org/reva#3157 arrives in oCIS |
* revert some locking status codes back to precondition failed, see also #3003 and owncloud/ocis#4366 * fix unit tests * fix locking response codes in ocdav * fix refresh lock unit test
Will be fixed with 2.0.0-beta.7 |
I could reproduce if same file opened in collabora and only office [Release 2.0.0-beta.7] Steps:
or admin opens file first in collabora, second in only office ocis_wopi_onlyoffice log:
|
Steps to reproduce
Expected behaviour
File should be opened again or the tab with the previously opened file should be focused (if this is at all possible)
Actual behaviour
New tab opens with error message "Sorry, editor could not be loaded. Please contact your administrator."
Environment general
https://ocis.ocis-wopi.latest.owncloud.works/
Client configuration
Browser: Firefox 103.0.1
Operating system: MacOS 12.4
Browser log
No errors visible in console
OnlyOffice.fail.mov
The text was updated successfully, but these errors were encountered: