Skip to content

Fix File Provider after Sparkle updates and Open in Finder sandbox issue#12

Merged
alexmodrono merged 3 commits intomainfrom
worktree-release-0.1
Mar 18, 2026
Merged

Fix File Provider after Sparkle updates and Open in Finder sandbox issue#12
alexmodrono merged 3 commits intomainfrom
worktree-release-0.1

Conversation

@alexmodrono
Copy link
Copy Markdown
Owner

Summary

  • Fix File Provider extension disabled after Sparkle updates by calling pluginkit -e use on every launch
  • Fix "does not have permission" error when opening File Provider location from the app
  • Make File Provider recovery more robust with retry logic and keychain token re-storage
  • Fix WhatsNewKit version to match actual release version

Details

Root cause of the File Provider issue: when Sparkle replaces the app bundle, macOS disables the embedded File Provider extension via pluginkit. NSFileProviderManager.add(domain) does NOT re-enable it. The fix calls pluginkit -e use on every app launch.

The "Open in Finder" issue was caused by NSWorkspace.shared.open() being blocked by the sandbox for File Provider CloudStorage URLs after the binary changed. Switched to selectFile(inFileViewerRootedAtPath:).

- Re-store keychain token after version change and during reset to
  ensure accessibility from the updated extension binary
- Replace fixed 2s sleep with retry loop (up to 5 attempts with
  increasing backoff) for shared database seeding
- Replace silent try? with proper try/catch and OSLog diagnostics
  so failures during re-registration and reset are visible
- Apply the same improvements to both reregisterFileProviderDomain
  (automatic on version change) and resetProvider (manual from Settings)
Root cause: When Sparkle replaces the app bundle, macOS disables the
embedded File Provider extension via pluginkit.  NSFileProviderManager
.add(domain) does NOT re-enable a disabled extension — only
`pluginkit -e use -i <bundle-id>` does.

The app now calls `pluginkit -e use` to re-enable the extension:
- On every app launch (in ensureFileProviderDomain)
- After detecting a version change (in reregisterFileProviderDomain)
- During manual Reset Provider (in resetProvider)

This is safe to call unconditionally — pluginkit is idempotent and
returns immediately if the extension is already enabled.
NSWorkspace.shared.open() is blocked by the app sandbox for File
Provider CloudStorage URLs, producing "does not have permission"
errors.  Switch to selectFile(inFileViewerRootedAtPath:) which asks
Finder to navigate to the path instead of the app opening it directly.
@alexmodrono alexmodrono merged commit 0fddce3 into main Mar 18, 2026
1 check passed
@github-actions
Copy link
Copy Markdown

Nightly Build

Download Findle Nightly (unsigned)

Built from e24aa2f.

Important

This build is unsigned. macOS will block it on first launch. To open it:

  1. Try to open the app normally — macOS will show a warning and refuse.
  2. Go to System Settings → Privacy & Security, scroll down, and click Open Anyway.
  3. The File Provider extension requires code signing and won't work in this build.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant