nextcloud / files_lock

GNU Affero General Public License v3.0
25 stars 8 forks source link

[edit locally] Automatic unlock is not working #128

Closed enoch85 closed 1 year ago

enoch85 commented 1 year ago

Describe the bug When opening a file locally in i.e. Word, the file is locked for editing (by design) - so far so good. But after the document is saved locally, and Word is closed, the file doesn't get unlocked again. Been waiting for 2 hours now, and finally hit "unlock" manually.

This is with an SSO user, haven't tested with a local user.

To Reproduce Steps to reproduce the behavior:

  1. Create an office file
  2. Edit it online
  3. Close the file
  4. Open it locally
  5. Edit the file locally and save it
  6. Close the file locally
  7. Wait for the file to get unlocked online

Expected behavior File should be unlocked after like 5 minutes or so

Screenshots N/A

Client details:

Server details

Operating system: Ubuntu 20.04

Web server: Apache 2.4

Database: MySQL

PHP version: 7.4

Nextcloud version: 25.0.4

Version of the officeonline app 2.0.0

Version of Office Online server

Logs #### Nextcloud log (data/nextcloud.log) ``` {"reqId":"j5mC6rQbL1eIEDTXglpR","level":4,"time":"2023-03-16T08:27:12+00:00","remoteAddr":"192.36.25.2","user":"ABC","app":"officeonline","method":"POST","url":"/index.php/apps/officeonline/wopi/files/44694_oc5edb4zg8e0?access_token=E8UCUB6FP68sryCYRmS1UregpUFCgScD&access_token_ttl=0","message":"Lock file files_lock/da3fe066-302c-49f0-9fea-3b299a5c255c request: {\"F\":4,\"E\":2,\"L\":\"a0b38536d0074a4dbd46b692969431da\"}","userAgent":"MSWAC","version":"25.0.3.2","data":{"app":"officeonline"}} {"reqId":"8wwGf8MPGGuM3pveUbL6","level":4,"time":"2023-03-16T08:27:12+00:00","remoteAddr":"192.36.25.2","user":"ABC","app":"officeonline","method":"POST","url":"/index.php/apps/officeonline/wopi/files/44694_oc5edb4zg8e0?access_token=E8UCUB6FP68sryCYRmS1UregpUFCgScD&access_token_ttl=0","message":"Lock file files_lock/da3fe066-302c-49f0-9fea-3b299a5c255c request: {\"F\":4,\"E\":2,\"M\":\"a0b38536d0074a4dbd46b692969431da\",\"P\":\"33DA9D2F-8408-4509-B65E-B468AB0E7379\",\"L\":\"a0b38536d0074a4dbd46b692969431da\"}","userAgent":"MSWAC","version":"25.0.3.2","data":{"app":"officeonline"}} {"reqId":"GR3ouKyBJq4fAyDN3iy4","level":4,"time":"2023-03-16T08:28:44+00:00","remoteAddr":"192.36.25.2","user":"ABC","app":"officeonline","method":"POST","url":"/index.php/apps/officeonline/wopi/files/44694_oc5edb4zg8e0?access_token=Zr54jHrpJ1cqoamtbhjVJQFGvmvgfF4y&access_token_ttl=0","message":"Lock file files_lock/d93e598b-6e17-4853-86e8-1467c1265aa2 request: {\"F\":4,\"E\":2,\"L\":\"a0b38536d0074a4dbd46b692969431da\"}","userAgent":"MSWAC","version":"25.0.3.2","data":{"app":"officeonline"}} {"reqId":"IeklpTJH6y9dTaS6IQ6l","level":4,"time":"2023-03-16T08:28:44+00:00","remoteAddr":"192.36.25.2","user":"ABC","app":"officeonline","method":"POST","url":"/index.php/apps/officeonline/wopi/files/44694_oc5edb4zg8e0?access_token=Zr54jHrpJ1cqoamtbhjVJQFGvmvgfF4y&access_token_ttl=0","message":"Lock file files_lock/d93e598b-6e17-4853-86e8-1467c1265aa2 request: {\"F\":4,\"E\":2,\"M\":\"a0b38536d0074a4dbd46b692969431da\",\"P\":\"751DF398-1534-44C0-B848-64C5213EB2E5\",\"L\":\"a0b38536d0074a4dbd46b692969431da\"}","userAgent":"MSWAC","version":"25.0.3.2","data":{"app":"officeonline"}} ``` #### Browser log ``` Insert your browser log here, this could for example include: a) The javascript console log b) The network log c) ... ```
enoch85 commented 1 year ago

We added sudo -u www-data php /srv/www/nextcloud/occ config:app:set --value '15' files_lock lock_timeout but the file is still shown as locked (even if it isn't) in the Windows GUI after 15 minutes. The file needed an manual edit to sync the status of being unlocked.

GUI glitch or a bug? @tobiasKaminsky

juliusknorr commented 1 year ago

This is being tracked in https://github.com/nextcloud/desktop/issues/5576