Repository navigation
macOS File Provider: remote changes take minutes to hours to arrive because every push notification triggers a sequential depth-1 PROPFIND scan of the whole working set (~2,850 folders) #11152
Description
⚠️ Before submitting, please verify the following: ⚠️
- This is a bug, not a question or a configuration issue.
- This issue is not already reported on Github (I have searched for it).
- Nextcloud Server and Desktop Client are up to date.
- I agree to follow Nextcloud's Code of Conduct
Bug description
In File Provider mode, changes made on the server by other devices reach this Mac very slowly. The web UI shows them immediately. The push notification also reaches the Mac immediately. The File Provider extension then takes minutes, sometimes much longer, before it reports the change to macOS.
The logs show why. A push notification ("Received file ID changes for locally known metadata. Signalling enumerator.") does not lead to a lookup of the file IDs it contains. Instead it signals the working set, and the extension runs a working-set remote-change scan. That scan sends one depth-1 PROPFIND per materialised folder, sequentially, at roughly one folder per second. The folders that contain the change are not read first.
On this account the working set holds about 2,850 materialised folders. Most of them are archive folders that have not changed for months:
| Area (names anonymised) | Distinct folders read by the scan on 2026-10-28 | Last change on the server |
|---|---|---|
Zotero/… (Zotero data directory, one folder per attachment in storage/) |
1,503 | ongoing (Zotero on another machine) |
| Archive tree A (1,610 folders, 42,454 entries) | 1,185 | content last written 2026-03-19, newest file mtime 2026-06-30 |
| Archive tree B | 95 | – |
| everything else, including the actively edited Obsidian vaults | ~66 | daily |
Request volume of the extension (NextcloudKit log, FileProviderExt/Data/Documents/Logs/):
| Day | PROPFIND | GET | PUT |
|---|---|---|---|
| 2026-10-27 | 6,912 | – | – |
| 2026-10-28 (until 15:19) | 12,126 | 472 | 7 |
Single unchanged folders are read again and again. Two folders in archive tree A, unchanged since March, were read 23 and 31 times on 2026-10-28.
Delay between push notification and delivered change batch, 2026-10-28 09:00–15:25 while the Mac was in use (domain log File Provider Domains/<domain>/Logs/*.jsonl): 190 push signals. The time until the next completed change batch (Reporting change batch … moreComing: false) was:
| median | p75 | p90 | max |
|---|---|---|---|
| 2.6 min | 3.8 min | 12.4 min | 24.4 min |
The next completed batch does not always contain the change, because a scan does not necessarily reach the affected folder (see the example below). So these figures are a lower bound. Over the whole log period since 2026-10-26 18:11 (evenings and nights included), p90 was 92 min and the maximum was 296 min.
Incomplete scans make it worse. When a single folder read fails, the scan logs Working-set remote-change scan was incomplete: N item(s) could not be read and were skipped; … Not advancing the working-set sync point past the undiscovered changes. Since 2026-10-26 the read failures were 726× 502 Bad gateway (nightly server backup window around 04:00), 262× -1009 and 188× -1005. Incomplete scans skipped up to 545 items. Since the sync point does not advance, the next scan starts over.
The working set cannot be reduced by the user. For a materialised folder, fileproviderctl evaluate reports capabilities = 603979839 (no allowsEvicting) and displayEvict = 0, so Finder offers no "Remove Download". Only "Reset File Provider Domain" empties the working set.
Concrete example (2026-10-28, CET)
A Markdown note in an Obsidian vault (<vault>/<folder>/<subfolder>/note.md), edited on a Windows desktop client (35.0.0, classic sync). Server timestamps are from audit.log, client timestamps from the extension logs.
| Time | Event |
|---|---|
| 14:28:25, 14:28:59 | Windows client uploads the note |
| 14:28:25, 14:28:59 | Mac extension receives the push notification (same second) |
| 14:29:05, 14:32:13, 14:48:16, 14:51:36, 14:55:46 | Five completed change batches on the Mac |
| 14:30:11 | The scan reads the grandparent folder <folder>, but not <subfolder> that contains the note |
| 14:56:53 | Mac downloads the note, 28 minutes after the push |
| 15:16:59, 15:17:10 | Obsidian on the Mac saves the note; the extension uploads byte-identical content (same MD5 as the 14:28 version) |
| 15:17:01–15:17:27 | Windows client sees a new remote version while it has a local edit → creates a conflict copy |
| 15:20:51 | Mac downloads the resolved version (3.5 min) |
Between 14:00 and 15:22 the Mac did not read <subfolder> once. During the same time it read hundreds of unchanged folders deep inside archive tree A.
The slow propagation has a direct consequence for anyone who edits the same notes on two machines: the Mac keeps an outdated copy for a long time, an app on the Mac writes it back, and the other client ends up with a conflict.
Steps to reproduce
- Use File Provider mode with a large working set: many materialised folders, e.g. after opening a deep folder tree or after an app has scanned a large folder tree in the sync folder.
- Change a file in a small, actively used folder from another device.
- Watch the extension logs: the push arrives immediately, then the working-set scan walks through all materialised folders. The change appears only when the scan reaches its folder, or when an app on the Mac happens to open the file.
Expected behavior
- A push notification that carries file IDs should lead to a targeted lookup of those IDs (or of their parent folders) before, or instead of, a full working-set scan.
- A working-set scan should use the etag of a parent folder to skip unchanged subtrees instead of reading every materialised folder.
- A transient read error (5xx, network loss) on one folder should not force the next scan to repeat the whole working set.
- The user should be able to evict a folder tree ("Remove Download") so that it leaves the working set.
Which files are affected by this bug
All files changed on the server by other devices.
Operating system
macOS
Which version of the operating system you are running.
macOS 26.6.2 (25G83), Apple Silicon
Installation method
Official Installer for macOS 13 and later
Nextcloud Server version
34.0.5
Nextcloud Desktop Client version
35.0.0
Did this occur after an update or on a clean installation?
Major version update (i.e. 4.0.0 → 33.0.0)
Are you using the Nextcloud Server Encryption module?
No
Are you using an external user-backend?
- Default internal user-backend
Nextcloud Server logs
Nothing relevant. The server answers every PROPFIND within about a second (p99 ≤ 1 s); the delay is entirely client side.Additional info
- Server: Nextcloud All-in-One 34.0.5, PostgreSQL, Redis,
notify_pushandfiles_lockenabled. - The File Provider domain was reset on 2026-10-13 (see macOS File Provider: orphaned metadata of remotely deleted/moved folders is never purged, causing endless 404 parent lookups #11056). The domain Realm database is 115 MB again.
- The extension also logged 967
MaterializedEnumerationObserver: Updating item state to dataless.messages since 2026-10-26, which looks like the loop from macOS FileProviderExt: MaterializedEnumerationObserver re-marks the same items "dataless" in a non-converging loop, starving all sync operations on large accounts (34.0.1) #10558 (closed). It is not clear whether that is related. - Related, but different: New items from other devices do not appear #10070 (new items take up to 91 min to appear), macOS Tahoe 26.5.1: Virtual Files reports "Everything synced" although server changes are not downloaded #10334 (server changes not downloaded), One unreadable folder silently stalls ALL remote→local sync (working-set scan aborts on first read error) #10442 (scan aborted on the first read error, fixed; now items are skipped but the sync point is not advanced), macOS FileProviderExt: MaterializedEnumerationObserver re-marks the same items "dataless" in a non-converging loop, starving all sync operations on large accounts (34.0.1) #10558 (dataless loop), macOS File Provider: orphaned metadata of remotely deleted/moved folders is never purged, causing endless 404 parent lookups #11056 (orphaned metadata, my earlier report).
- I can provide the full extension logs privately. They contain personal file and folder names.
Activity
Rello commentedon Oct 29, 2026
File Provider is scanning all materialised folders due to a wrong expectation here. due to this, all folders are always scanned.
https://github.com/nextcloud/desktop/blob/master/shell_integration/MacOSX/NextcloudFileProviderKit/Sources/NextcloudFileProviderKit/Enumeration/Enumerator%2BWorkingSetScan.swift#L221-L236
This statement is not correct because the files locking app is propagating etag updates
https://github.com/nextcloud/files_lock/blob/v33.0.6/lib/Service/LockService.php#L482-L488
But there is one gap in files locking (to be discussed there): The missing propagation is in specific paths such as renewal and expiry cleanup.
Classic & Win VFS client is relying on the etag filter.
The too-deep-scan was introduced with this PR: #10252
If we remove the wrong assumption in the File Provider, we should be able to restore the performance again.
@i2h3 @claucambra
i2h3 commentedon Oct 29, 2026
This is a known issue. I did not bother to read the issue description right now. I already know what it is about. Just like I have already worked on a fix and there are related community PRs. But #9046 needs to land first. Probably I also need to link related issues to consolidate duplicate reports.
Rello commentedon Oct 29, 2026
related server PR that fixes an unclean expiry case - so this also propagates the eTag correctly
nextcloud/files_lock#1291
after that one, the extra lock-expiry-check on classic/winvfs can also be removed to reduce network requests
desktop/src/libsync/discovery.cpp
Lines 813 to 827 in ce977e3
@mgallien
Rello commentedon Oct 30, 2026
I did a quick local test with some of our big folders on the nc instance.
what makes this even more important is that now also the file locks are delivered instantly. These were also part of the delay before