You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Retrying an install whose dependency failed is refused with "Port N is already in use" and the failed app disappears #138
When an app that needs another app is installed and the dependency fails, both end up in the error state (the dependent says "Couldn’t install X, which this app needs."). Pressing "Try again" on the dependent calls apps.install for it. In install() (omarchyd/apps.mjs, around lines 1503-1524):
the failed dependent is removed from the list and its folder deleted (lines 1503-1510), only for the app being installed, not for its failed dependency;
the plan is [dependency, app]; the dependency's port check state.apps.some((a) => a.port === src.port) matches the failed dependency's own leftover entry, so it throws CONFLICT "Port N is already in use, so can’t be installed".
The message is wrong (nothing is using the port), and the dependent app, which was just deleted, is gone from the list. The user has to find and retry the dependency card first. (A leftover failed dependency is only removed later, at line 1559, after the checks.)
How to reproduce
I ran createApps with a store holding base and main (dependencies: [base]), and a stand-in run whose docker-compose pull fails once.
awaitP('apps.install',{appId: 'main'})// base fails, main fails because of itawaitP('apps.install',{appId: 'main'})// retry, with pull working now
Actual: the first call leaves base and main both in error. The retry throws CONFLICT Port 31706 is already in use, so base can’t be installed, and afterwards apps.list shows only base (main has been removed).
Expected: the retry installs base and main, or at least keeps main and gives a real reason.
Suggested fix
Ignore entries in the error state when checking ports (they are about to be replaced), and clear failed dependencies like the failed app itself, or do the failed-app cleanup only after the plan and checks succeed.
Thank you @nixfred. A failed install stays until the plan and the port checks succeed. A later conflict no longer looks like the app disappeared. This is on main in #844.
Activity
calledtoconstruct commentedon Nov 21, 2026
Working to resolve this.
No open pull request references this issue, and no one has commented that they are working on it.
This shares the app manager with #804, #688, #138, #679, #528, and #134. They share code and will land in one pull request.
🤖 Generated with Grok 4.7
calledtoconstruct commentedon Nov 21, 2026
Thank you @nixfred. A failed install stays until the plan and the port checks succeed. A later conflict no longer looks like the app disappeared. This is on main in #844.
🤖 Generated with Grok 4.7