desktop icon indicating copy to clipboard operation
desktop copied to clipboard

[Bug]: macOS – in-place update 35.0.2 β†’ 35.0.3 leaves FileProviderExt unlaunchable ("peer may have been unloaded", mach_error=10000003); Finder shows "not connected" while client reports "Connected"

Open Radek27 opened this issue 4 weeks ago β€’ 2 comments

⚠️ Before submitting, please verify the following: ⚠️

Bug description

On macOS with File Provider mode enabled, an in-place update of the desktop client (35.0.2 β†’ 35.0.3, installed by the built-in updater while the client was running) leaves the File Provider extension permanently unlaunchable. The main client and Finder then contradict each other, with no way to recover from the UI.

Note: this report was drafted with the help of an AI assistant from the actual client and extension logs on the affected machine; every excerpt is verbatim and the reproduction/workaround was verified by me.

Symptoms: the client is healthy and reports itself connected (AccountState state change: "Disconnected" -> "Connected", /ocs/v1.php/cloud/user returns HTTP 200, push websocket authenticated, avatar and activity load). Finder shows ~/Library/CloudStorage/Nextcloud-<server>-<user> as not connected and asks to sign in; signing in from Finder produces an error and never completes. The directory is listed but empty/unusable, and the extension process is not running at all β€” only FileProviderUIExt (the UI helper that renders the failing prompt) stays alive. No new file appears in ~/Library/Group Containers/NKUJUXUJ3B.com.nextcloud.desktopclient/File Provider Domains/87a83df3-…/Logs/ for the whole broken period, i.e. the extension is never launched again. Every attempt by the client to talk to the domain fails for 20+ minutes with NSCocoaErrorDomain Code=4099 "…Failed to check-in, peer may have been unloaded: mach_error=10000003" and NSCocoaErrorDomain Code=4101 "Couldn't communicate with a helper application" (the latter wrapping SqliteErrorDomain Code=5 "database is locked", UPDATE engine_state SET db_uuid = ?).

A full reboot does not fix it, and re-authenticating does not fix it either: signing out and completing Login Flow v2 successfully (Success getting the appPassword for user: … "Connected") leaves the domain just as unreachable. The 404 responses on /login/v2/poll during that login are the normal "not authorized yet" answers, not the problem. The trigger is the update itself, not the reboot: the first failure is logged 18 seconds after the app bundle was replaced, before the machine was restarted.

Compounding race, reproducible on every launch (healthy or not) β€” the client authenticates the domain before it has read the keychain, twice per start:

11:21:51.845  fileproviderxpc_mac.mm:109  Authenticating file provider domain with identifier "87a83df3-…" as <user> on https://cloud.example.com with EMPTY PASSWORD
11:21:51.878  webflowcredentials.cpp:139  Fetch from keychain!
11:21:53.389  accountstate.cpp:500        Fetched credentials for "https://cloud.example.com" attempting to connect
11:21:54.053  fileproviderxpc_mac.mm:109  Authenticating file provider domain … with SOME PASSWORD

and the extension rejects the first push:

{"date":"2026.11.05 11:00:58.513","level":"info","message":"Setting up domain account for user: <user>, userId: <user>, serverUrl: https://cloud.example.com, password: <empty>, ncKitAccount: …"}
{"date":"2026.11.05 11:00:58.513","level":"info","message":"Cancelling domain account setup because \"password\" is an empty string."}
{"date":"2026.11.05 11:00:58.513","level":"info","message":"XPC connection invalidated!"}

On a healthy launch the later "SOME PASSWORD" push is accepted and everything works, so the race is usually harmless. Once the extension is dead, that retry is lost, the domain stays unauthenticated, and nothing ever brings the extension back.

Environment:

Client 35.0.3 (updated in place from 35.0.2; official .pkg, Developer ID NKUJUXUJ3B, sandboxed, File Provider mode, macFileProviderModeEnabled=true)
macOS 27.2 (26B123), Apple silicon
Server Nextcloud 34.0.5.1 (AIO), trusted TLS, status.php reachable, DAV returns 401 without creds
Account webflow auth, single account, domain 87a83df3-73c0-4d0e-b626-954e52c42f93

Workaround that restored it without re-login or re-sync:

killall Nextcloud            # SIGTERM is handled
killall fileproviderd        # launchctl kickstart does not work: com.apple.fileproviderd is not in the gui/<uid> domain
open -a /Applications/Nextcloud.app

Result: password: <not-empty> is accepted β†’ Successfully authenticated. β†’ Successfully created Realm. β†’ enumerator served, Finder location lists and opens files, and zero Code=4099/4101 afterwards.

Steps to reproduce

  1. On macOS 27.2, install the official Nextcloud desktop client in File Provider mode (macFileProviderModeEnabled=true) and connect one account, e.g. 35.0.2, with a working ~/Library/CloudStorage/Nextcloud-<server>-<user> location.
  2. Let the built-in updater install 35.0.3 in place while the client is running (in this report: app bundle replaced at 11:00:40; nextcloud.cfg afterwards shows clientPreviousVersion=35.0.2, clientVersion=35.0.3, and nextcloud.cfg.backup_20261105_110045_35.0.2 is created).
  3. Do not wait β€” let the client restart the File Provider domain on its own, as it does at every launch.
  4. Observe the client log (~/Library/Containers/com.nextcloud.desktopclient/Data/Library/Preferences/Nextcloud/logs/): Authenticating file provider domain … with EMPTY PASSWORD followed by NSCocoaErrorDomain Code=4101 "Couldn't communicate with a helper application" wrapping SqliteErrorDomain Code=5 "database is locked" (UPDATE engine_state SET db_uuid = ?), then from the next launch onward only NSCocoaErrorDomain Code=4099 "…Failed to check-in, peer may have been unloaded: mach_error=10000003" and Timed out while forwarding file ID changes….
  5. Open Finder β†’ Locations β†’ the Nextcloud location: it shows not connected and offers to sign in, while the menu-bar client shows the account as connected and keeps serving/refreshing API data normally.
  6. Try to recover, and confirm none of these help: (a) click the sign-in affordance in Finder β€” it ends in an error and no re-auth happens; (b) sign out and log in again in the client β€” Login Flow v2 completes, the client reports "Connected", the domain stays unauthenticated; (c) quit and relaunch the client; (d) reboot the machine and log in again.
  7. Only after additionally restarting the File Provider daemon (killall Nextcloud; killall fileproviderd; open -a /Applications/Nextcloud.app) does the extension start, accept password: <not-empty>, log Successfully authenticated. / Successfully created Realm., and serve the Finder location again.

Reproducibility: this machine hit the same extension-never-launched state at 11:00:58 and again at 11:06:28 (after the reboot), with the domain unreachable for 20+ minutes until step 7. The empty-password push (steps 3–4) reproduced on all three launches today (2 occurrences per launch), so only the "extension stays dead" part depends on the update/crash timing.

Expected behavior

  • After an in-place update (or any extension crash), the client should detect that the File Provider extension point is not runnable and re-register/restart the domain automatically, instead of retrying the same dead XPC endpoint indefinitely.
  • Failing that, the client must not display the account as "Connected" while its File Provider domain is unauthenticated and unreachable β€” it should surface an actionable message (e.g. "restart the client / reset the File Provider domain") rather than leaving Finder stuck on a sign-in prompt that cannot succeed.
  • Signing in from Finder, and re-authenticating in the client, should result in a working domain (credentials re-injected into the extension), so that neither a reboot nor a manual killall fileproviderd is required to recover.
  • The account should never be pushed to the domain with an empty password before credentials have been loaded from the keychain. Either wait for Fetched credentials before the first push, or have the extension defer the setup instead of answering Cancelling domain account setup because "password" is an empty string., which leaves the domain permanently unauthenticated if the follow-up push does not land.
  • The 4101 / SqliteErrorDomain Code=5 "database is locked" on UPDATE engine_state SET db_uuid = ? should not be fatal to domain setup.
  • In File Provider mode the Finder location must remain readable: listing ~/Library/CloudStorage/Nextcloud-<server>-<user> should return the remote tree and files should open, as they do again after the workaround.

Which files are affected by this bug

Client log (main app): - ~/Library/Containers/com.nextcloud.desktopclient/Data/Library/Preferences/Nextcloud/logs/20261105_1100_nextcloud.log.0 β€” update + first failure (11:00:45–11:01) - ~/Library/Containers/com.nextcloud.desktopclient/Data/Library/Preferences/Nextcloud/logs/20261105_1106_nextcloud.log.0 β€” post-reboot startup, with EMPTY PASSWORD, Code=4099 retries - ~/Library/Containers/com.nextcloud.desktopclient/Data/Library/Preferences/Nextcloud/logs/20261105_1121_nextcloud.log.0 β€” after the workaround (password: <not-empty> β†’ Successfully authenticated.) File Provider extension log (per-launch .jsonl, this is where the domain setup is decided): - ~/Library/Group Containers/NKUJUXUJ3B.com.nextcloud.desktopclient/File Provider Domains/<domain-id>/Logs/2026-11-05_11-00-58 (14869).jsonl β€” password: <empty> β†’ Cancelling domain account setup because "password" is an empty string. β†’ XPC connection invalidated! - ~/Library/Group Containers/NKUJUXUJ3B.com.nextcloud.desktopclient/File Provider Domains/<domain-id>/Logs/2026-11-05_11-06-28 (1474).jsonl β€” same, after reboot - ~/Library/Group Containers/NKUJUXUJ3B.com.nextcloud.desktopclient/File Provider Domains/<domain-id>/Logs/2026-11-05_11-21-49 (3387).jsonl β€” working case after restarting fileproviderd - (note: no .jsonl is created between 11:06:28 and 11:21:49 β€” the extension is never launched in that window, which is the bug) File Provider extension network log (NextcloudKit): - ~/Library/Containers/com.nextcloud.desktopclient.FileProviderExt/Data/Documents/Logs/log.txt β€” last DAV request before the update at 11:00:35, nothing until 11:21:54 (~145 MB, do not paste inline) Configuration / state: - ~/Library/Containers/com.nextcloud.desktopclient/Data/Library/Preferences/Nextcloud/nextcloud.cfg β€” clientPreviousVersion=35.0.2, clientVersion=35.0.3, macFileProviderModeEnabled=true, fileProviderDomainIdentifier=<domain-id> - ~/Library/Containers/com.nextcloud.desktopclient/Data/Library/Preferences/Nextcloud/nextcloud.cfg.backup_20261105_110045_35.0.2 β€” written by the in-place update - ~/Library/Group Containers/NKUJUXUJ3B.com.nextcloud.desktopclient/File Provider Domains/<domain-id>/<domain-id>.realm β€” domain metadata DB (~610 MB) - ~/Library/CloudStorage/Nextcloud-<server>-<user> β€” the Finder location that renders as "not connected" Keychain item used by both processes (login.keychain-db): service Nextcloud, account <user>:https://<server>/ β€” present and readable; the failure is not a missing credential but credentials being pushed before they are loaded.

Operating system

macOS

Which version of the operating system you are running.

27.2 (26B123), Apple silicon

Installation method

Official Installer for macOS 13 and later

Nextcloud Server version

Nextcloud 34.0.5.1 (AIO)

Nextcloud Desktop Client version

35.0.3

Did this occur after an update or on a clean installation?

Minor version update (i.e. 33.0.0 β†’ 33.0.1)

Are you using the Nextcloud Server Encryption module?

Yes

Are you using an external user-backend?

  • [ ] Default internal user-backend
  • [ ] LDAP or Active Directory
  • [ ] SSO - SAML
  • [ ] Other

Nextcloud Server logs


Additional info

No response

Radek27 avatar Nov 05 '26 10:11 Radek27

Seeing what looks like a closely related (maybe adjacent) failure on the same combination: macOS 27.2.1 (arm64), Nextcloud Desktop 35.0.3 (fresh install of the account, File Provider / virtual files), server Nextcloud 35.0.2 on a LAN host.

Difference from the report above: here the extension does launch (no 4099/4101, no "peer may have been unloaded"), but the domain never leaves the unauthenticated state:

  • fileproviderctl dump β†’ needs-auth: yes; create-item and fetch-event-stream both fail with FP -1000 ("you need to authenticate") and retry in a loop, errors: 0.
  • The main app is fully functional against the same account (PROPFIND 207 every ~30s, ocs/v1.php/cloud/user 200), so the credentials are valid.
  • The extension never appears in the server's nginx access log, i.e. it fails before making any request.
  • Keychain does contain the items the client created for the new domain (app-password entry + a per-domain-ID entry, created seconds before the failure), so it's not a missing-credentials case on the client side.
  • Initially the extension was blocked by "Local network prohibited" (FileProviderExt logs); that went away after toggling the permission and re-creating the account, so it's not the cause anymore. Same result over plain HTTP and over HTTPS with a locally trusted CA.
  • Tried without success: removing/re-adding the account (new domain ID each time), killall Nextcloud; killall fileproviderd; open -a Nextcloud (the workaround from this issue), reboot.

Classic (non-virtual-files) sync works fine with the same account. Happy to provide FileProviderExt logs if useful.

MarcoMirisola avatar Nov 12 '26 21:11 MarcoMirisola

Title: macOS File Provider: Finder domain stays "logged out" (needAuth), extension logs "account was never set up" although the account is connected in the client

Environment

  • Nextcloud Desktop client 35.0.3 (notarized build from nextcloud.com), macOS 27.2.1, Apple Silicon (arm64)
  • Nextcloud server 35.0.3 (upgraded step by step from 29.0.16; the problem was identical before and after the upgrade)
  • Server reachable over plain http on the local network (no TLS), reverse proxy: none
  • Virtual files / File Provider mode (this client version shows "Reset File Provider Domain" in the account page)

What happens

  1. Add the account in the client, log in via the browser flow ("Connect your account" -> granted). The account page shows: "Connected to http://:8081 as admin (11 GB in use)."
  2. macOS creates the domain folder in ~/Library/CloudStorage/Nextcloud-<server>-admin.
  3. In Finder, the "Nextcloud" location shows "'Nextcloud' is uitgelogd." (logged out) with a "Log in..." button and the file list never loads.
  4. Clicking "Log in..." briefly shows an "Authenticating" sheet that closes after ~0.3 s. The domain stays in state needAuth.

Expected: the File Provider domain receives the account from the main app, authenticates and lists the files.

Log evidence (unified log, log show)

  • FileProviderExt: [FileProviderExtension] Not fetching item because account was never set up. (FileProviderExtension.swift:182, item(for:request:completionHandler:)). Repeats every ~10 s.
  • fileproviderd: done executing fetch-event-stream(.root) ... error:<NSError: FP -1000 "Je moet je authenticeren voordat je toegang krijgt ...">
  • Finder: Show authentication sheet for domain ... state:needAuth followed 0.3 s later by Sheet closed with response -1000.
  • FileProviderUIExt: failed to get services for for item at URL: Error Domain=NSFileProviderInternalErrorDomain Code=12, then Failed to get file provider services for item! and Failed to get URL for file provider domain logs!. The Finder error dialog reads "Bewerking kon niet worden voltooid. (NSFileProviderInternalErrorDomain fout 12)".
  • Earlier, while the account was stale, FileProviderExt also logged HTTP load failed (error code: -1009 [1:50]) and NSFileProviderErrorDomain -1004 (cannot connect), although the main app could reach the server. I am not sure whether that is related.

Observations that may help

  • In System Settings > Login Items & Extensions > Extensions for Nextcloud, the second entry ("Bestandsaanbieders", presumably FileProviderUIExt, SDK com.apple.fileprovider-actionsui) kept switching itself off after I enabled it. I could only keep it enabled with pluginkit -e use -i com.nextcloud.desktopclient.FileProviderUIExt. FinderSyncExt was off (-).
  • No VPN, no content filter, no system extensions (systemextensionsctl list empty), macOS firewall off.
  • The client is correctly signed and notarized (spctl: accepted, Developer ID Nextcloud GmbH).

What I already tried (no change)

  • Remove the account in the client, quit, restart the Mac, re-add the account (twice).
  • "Reset File Provider Domain".
  • Upgrading the server from 29 to 35.
  • Enabling the File Provider UI extension (as above).
  • Checking Privacy & Security > Local Network.

Possibly related: none found yet. Happy to provide a debug archive ("Create Debug Archive") on request.

erikkel77 avatar Nov 20 '26 23:11 erikkel77