Skip to content

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

Open

Description

@JetsonPaul

⚠️ 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

  1. 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.
  2. Change a file in a small, actively used folder from another device.
  3. 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

Activity

  1. Rello commented on Oct 29, 2026

    @Rello
    Collaborator

    File Provider is scanning all materialised folders due to a wrong expectation here. due to this, all folders are always scanned.

    Lock changes don't propagate etags, so dirs with visible children must be enumerated.

    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

  2. added
    os: 🍎 macOSApple macOS, formerly also known as OS X
    feature: 📁 file providermacOS File Provider Extension, more general also known as virtual file system.
    on Oct 29, 2026
  3. i2h3 commented on Oct 29, 2026

    @i2h3
    Collaborator

    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.

  4. added theissue type on Oct 29, 2026
  5. added this to the 35.0.2 milestone on Oct 29, 2026
  6. assigned and unassigned on Oct 29, 2026
  7. Rello commented on Oct 29, 2026

    @Rello
    Collaborator

    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

    // We want to check the lock state of this file after the lock time has expired
    if(serverEntry.locked == SyncFileItem::LockStatus::LockedItem && serverEntry.lockTimeout > 0) {
    const auto lockExpirationTime = serverEntry.lockTime + serverEntry.lockTimeout;
    const auto timeRemaining = QDateTime::currentDateTime().secsTo(QDateTime::fromSecsSinceEpoch(lockExpirationTime));
    // Add on a second as a precaution, sometimes we catch the server before it has had a chance to update
    const auto lockExpirationTimeout = qMax(5LL, timeRemaining + 1);
    _discoveryData->_anotherSyncNeeded = true;
    _discoveryData->_filesNeedingScheduledSync.insert(path._original, lockExpirationTimeout);
    } else if (serverEntry.locked == SyncFileItem::LockStatus::UnlockedItem && dbEntry._lockstate._locked) {
    // We have received data that this file has been unlocked remotely, so let's notify the sync engine
    // that we no longer need a scheduled sync run for this file
    _discoveryData->_filesUnscheduleSync.append(path._original);

    @mgallien

  8. modified the milestones: 35.0.2, 35.0.3 on Oct 30, 2026
  9. Rello commented on Oct 30, 2026

    @Rello
    Collaborator

    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

    Image
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    feature: 📁 file providermacOS File Provider Extension, more general also known as virtual file system.os: 🍎 macOSApple macOS, formerly also known as OS X

    Type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions