Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

[Bug] Lock owned by another client (e.g. Text app) cannot be unlocked from the app

Open Beginner friendly
#17,837 0 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

@falkloewert is already working on this.

Since Oct 18, 2026.

  • #17838 by @falkloewert — open

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
72/100
Issue type
Bug
Clarity
Clearly specified
Activity status
Active
Tech stack
android, kotlin
Domain
mobile

Research direction

Read FileLockingHelper.canUserUnlockFile() and trace how the overflow menu uses its result to show the unlock action. Compare the client check with the server rule described in the issue, including the caveat for group folders and external storage. Done when the file owner can unlock a file owned by them and the behavior is covered by a relevant test.

Written by the indexing model from the issue text.

Description

Steps to reproduce
  1. Open a Markdown/text file in the Text app (web or Android) and close it without releasing the lock (tab killed, connection lost, app swiped away).
  2. files_lock keeps the lock with owner text.
  3. Open that file's overflow menu in the Nextcloud Android app.
Actual behaviour

The file is shown as locked (lock icon, "Locked by Text app — expires in …"), but the menu has no "Unlock file" entry. FileLockingHelper.canUserUnlockFile() only returns true when lockOwnerId == userId, so the file owner is never offered the action.

With the default lock_timeout = -1 the lock never expires; edits then fail with ManuallyLockedException / HTTP 423 and are only recoverable from the web UI (or by waiting for a configured timeout).

Expected behaviour

The file owner can unlock. The server already allows this — OCA\FilesLock\Service\LockService::canUnlock():

if ($request->getType() === ILock::TYPE_USER && $isFileOwner) {
    return;
}
Possible fix

Also accept the file owner in FileLockingHelper (file.ownerId == userId), mirroring the server check. I'm preparing a PR.

Caveat: for group folders and external storage the server deliberately skips the file-owner check, so the client cannot mirror the rule exactly there.

Environment
  • Server: Nextcloud 34 (AIO), files_lock 34.0.1
  • Client: current Play release
  • File in personal storage
Dominant language
Kotlin
Stars
5.6k
Forks
2k
Avg merge
2d 4h
Merged PRs (30d)
92

Getting set up

Open in Codespaces

Starts the project's dev container in your browser, under your own GitHub account.

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.

More from nextcloud/android

All issues in nextcloud/android

Similar issues

More Kotlin issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.