nextcloud / nextcloud/richdocuments

File remains locked when leaving Nextcloud Office using browser Back button

Open
#5,962 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
JavaScript
Stars
453
Forks
147
Avg merge
14h 54m
Merged PRs (30d)
83

Description

Steps to reproduce
  1. Create a new .docx document.
  2. Open it in Nextcloud Office.
  3. Edit the document.
  4. Save (autosave is enough).
  5. Leave the editor using the browser Back button instead of "Close file".
  6. Try to delete the document.
Expected behaviour

The editing session should be closed and the WOPI lock released.
The document should be deletable.

Actual behaviour

The document remains locked by Nextcloud Office.

The user receives a permission/lock error when trying to delete it.

If the document is closed using the "Close file" button instead of the browser Back button, the lock is released correctly and the document can be deleted.

Logs

WebDAV:

Sabre\DAV\Exception\Locked

richdocuments:

No error message (empty exception)

Environment

Nextcloud 34.0.2

richdocuments 11.1.0

richdocumentscode 26.4.104

Redis enabled for file locking

Ubuntu Server 20.04

Browser tested:
Microsoft Edge 151 (Chromium)

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing the browser Back-button flow with Nextcloud 34.0.2, richdocuments 11.1.0, and richdocumentscode 26.4.104, then compare it with the Close file flow. Trace where the editing session and WOPI lock are released; done means the lock is released after Back and the document can be deleted without a WebDAV Locked error.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
backend, web-dev
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
52/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.