stablyai/orca · error · Error
Project not found: ${args.projectId}
Error message
Project not found: ${args.projectId} What it means
Thrown by the projectHostSetups:create IPC handler when store.createProjectHostSetup returns a falsy result, meaning no project record matched args.projectId. The handler first validates args via ProjectHostSetupCreateIpcArgs, so a thrown error here means the arguments were well-formed but referenced a project that does not exist in the store.
Source
Thrown at src/main/ipc/repos.ts:1375
ipcMain.handle('projectHostSetups:list', () => {
enrichMissingRepoGitRemoteIdentities(store, {
onChanged: () => notifyReposChanged(mainWindow)
})
return store.getProjectHostSetups()
})
ipcMain.handle(
'projectHostSetups:create',
(_event, rawArgs: ProjectHostSetupCreateArgs): ProjectHostSetupCreateResult => {
const args = parseProjectGroupIpcArgs(
ProjectHostSetupCreateIpcArgs,
rawArgs,
'project_host_setup_create_invalid_args'
)
const result = store.createProjectHostSetup(args)
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}`)
}View on GitHub (pinned to 1136503c6a)
Solutions
- Refresh the project list (repos:changed / listProjects) on the renderer before retrying and drop the orphaned id.
- Guard the create call with a prior store.getRepo/getProject existence check on the renderer.
- Catch the error in the renderer, surface a 'project no longer exists' message, and clear local references to that id.
- Audit bulk flows to ensure ids are fetched immediately before use rather than from long-lived caches.
Example fix
// before
await ipc.invoke('projectHostSetups:create', { projectId, hostId })
// after
const exists = await ipc.invoke('repos:get', projectId)
if (!exists) {
showNotice('Project was removed elsewhere.')
return
}
await ipc.invoke('projectHostSetups:create', { projectId, hostId }) Defensive patterns
Strategy: validation
Validate before calling
const project = await ipc.invoke('repos:get', projectId)
if (!project) {
showNotice('This project no longer exists.')
return
}
await ipc.invoke('projectHostSetups:create', { projectId, hostId, ...rest }) Type guard
function isExistingProjectId(id: string, projects: { id: string }[]): boolean {
return projects.some((p) => p.id === id)
} Try / catch
try {
await ipc.invoke('projectHostSetups:create', args)
} catch (e) {
if (/Project not found/.test((e as Error).message)) {
refreshProjectList()
showNotice('Project was removed; please retry.')
} else throw e
} Prevention
- Re-fetch the project list when the window regains focus or on repos:changed events.
- Do not cache projectId across workspace switches.
- Disable create actions in the UI when the source project row is no longer present.
When it happens
Trigger: Sending projectHostSetups:create with a projectId that was deleted, never created, or scoped to a different workspace. Also occurs when the renderer holds a stale project id after a workspace switch or after repos:changed invalidated the project list.
Common situations: Stale renderer state after a project was removed in another window; a drag-and-drop or bulk action referencing an id from a cached list; race where a project is deleted between the list refresh and the create call.
Related errors
- Project host setup not found: ${args.setupId}
- 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/7b46a88aff41273b.
Report an issue: GitHub.