stablyai/orca · error · Error
invalid_orca_profile_project_path
Error message
invalid_orca_profile_project_path
What it means
Thrown by findProjectsByPathArgsFromUnknown() (line 92) when the payload for orcaProfiles:findProjectProfiles is not an object. This is the shape branch; content checks (path emptiness, executionHostId type/normalization) are separate throws on lines 97, 102, and 106. It runs before findOrcaProfileProjectsByPath, so malformed input never reaches the project-presence lookup.
Source
Thrown at src/main/ipc/orca-profiles.ts:92
const candidate = args as TransferOrcaProfileProjectArgs
const sourceProfileId = candidate.sourceProfileId?.trim()
const targetProfileId = candidate.targetProfileId?.trim()
const repoId = candidate.repoId?.trim()
const mode = candidate.mode
if (!sourceProfileId || !targetProfileId || !repoId || (mode !== 'move' && mode !== 'copy')) {
throw new Error('invalid_orca_profile_project_transfer')
}
return {
sourceProfileId,
targetProfileId,
repoId,
mode
}
}
function findProjectsByPathArgsFromUnknown(args: unknown): FindOrcaProfileProjectsByPathArgs {
if (!args || typeof args !== 'object') {
throw new Error('invalid_orca_profile_project_path')
}
const candidate = args as FindOrcaProfileProjectsByPathArgs
const path = typeof candidate.path === 'string' ? candidate.path.trim() : ''
if (!path) {
throw new Error('invalid_orca_profile_project_path')
}
let executionHostId: FindOrcaProfileProjectsByPathArgs['executionHostId'] = null
if (candidate.executionHostId !== null && candidate.executionHostId !== undefined) {
if (typeof candidate.executionHostId !== 'string') {
throw new Error('invalid_orca_profile_project_path')
}
executionHostId = normalizeExecutionHostId(candidate.executionHostId)
if (!executionHostId) {
throw new Error('invalid_orca_profile_project_path')
}
}
return {
path,View on GitHub (pinned to 1136503c6a)
Solutions
- Pass an object literal with at least { path } as the second IPC argument.
- Construct the payload from a trimmed workspace/folder path, sourcing executionHostId only when an SSH/folder host context exists.
- If the lookup is optional in the flow, guard the call on the path being present rather than passing undefined.
- Keep connectionId / excludeProfileId optional — omit them rather than passing empty strings if unused.
Example fix
// before
await ipcRenderer.invoke('orcaProfiles:findProjectProfiles', workspacePath)
// after
await ipcRenderer.invoke('orcaProfiles:findProjectProfiles', { path: workspacePath }) Defensive patterns
Strategy: validation
Validate before calling
function isFindProjectsArgs(v: unknown): v is { path: unknown } {
return typeof v === 'object' && v !== null && 'path' in v
}
if (!isFindProjectsArgs(payload)) return Type guard
function isFindProjectsByPathArgsShape(v: unknown): v is { path: unknown; executionHostId?: unknown } {
return typeof v === 'object' && v !== null && 'path' in v
} Try / catch
try {
await ipcRenderer.invoke('orcaProfiles:findProjectProfiles', payload)
} catch (e) {
if (e instanceof Error && e.message === 'invalid_orca_profile_project_path') {
setScanError('Provide a workspace path to scan.')
} else throw e
} Prevention
- Pass an object literal { path } as the second IPC arg.
- Omit optional fields (connectionId, executionHostId, excludeProfileId) rather than sending empty strings.
- Skip the call entirely when no folder is open.
When it happens
Trigger: Invoking orcaProfiles:findProjectProfiles with undefined, null, a primitive, or a non-object value as the sole argument.
Common situations: The presence check is dispatched from a context-menu or watcher with no args bound, or a refactor moved the path into a nested object without updating the call site.
Related errors
- invalid_orca_org_role
- invalid_orca_org_member_email
- invalid_orca_org_member_user
- invalid_orca_profile_id
- invalid_orca_profile_project_transfer
AI-assisted analysis of stablyai/orca@1136503c6a (2026-08-12).
Data as JSON: /api/errors/d345a2700b8d491c.
Report an issue: GitHub.