Repository navigation
Description
Describe the bug
After upgrading from the App Store build (1.8) to the GitHub build v1.11.1 on macOS 27, the one-shot cleanup in AppDelegate.removeLegacyLauncherLoginItem() does not remove the old com.dwarvesv.LauncherApplication login item, and the app still records the migration as done, so it is never attempted again.
The docs say this should happen automatically:
docs/MANUAL.md: "A ghost "LauncherApplication" login item from old versions → Launch the current version once; it deauthorizes the legacy item automatically"CHANGELOG.md: "any leftover login item is deauthorized automatically on first launch"
Steps to reproduce
- macOS 27.0.1 (Apple silicon), Hidden Bar 1.8 (12) from the App Store with launch at login turned on, and at least one login since, so the helper job ran.
- Quit it and put v1.11.1 from the GitHub release in
/Applications. (I renamed the old bundle aside instead of deleting it.) - Launch v1.11.1 once and read the log (Console, or
log show). - Look at the helper job:
launchctl print gui/$(id -u)/com.dwarvesv.LauncherApplication. - To re-run: quit, delete the
smAppServiceMigratedkey from thecom.dwarvesv.minimalbarpreferences, launch again.
Expected behaviour
The legacy item is removed. If that can't be done, the failure is visible and smAppServiceMigrated is left unset.
Actual behaviour
-
The first launch after the upgrade and the re-run in step 5 both log (process IDs removed):
Hidden Bar: (ServiceManagement) Could not enable login item: com.dwarvesv.LauncherApplication: 22: Invalid argumentThat is 2 of 2 runs. The first was right after the replacement. For the second, Launch Services knew the old helper again at the renamed bundle's path (the log shows it registered about 20 minutes before that run, and it is still listed right after). The result was the same.
-
After both runs the job is still there.
launchctl printshows typeSubmitted, managed bycom.apple.xpc.ServiceManagement,parent bundle identifier = com.dwarvesv.minimalbar,parent bundle version = 12, andlaunchctl print-disabled gui/<uid>lists it asenabled. -
smAppServiceMigratedistrueafterwards even though the call failed.
What the code does
hidden/AppDelegate.swift at 47937b9:
guard !UserDefaults.standard.bool(forKey: migratedKey) else { return }
SMLoginItemSetEnabled("com.dwarvesv.LauncherApplication" as CFString, false)
UserDefaults.standard.set(true, forKey: migratedKey)The Boolean result is ignored and the flag is set unconditionally. The v1.11.1 bundle has no Contents/Library/LoginItems, since the helper target was removed in #362. Apple documents SMLoginItemSetEnabled as acting on a helper in the calling app's Contents/Library/LoginItems. I haven't confirmed that this is why it returns 22, so take it as a guess.
#362 lists the upgrade-path run from a launcher-era build as outstanding. This is one such run.
Questions
- Is the automatic cleanup expected to work when upgrading from the App Store build? If not, should the docs say how to remove the leftover item?
- Should
smAppServiceMigratedstay unset when the call fails?
Not verified
- I haven't had a login since the upgrade, so I don't know whether the leftover job does anything at login.
- I haven't checked how it shows up in System Settings > General > Login Items & Extensions, or whether removing it there works.
- One machine, one upgrade path (App Store 1.8 → v1.11.1).
Environment
- macOS 27.0.1, Apple silicon (arm64)
- Hidden Bar 1.8 (12) from the App Store → v1.11.1 (16) from the GitHub release
Activity
fix: retry legacy login-item cleanup after failure
fix(login): retry legacy login item removal when it fails (#456)
tieubao commentedon Nov 15, 2026
Fixed in #468. The legacy login item cleanup is now marked done only when macOS reports success, and it retries on the next launch otherwise (unit tested). It ships in the next release; we will close this then.
docs(backlog): rewrite the backlog to match the v1.11.2 candidate
release: v1.11.2 macOS 27 fixes (#468)
tieubao commentedon Nov 15, 2026
Fixed in v1.11.2: https://github.com/dwarvesf/hidden/releases/tag/v1.11.2 (download, or
brew upgrade --cask hiddenbaronce Homebrew picks it up). Please reopen if you still see this on 1.11.2.docs: record the #456 upgrade-path BTM check, date v1.13.0
docs: record the #456 upgrade-path BTM check, date v1.13.0 (#516)
tieubao commentedon Nov 16, 2026
Reopening: we reproduced this on 1.13.0.
We upgraded a clean macOS 27.2.1 machine from v1.9 (launch at login on) to 1.13.0. After a fresh login, the old LauncherApplication login item is still registered, and every launch logs
Could not enable login item: com.dwarvesv.LauncherApplication: 22: Invalid argument. System Settings does not give it a row of its own: it is listed inside the "Hidden Bar" entry under Allow in the Background.Workaround until the fix ships: open Hidden Bar Settings, turn "Open Hidden Bar at login" off, then on again. In our test that removed the old item.
Edit: the fix is merged in #517 and will ship in the next release.
fix(autostart): remove the legacy login item with one SMAppService re…
fix: legacy login item reset and notification hold on auto-hide (#553)
tieubao commentedon Nov 19, 2026
Hidden Bar 1.13.2 is out: https://github.com/consolelabs/hidden/releases/tag/v1.13.2
The cleanup of the old LauncherApplication login item now runs again on Macs that passed through 1.11 or 1.11.1, where it had been marked done even when it failed. We ran the upgrade path v1.10 to 1.11.1 to 1.13.2 on macOS 27.2.1 and no LauncherApplication record remained. If the item is still listed for you after 1.13.2 has launched twice, please reopen.
docs(backlog): refresh for 1.13.4 (#595)