nextcloud / nextcloud/richdocuments

"Document loading failed" when clicking on the most-recently-saved version in "Versions" when already open

Open
#5,903 3 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

Describe the bug
A clear and concise description of what the bug is.

To Reproduce
Steps to reproduce the behavior:

  1. Load an existing document in Collabora Online
  2. Make a change and save
  3. Use "share" and go to "Versions"
  4. The most recently saved version will be listed as e.g. "You 4 seconds ago"
  5. Click that version
  6. Document loading failed

Expected behavior
The most recent version, which is presumably not "versioned" but is just the normal document, should be presented

Screenshots
Image

Nextcloud log (richdocuments), 09:01:36 UTC:

getFile failed: /246facfc-.../files_versions/whatever.ods.v1784796246
Exception: OCP\Files\NotFoundException
userAgent: COOLWSD HTTP Agent 26.04.2.2snapshot

Stack: WopiController::getFile -> IVersionManager::getVersionFile ->
LegacyVersionsBackend::getVersionFile -> Folder::get (throws
NotFoundException).

Collabora coolwsd log, same moment (16 identical retries, 09:01:36 to
09:02:00 UTC):

WOPI::GetFile [https://.../richdocuments/wopi/files/2829613_ocytfm4ehh09_whatever/contents?access_token=&access_token_ttl=0&permission=readonly] failed with Status Code: 403 (Forbidden)

Server details

Nextcloud version:
Nextcloud 33.0.6.2

Version of the richdocuments app
richdocuments 12.0.0

Version of Collabora Online
Collabora Online / COOLWSD 26.04.2.2snapshot

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 tracing the reported stack from WopiController::getFile through IVersionManager::getVersionFile, LegacyVersionsBackend::getVersionFile, and Folder::get. Reproduce the Versions workflow with a recently saved document and use the Nextcloud and Collabora logs to compare the requested version path and WOPI response. Done means clicking the newest saved version opens the document instead of producing a loading failure.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
api, backend
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Active
Clarity
Mostly clear
Newbie friendliness
55/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.