Keep the database in the File Provider state directory (fix "signed out" Finder)#20
Merged
Merged
Conversation
A File Provider extension's sandbox cannot open files in the App Group container (open() returns EPERM), so moving the canonical database there left the extension unable to open it: it reported not-authenticated and Finder showed the domain as "signed out". The extension can only write inside its own domain state directory, which is why the database belongs there. Restore the state-directory database (shared by the app and extension) and fix the original "disk I/O error" differently: before removing the File Provider domain — which deletes the state directory and its database — point the app's live handle at the App Group bootstrap database, which the app can write. A sync that runs during the reset, or after a failed re-seed, then writes to a valid handle instead of a deleted file. After re-adding the domain the shared database is re-seeded and adopted again.
Nightly BuildDownload Findle Nightly (unsigned) Built from 8b173c8. Important This build is unsigned. macOS will block it on first launch. To open it:
|
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.
Summary
After 0.2.0 relocated the canonical database to the App Group container, Finder showed the domain as "signed out" and "Open in Finder" did nothing. The live extension log shows why:
A File Provider extension's sandbox cannot open files in the App Group container (the app can, which is why the app worked). So the extension couldn't open the DB at all → not-authenticated → "signed out". This is why the original design kept the DB in the File Provider state directory — the one place the extension can read/write.
Fix
Keeps the data-protection keychain change and What's New-per-build from the prior PRs.
Verification
Root cause is proven from the production extension log (EPERM on the App Group DB). The fix restores the original state-directory code, under which the extension demonstrably worked before. Local end-to-end Nightly verification was blocked by a rebuilt-extension being wedged in pluginkit (
-2001), which a clean notarized install does not hit.