Repository navigation
Description
What happens
Settings → General → Uninstall StableBar… runs every step inside the running bar. It resets StableBar's permissions, deletes its caches and preferences and moves StableBar.app to the Trash. Then:
- when every step succeeds, it quits at once;
- when any step fails, or Homebrew installed the app, it keeps running to show Some steps still need you and waits for Quit StableBar.
In the second case the app is still running without its bundle, preferences or permissions. On another Mac this showed an error about missing files, then an exception, and Quit StableBar stopped working. Accessibility was removed while the bar was still on screen, before the rest was put back.
Steps to reproduce
- Install StableBar from the DMG into
/Applicationsand finish setup. - Make any uninstall step fail, for example by cancelling the administrator prompt for the
stablebarcommand. - Settings → General → Uninstall… → Uninstall.
Expected
A failed step leaves StableBar intact and lists what still needs doing, and Quit StableBar always quits. Permissions are reset, and caches, preferences and the app removed, only once the bar has stopped.
Environment
StableBar 0.9.0 or later (Uninstall shipped in 0.9.0, #332). Reported from a second Mac. The macOS version and the step that failed weren't recorded.
Evidence
- A moved bundle returns stale paths. A test app that moved its own bundle while running, as the last step does, kept getting the old URL from
Bundle.main.url(forResource:). Reading that URL then failed with "no such file". StableBar force-unwraps some of these reads, such as the setup backdrop inSetupTour.swift(NSImage(contentsOf: …)!), so one of them crashes instead of failing. - Deleting a cache folder can fail while it is in use.
FileManager.removeItemfails with the misleading "couldn't be removed because you don't have permission to access it" (NSCocoaErrorDomain 513) when a file appears in the folder during the delete. StableBar's own URL cache still writes to~/Library/Caches/org.stablebar.appwhile the files step runs. tccutil reset All <bundle ID>succeeds when an app runs it, so the permission reset itself isn't what fails.
Diagnosis
Sources/StableBar/Uninstall.swift:UninstallSnapshot.stepsputs.permissions,.filesand.applast.UninstallSystem.performruns them in the app's own process.Sources/StableBar/UninstallView.swift,uninstall(): it quits only when every step succeeded and Homebrew didn't install the app. Otherwise it shows the outcomes and leaves the half-removed app running.Uninstall.runkeeps going after a failure, so the app is moved to the Trash even when an earlier step failed.
Proposal
Uninstall in two phases.
- In the app: quit other copies, turn off the menu bar's auto-hide, turn off Open at login, remove the
stablebarcommand, delete Keychain tokens and trash the configuration. Failures are listed while StableBar is still whole, and Quit StableBar stays available. - After the bar quits: a helper started from StableBar's own executable waits for the bar to exit. It then resets permissions, deletes caches and preferences, and moves the app to the Trash unless Homebrew installed it. If one of these fails, it shows an alert with the manual steps.
StableBar --uninstall already runs in a separate process that quits the bar first, so it can keep running every step itself.
Related
- Uninstall StableBar and put back the macOS settings it changed #332 / feat: uninstall StableBar and turn off the menu bar auto-hide it turned on #339 added Uninstall. This bug is in how it runs its last steps.
- Run StableBar's uninstall when zapping homebrew-tap#1 (open) runs
StableBar --uninstall --yeswhen zapping. That path runs in a separate process.
Triaged by Claude Code (Claude Opus 5.5).
Activity
chore(release): 0.10.0 [skip ci]
stablebar-releases commentedon Nov 2, 2026
🎉 This issue has been resolved in version 0.10.0 🎉
The release is available on GitHub release
Your semantic-release bot 📦🚀