stablyai/orca · error · Error
Project host setup not found: ${args.setupId}
Error message
Project host setup not found: ${args.setupId} What it means
Thrown by the projectHostSetups:update IPC handler when store.updateProjectHostSetup returns null, i.e. no host-setup row matched args.setupId. The update is atomic in the store: a miss returns null rather than creating a row, so this signals the setup id is unknown or already deleted.
Source
Thrown at src/main/ipc/repos.ts:1392
if (!result) {
throw new Error(`Project not found: ${args.projectId}`)
}
notifyReposChanged(mainWindow)
return result
}
)
ipcMain.handle(
'projectHostSetups:update',
(_event, rawArgs: ProjectHostSetupUpdateArgs): ProjectHostSetupUpdateResult => {
const args = parseProjectGroupIpcArgs(
ProjectHostSetupUpdateIpcArgs,
rawArgs,
'project_host_setup_update_invalid_args'
)
const result = store.updateProjectHostSetup(args)
if (!result) {
throw new Error(`Project host setup not found: ${args.setupId}`)
}
if ('worktreeBasePath' in args.updates && result.repo) {
void prepareLocalWorktreeRootForRepo(store, result.repo)
invalidateAuthorizedRootsCache()
}
notifyReposChanged(mainWindow)
return result
}
)
ipcMain.handle(
'projectHostSetups:delete',
(_event, rawArgs: ProjectHostSetupDeleteArgs): ProjectHostSetupDeleteResult => {
const args = parseProjectGroupIpcArgs(
ProjectHostSetupDeleteIpcArgs,
rawArgs,
'project_host_setup_delete_invalid_args'
)View on GitHub (pinned to 1136503c6a)
Solutions
- Re-fetch the host setups for the project and diff against the local copy before retrying the update.
- If the setup is gone, fall back to create rather than update.
- Catch the error and tell the user the setup no longer exists, then refresh.
- Avoid caching setup ids across workspace switches; key them by current workspace.
Example fix
// before
await ipc.invoke('projectHostSetups:update', { setupId, updates })
// after
const current = await ipc.invoke('projectHostSetups:list', { projectId })
if (!current.some((s) => s.id === setupId)) {
await ipc.invoke('projectHostSetups:create', { projectId, hostId, ...updates })
} else {
await ipc.invoke('projectHostSetups:update', { setupId, updates })
} Defensive patterns
Strategy: validation
Validate before calling
const setups = await ipc.invoke('projectHostSetups:list', { projectId })
if (!setups.some((s) => s.id === setupId)) {
// setup gone — recreate instead of update
await ipc.invoke('projectHostSetups:create', { projectId, hostId, ...updates })
return
}
await ipc.invoke('projectHostSetups:update', { setupId, updates }) Type guard
function setupStillExists(setupId: string, setups: { id: string }[]): boolean {
return setups.some((s) => s.id === setupId)
} Try / catch
try {
await ipc.invoke('projectHostSetups:update', { setupId, updates })
} catch (e) {
if (/not found/.test((e as Error).message)) {
await refreshSetups(projectId)
} else throw e
} Prevention
- Refresh host setups whenever the project or host changes.
- Key cached setup ids by current workspace and host.
- For concurrent editors, reconcile on focus before saving.
When it happens
Trigger: Updating a project host setup whose setupId was removed by another action (delete, project removal, host disconnect) between the load of the settings panel and the save. Also when a setupId from an old workspace is reused.
Common situations: Two settings panels open against the same project; a concurrent removeProjectHostSetup invalidated the id; state cached across a workspace switch; an import/migration that did not preserve setup ids.
Related errors
- Project not found: ${args.projectId}
- Repo "${args.repoId}" not found
- Repo path must be an absolute path
- Unsupported host: ${args.hostId}
- Invalid host ID: ${args.hostId}
AI-assisted analysis of stablyai/orca@1136503c6a (2026-08-12).
Data as JSON: /api/errors/e40bd5dfc2a559d1.
Report an issue: GitHub.