nextcloud / nextcloud/server

[Bug] Federated share changes don't reach the desktop client (with notify_push) until you open the web UI

Open
#61,612 6 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

0. Needs triage bug feature: federation feature: global scale feature: sharing
Dominant language
PHP
Stars
36.9k
Forks
5.2k
Avg merge
2d 3h
Merged PRs (30d)
713

Description

With notify_push enabled, changes to a federated share don't reach the desktop client. If someone edits a file in a folder shared to me from another server, my desktop client never picks it up. A newly shared federated folder has the same problem. Both show up fine in the web UI, and the moment I open the folder in the web, the desktop client catches up.

Shares between users on the same server work fine. It's only federated (server-to-server) shares.

Steps to reproduce

  1. Two servers A and B set up with federation, notify_push running on B.
  2. A user on A shares a folder with a user on B, who accepts it.
  3. On A, edit a file in that folder.
  4. Watch B's desktop client. The change doesn't arrive.
  5. Open the folder in B's web UI. Now the desktop client syncs it.

Why I think it happens

As far as I can tell, notify_push only reacts to changes in the local file cache. A federated mount is pulled from the other server on demand, so B's file cache only updates when something actually lists the folder (like opening it in the web). Nothing tells B that the remote changed, so notify_push has nothing to send.

Looks like the same family as nextcloud/notify_push#86 (that one was groupfolders), so non-home storages in general seem to have this gap.

Possible fix

The sending server already knows when a shared file changes. Could it tell the receiving server over federation so the receiver re-scans that folder? That would update the receiver's file cache, and notify_push would work the same as it does for local shares. There already seems to be a federation notification channel for things like accept/unshare that could maybe carry an "updated"
message. A poll from the receiving side would work too but feels expensive at scale.

Can help test if useful.

Seen on 32, also reproduced on current master.

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 how notify_push handles federated mounts and how the existing federation notification channel handles share events. Reproduce the issue with servers A and B, then compare cache updates and desktop notifications before and after opening the web UI. Done means federated changes reach the desktop client without opening the folder, while same-server shares continue to work.

Written by the indexing model from the issue text.

Assessment

Tech stack
php
Domain
backend, distributed-systems
Issue type
Bug
Difficulty
5/5
Estimated time
Over a week
Activity status
Active
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.