owncloud / ocis

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

File in collabora opens in read-only mode for the owner #3936

Closed ScharfViktor closed 1 year ago

ScharfViktor commented 2 years ago

Test with wopi:

Actual result: file opens in read-only permissions mode

Screenshot 2022-06-08 at 18 01 32

ocis_wopi_collabora log

wsd-00008-00404 2022-06-08 16:05:47.519043 [ docbroker_017 ] WRN  Un-successful WOPI::Lock with status 409, failure reason: "The file is locked by Collabora" and response: {"message": "The file is locked by Collabora"}| wsd/Storage.cpp:977

wsd-00008-00404 2022-06-08 16:05:47.519195 [ docbroker_017 ] ERR  Failed to lock!| wsd/DocumentBroker.cpp:882
wkloucek commented 2 years ago

Looks like a locking race condition. The first Collabora session holds the lock and did not yet release it because it didn't yet save the file. Then the second Collabora session already tries to open the still locked file and fails.

We should at least investigate in how we can improve this.

micbar commented 2 years ago

Needs investigation. The unlock should happen.

wkloucek commented 2 years ago

Needs investigation. The unlock should happen.

The unlock happens. But not as fast as the user opens again that file. And since the session is currently closing, you can't just resume the edit.

C0rby commented 1 year ago

I can't reproduce this with the current master. When I try to close and open the file quickly then collabora show "cleaning up last session" before opening the file as usual.

ScharfViktor commented 1 year ago

Couldn't reproduce it. no log in collabora