[Bug]: Bundle-rename update (Alpha→Beta) fails to relaunch the app (ShipIt posix_spawn ENOENT); stale background service then blocks the home #23707
Before submitting#
- I searched existing issues and did not find a duplicate.
- I included enough detail to reproduce or investigate the problem.
Related (same symptom families, different root causes): #22990, #22983, #22820, #23372
Area#
apps/desktop / auto-update
Environment#
- macOS 26.x (Darwin 27.0.0), Apple Silicon
- T3 Code (Alpha) auto-updated to T3 Code (Beta) 0.1.1 via Squirrel/ShipIt
- Background service from the previous version installed as LaunchAgent
com.t3tools.t3code.service(RunAtLoad+KeepAlive), running the standalone~/.t3/runtime/versions/<v>/t3 serve
Steps to reproduce#
- Run T3 Code (Alpha) with the background service installed.
- Receive an update whose bundle name changes (
T3 Code (Alpha).app→T3 Code (Beta).app). - Let ShipIt install and auto-relaunch.
Expected behavior#
The updated app relaunches (ShipItState.plist has launchAfterInstallation = true) and takes over the home, refreshing or replacing the old background service.
Actual behavior#
Two failures in sequence:
1. The updater never relaunches the app. ShipIt's install dance renames the old bundle away first, then tries to spawn its relauncher helper from the now-gone old path:
10:58:02.745 Moving bundle from .../T3 Code (Alpha).app/ to .../T3 Code (Beta).app
10:58:03.182 On main thread and launching: file:///Applications/T3 Code (Beta).app
10:58:03.182 Launching new ShipIt at /Applications/T3 Code (Alpha).app/Contents/Frameworks/Squirrel.framework/Resources/ShipIt with instructions to launch file:///Applications/T3%20Code%20(Beta).app
10:58:03.183 posix_spawn: No such file or directory
10:58:03.183 New ShipIt exited
10:58:03.183 Installation completed successfully
Installation reports success, but the relauncher path (inside the pre-rename T3 Code (Alpha).app) no longer exists, so posix_spawn fails and the UI never comes back. From the user's perspective the app "updated into the background": only the LaunchAgent service restarts, and macOS shows the "App Background Activity — T3 Tools, Inc." notification.
2. Manually relaunching hits the stale service. The old LaunchAgent (previous architecture: standalone t3 serve from ~/.t3/runtime) still holds the T3 home. The updated 0.1.1 app — which runs its own server in-process — refuses to start with "This T3 home is unavailable".
The dialog's remediation (t3 update, t3 service uninstall, npx t3@latest) assumes a t3 CLI on PATH. In my case t3 was not on PATH at all (it only exists inside ~/.t3/runtime/versions/<v>/), and the dialog never names the actual thing holding the lock (the LaunchAgent), so there is no way to discover what to stop from the dialog alone.
Workaround that worked#
launchctl bootout gui/$(id -u)/com.t3tools.t3code.service
mv ~/Library/LaunchAgents/com.t3tools.t3code.service.plist{,.stale-bak}
open "/Applications/T3 Code (Beta).app"
After that the app starts its own server on 127.0.0.1:3773 and comes up normally. (The first one or two relaunch attempts right after bootout still exited silently — the app only came up on a direct binary launch a minute later, so there may also be a lingering lock/state that takes time to settle.)
Impact#
Update leaves the machine with no working app and no actionable recovery path from the UI: the relaunch silently fails, and the recovery dialog instructs you to run a CLI that isn't installed on PATH.
Suggestions#
- Pass the new bundle URL to ShipIt's relauncher (or relaunch via
openthrough LaunchServices after the install completes) so a bundle-rename update can't reference the pre-rename path. - When the home is held by the boot service, name it in the dialog ("LaunchAgent com.t3tools.t3code.service") and offer a one-click "stop background service" action instead of requiring a CLI.
- Consider having the app migrate/replace the previous version's LaunchAgent during update instead of failing the home-ownership check.
Version or commit#
0.1.0 (Alpha) → 0.1.1 (Beta)
juliusmarminge closed this
Sign in to join this conversation.
Duplicate of #20103: the same Alpha→Beta bundle rename leaves ShipIt spawning its helper from the removed Alpha path, producing
posix_spawn: No such file or directoryand no relaunch. The subsequent stale-service home-ownership dialog is tracked in #22821.