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

Simultanious editing broken in 2.0.0 with file_lock enabled #419

Closed
small1 opened this issue Mar 17, 2023 · 15 comments · Fixed by #423
Closed

Simultanious editing broken in 2.0.0 with file_lock enabled #419

small1 opened this issue Mar 17, 2023 · 15 comments · Fixed by #423
Labels
bug Something isn't working

Comments

@small1
Copy link

small1 commented Mar 17, 2023

Describe the bug
Create a document and share it. Both users opens it bit doesnt see that someone lese is in the document.

To Reproduce
Steps to reproduce the behavior:

  1. create document
  2. share it wiuth another user
  3. both opens the document
  4. They cant see eachother. Turn off the lock and it works as before

Expected behavior
Both users should see that a document is opened by another user and be able to co edit.

Screenshots
With temp lock app enabled and two users in the same document:
Screenshot from 2023-03-17 12-05-41

Without temp lock app:
Screenshot from 2023-03-17 12-06-28

Server details

Operating system: ubuntu 20.04

Web server: Apache

Database: mysql

PHP version: 8.1

Nextcloud version: 25.0.3

Version of the officeonline app 2.0.0
Version of files_lock app 26.0.0

Version of Office Online server 16.0.10396.20000

Logs

Nextcloud log (data/nextcloud.log)

nothing related in the log

Browser log

Nothing related here
@small1 small1 changed the title Simultanious editing broken Simultanious editing broken in 2.0.0 with file_lock enabled Mar 17, 2023
@small1
Copy link
Author

small1 commented Mar 20, 2023

It only affects Microsoft word for some odd reason as well. Excel and pptx works.

@juliusknorr
Copy link
Member

Could you check if setting a manual lock timeout makes any difference there?

E.g. this for 30 minutes:

./occ config:app:set --value '30' files_lock lock_timeout

@enoch85 enoch85 added the bug Something isn't working label Mar 20, 2023
@enoch85
Copy link
Member

enoch85 commented Mar 20, 2023

Could you check if setting a manual lock timeout makes any difference there?

We have manual lock timeout already enabled:

sudo -u www-data php /www/nextcloud/occ config:app:get files_lock lock_timeout
480

Also some additional logs:

{"reqId":"PIEOFeFCEIg1z0brPPEK","level":4,"time":"2023-03-20T07:31:49+00:00","remoteAddr":"192.36.25.2","user":"--","app":"officeonline","method":"POST","url":"/index.php/apps/officeonline/wopi/files/58409_oc5edb4zg8e0?access_token=YWTxz4dRUMrizeFSw237z1W2BEyz9Ppr&access_token_ttl=0","message":"Lock file files_lock/a0116ef7-3b20-4051-a672-3b8583828773 request: {\"S\":\"5fdbf29c-0e44-4950-84ce-ec7b05914d55\",\"F\":4,\"E\":2,\"M\":\"f5668eee9a184213ad570a5993fb2017\",\"P\":\"B48763D1-B920-487D-9055-751D95613F1E\"}","userAgent":"MSWAC","version":"25.0.3.2","data":{"app":"officeonline"}}

@small1
Copy link
Author

small1 commented Mar 20, 2023

Tested on one more setup. Same results on that. Also tested with lock_timeout set on that system. same result.

@small1
Copy link
Author

small1 commented Mar 20, 2023

[officeonline] Fatal: Lock file files_lock/d02a6c3c-0048-4a61-85ad-1cb0d7cc0e69 request: {"S":"7e1add37-3979-4b4e-a629-aee24fa9c87e","F":4}

POST /index.php/apps/officeonline/wopi/files/4310_ocy9w4k6qk92?access_token=eGXQOqXBBrTCndfzpDR2r11SxU4PxBAr&access_token_ttl=0
from 172.16.104.10 at 2023-03-20T08:11:56+00:00

[officeonline] Fatal: Lock file files_lock/d02a6c3c-0048-4a61-85ad-1cb0d7cc0e69 request: {"S":"7e1add37-3979-4b4e-a629-aee24fa9c87e","F":4,"E":2,"M":"544f99d81e534ba0b23f5bdf5529b6f2","P":"68AD882B-8BE9-4205-95B9-33E39FE798CF"}

POST /index.php/apps/officeonline/wopi/files/4310_ocy9w4k6qk92?access_token=eGXQOqXBBrTCndfzpDR2r11SxU4PxBAr&access_token_ttl=0
from 172.16.104.10 at 2023-03-20T08:11:56+00:00

Is in the log files. And the file doesnt get locked.

@juliusknorr
Copy link
Member

I've pushed #423 which seems to resolve the issue here. Will do a bit more testing before pushing this to review but if anyone wants to give that a try, further testing is very welcome.

@small1
Copy link
Author

small1 commented Mar 27, 2023

I have tested it and it seems that it is working. Will do some more tests to double check as well so nothing is broken :)

@enoch85
Copy link
Member

enoch85 commented Mar 27, 2023

Also tested, and works!

@small1
Copy link
Author

small1 commented Mar 28, 2023

Problem is solved to edit online. Perhaps this is a separate issue. But it seems like officeonline doesnt respect the personal lock made. A document is not opened up read only if another user has locked it for local edit.

@small1
Copy link
Author

small1 commented Mar 28, 2023

At one point one editor got two users as well. And when everyone left officeonline the file is still locked by officeonline

@juliusknorr
Copy link
Member

Which browser did you use? I noticed that this is an issue with chrome but also found reports about this being an issue of office online itself.

@enoch85
Copy link
Member

enoch85 commented Mar 30, 2023

OK, a test scenario on Firefox

  1. User A: Create a new Word file online/locally ( tested online)
  2. User A: Write something in that file from the online editor and close it
  3. User A: Share the file with User B
  4. User A: Open it locally
  5. User B: Hit F5 online and notice it's locked by User A
  6. User A: Write something in your local document and hit save
  7. User A: Notice that the file is now saved locally and synced to Nextcloud (keep the document open locally)
  8. User B: Open it online and write something
  9. User B: Gets this warning:
    image
  10. User B: Close the document online
  11. User A: Close the document locally
  12. User B: Open the document online and write something = same issue, the file is still locked by User A
  13. User B: Close the document online
  14. User A: Unlock the document
  15. User B: Open the document online and write something = now it works, file is unlocked - keep the document open
  16. User A: Can't open the document since it's locked by user B online.

To sum up, everything seems to work as expected on Firefox.

@enoch85
Copy link
Member

enoch85 commented Apr 4, 2023

I know the issue is closed, but it doesn't work as expected still. We tested with Chrome and the issue persists even with the suggested workaround - setting a automated unlock.

Also, no logs in Nextcloud at all, and the only thing I could get was an access log that looked like below. This is in a state where the file is open locally by user A, and user B opens it online. The file is editable by user B, and the changes are saved, so if user A closes the document and opens it again, the changes from user B are present.

[IPv6 IP] - - [04/Apr/2023:10:00:08 +0200] "GET /apps/officeonline/index?fileId=59995&requesttoken=1uCHHIiXT5ZAM22W8G0erDr1cHDnHFHfLkWxucUhFWM%3D%3AgbjfRL7Ye%2BBwXQHCkQwn9WKnARmyJB2Pfn3b4KBOLFU%3D&path=%2FDelade%20dokument%2FFilipaDaniel.docx HTTP/1.1" 200 21964 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/111.0.0.0 Safari/537.36"
192.36.25.2 - - [04/Apr/2023:10:00:09 +0200] "GET /index.php/apps/officeonline/wopi/files/59995_oc5edb4zg8e0?access_token=7ruIqQ9764EOP5JqVRiXMobiQbt5A6rW&access_token_ttl=0 HTTP/1.1" 200 464 "-" "MSWAC"
192.36.25.2 - - [04/Apr/2023:10:00:09 +0200] "POST /index.php/apps/officeonline/wopi/files/59995_oc5edb4zg8e0?access_token=7ruIqQ9764EOP5JqVRiXMobiQbt5A6rW&access_token_ttl=0 HTTP/1.1" 200 2 "-" "MSWAC"
192.36.25.2 - - [04/Apr/2023:10:00:09 +0200] "GET /index.php/apps/officeonline/wopi/files/59995_oc5edb4zg8e0/contents?access_token=7ruIqQ9764EOP5JqVRiXMobiQbt5A6rW&access_token_ttl=0 HTTP/1.1" 200 12042 "-" "MSWAC"
192.36.25.2 - - [04/Apr/2023:10:00:09 +0200] "POST /index.php/apps/officeonline/wopi/files/59995_oc5edb4zg8e0?access_token=7ruIqQ9764EOP5JqVRiXMobiQbt5A6rW&access_token_ttl=0 HTTP/1.1" 200 2 "-" "MSWAC"
[IPv6 IP] - - [04/Apr/2023:10:00:09 +0200] "POST /apps/text/session/sync HTTP/1.1" 200 298 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/111.0.0.0 Safari/537.36"

@enoch85
Copy link
Member

enoch85 commented Apr 5, 2023

Follow up on this issue: #428

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

Successfully merging a pull request may close this issue.

3 participants