stablyai/orca · warning · Error
${response.error.message}
Error message
${response.error.message} What it means
Inside the NewWorktreeModal, a useEffect fires `ssh.getState` for the selected repo connection to read the current SSH connection state when the modal becomes visible. If the RPC returns ok=false, it throws the host's error.message; the chained .catch() maps that into an sshState with status 'error' and the thrown message as the error field.
Source
Thrown at mobile/src/components/NewWorktreeModal.tsx:413
})()
return () => {
stale = true
}
}, [visible, client, hostId])
useEffect(() => {
if (!visible || !client || !selectedRepoConnectionId) {
return
}
let stale = false
void client
.sendRequest('ssh.getState', { targetId: selectedRepoConnectionId })
.then((response) => {
if (stale) {
return
}
if (!response.ok) {
throw new Error(response.error.message)
}
const state = (response as RpcSuccess).result as { state?: SshConnectionState | null }
setSshState(
state.state ?? {
targetId: selectedRepoConnectionId,
status: 'disconnected',
error: null,
reconnectAttempt: 0
}
)
})
.catch((err) => {
if (!stale) {
setSshState({
targetId: selectedRepoConnectionId,
status: 'error',
error: err instanceof Error ? err.message : 'Failed to read SSH connection state.',
reconnectAttempt: 0View on GitHub (pinned to 1136503c6a)
Solutions
- Verify the SSH target still exists on the host (re-open repo settings).
- Upgrade the host to support ssh.getState.
- Let the modal's error state guide the user; the catch already sets status 'error'.
- Retry by closing/reopening the modal (the effect re-fires on visible toggle).
Example fix
// before
if (!response.ok) {
throw new Error(response.error.message)
}
// after — treat missing-method as disconnected rather than error
if (!response.ok) {
if ((response as RpcFailure).error.code === 'METHOD_NOT_FOUND') {
setSshState({ targetId: selectedRepoConnectionId, status: 'disconnected', error: null, reconnectAttempt: 0 })
return
}
throw new Error((response as RpcFailure).error.message)
} Defensive patterns
Strategy: try-catch
Validate before calling
// Skip the probe if the host likely lacks ssh.* methods
const caps = await client.sendRequest('status.get').catch(() => null)
const supportsSsh = (caps as any)?.result?.capabilities?.includes('ssh')
if (!supportsSsh) { setSshState({ targetId: selectedRepoConnectionId, status: 'disconnected', error: null, reconnectAttempt: 0 }); return } Type guard
function isSshStateSuccess(r: RpcSuccess | RpcFailure): r is RpcSuccess & { result: { state?: SshConnectionState | null } } {
return r.ok
} Try / catch
.then((response) => {
if (stale) return
if (!response.ok) throw new Error((response as RpcFailure).error.message)
// ...
}).catch((err) => {
if (!stale) setSshState({ targetId: selectedRepoConnectionId, status: 'error', error: err instanceof Error ? err.message : 'Failed to read SSH connection state.', reconnectAttempt: 0 })
}) Prevention
- Use the stale flag on every async to avoid setState after unmount.
- Treat METHOD_NOT_FOUND as 'disconnected' rather than 'error' for older hosts.
- Re-run the effect on visible toggle to recover from transient failures.
When it happens
Trigger: ssh.getState fails — the SSH target was deleted, the host's SSH subsystem errored, the connection id is unknown to the host, or the host predates the ssh.getState method.
Common situations: Selecting an SSH-backed repo whose target was removed server-side, a host restart that lost SSH state, an older host without ssh.* methods, or a transient relay error.
Related errors
- Unable to create untitled markdown note
- Unable to load workspace metadata.
- Unable to reach host
- Unable to load agent sessions
- ${response.error.message}
AI-assisted analysis of stablyai/orca@1136503c6a (2026-08-12).
Data as JSON: /api/errors/b213ecfacf73e2d0.
Report an issue: GitHub.