Repository navigation
Conversation
… its sign in The domain manager only listened to an account's state changes after adding a domain for it in the running session. A domain that already existed when the client started was never disconnected when its account was signed out, so Finder kept loading its folders while the extension refused every request, with no hint at the client. Watch the state of every account from start() on, including accounts added later, and drop the connection in addDomainForAccount(), which also added one more connection each time a domain was added again. Assisted-by: ClaudeCode:claude-opus-5-5 Signed-off-by: Jeldrik Schröer <jeldrik@jschroeer.de>
jeldriks
requested review from
camilasan,
claucambra and
i2h3
as code owners
November 25, 2026 21:57
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
After "Log out" of a file provider account whose domain existed when the client started, Finder keeps loading the account's folders and nothing points to the client. The domain stays connected, and the extension, which no longer has the account, refuses every request with
notAuthenticated(about 1,400 in the first minute). macOS reacts to that in varying ways: most often only endless loading of files and folders, after a few minutes of waiting resulting in "You need to authenticate before accessing this item." on a file, or its own "“NextcloudDev” is signed out." banner, whose "Sign In…" fails with "The account information is not available." because "Log out" deleted the extension's stored password. These are all one problem. Seen with 35.0.3 andmaster(bad83ce) on macOS 27.2.Related: #7784. This covers only Finder in file provider mode; the notice in the client itself that is asked for is not part of this PR.
Cause and change
FileProviderDomainManager::slotAccountStateChanged()disconnects the domain with "This account is not authenticated. Please check your account state in the … application." and reconnects it on sign in, but it was only connected inaddDomainForAccount(), which runs when a domain is added in the running session.This PR connects it in
start()for every loaded account and, throughAccountManager::accountAdded, for accounts added later. Accounts without a domain are no problem:domainForAccount()returnsnilfor an empty identifier. TheconnectinaddDomainForAccount()is removed; it added another connection each time a domain was added again, so one sign out disconnected the domain several times.The "Sign In…" button itself is unchanged. Side effect: at startup each domain gets one more reconnect when its account connects.
Tests
Three tests in
testfileproviderxpcutils.cppcount the disconnects after the account loses its sign in (handleInvalidCredentials(), same branch as "Log out"): for an account that existed beforestart(), one added after it, and a domain added twice. They use the domain manager of a freshly createdFileProvider, so aFileProviderleft over from another test does not react as well. Each expects one disconnect;mastergives 0, 0 and 2. Removing the loop, theaccountAddedconnection, or keeping the oldconnecteach make a test fail. The tests also pass with #11383 applied on top.Live on macOS 27.2: after "Log out", the client disconnected the domain at once, Finder showed the message above, and the extension got no further requests until signing in, when the domain was reconnected. Folders not loaded yet still show Finder's loading indicator.
Checklist
AI (if applicable)
Investigation, code and this description were drafted with Claude Code (claude-opus-5-5) and reviewed by me.