stablyai/orca · error · Error

SSH host platform is unavailable. Reconnect the SSH target b

Error message

SSH host platform is unavailable. Reconnect the SSH target before cloning.

What it means

Thrown when gitProvider.getHostPlatform?.() returns falsy. The host platform carries the pathFlavor ('posix' or 'windows') used to validate paths and join segments; without it the clone cannot determine absolute-path semantics or correctly join the destination and repo name. Treated as a recoverable relay-protocol gap — 'reconnect' is the remedy.

Source

Thrown at src/main/ipc/repos.ts:496

  store: Store,
  mainWindow: BrowserWindow,
  args: {
    connectionId: string
    url: string
    destination: string
  }
): Promise<Repo> {
  const gitProvider = getSshGitProvider(args.connectionId)
  if (!gitProvider) {
    throw new Error(`SSH connection "${args.connectionId}" not found or not connected`)
  }
  const fsProvider = getSshFilesystemProvider(args.connectionId)
  if (!fsProvider) {
    throw new Error(`SSH connection "${args.connectionId}" not found or not connected`)
  }
  const host = gitProvider.getHostPlatform?.()
  if (!host) {
    throw new Error('SSH host platform is unavailable. Reconnect the SSH target before cloning.')
  }
  const trimmedDestination = await resolveRemoteHomePath(args.connectionId, args.destination.trim())
  if (!isRuntimePathAbsolute(trimmedDestination, host.pathFlavor)) {
    throw new Error('Clone destination must be an absolute path on the SSH host')
  }
  const repoName = deriveCloneRepoNameFromUrl(args.url.trim())
  const clonePath = joinRemotePath(host, trimmedDestination, repoName)
  if (relativePathInsideRoot(trimmedDestination, clonePath) === null) {
    throw new Error('Clone path must be inside the destination directory')
  }
  const clonePathKey = normalizeRuntimePathForComparison(clonePath)
  const existing = store.getRepos().find((repo) => {
    return (
      repo.connectionId === args.connectionId &&
      normalizeRuntimePathForComparison(repo.path) === clonePathKey
    )
  })
  if (existing && !isFolderRepo(existing)) {

View on GitHub (pinned to 1136503c6a)

Solutions

  1. Reconnect the SSH target so the host platform is re-fetched from the relay handshake.
  2. Upgrade the relay to a version that advertises getHostPlatform.
  3. Guard the clone call: if (!gitProvider.getHostPlatform?.()) defer the clone until the platform is available.
  4. If the relay truly cannot report a platform, the clone is unsupported — file a relay-side fix.
Defensive patterns

Strategy: retry

Validate before calling

import { getSshGitProvider } from '../providers/ssh-git-dispatch'

function connectionHasHostPlatform(connectionId: string): boolean {
  return !!getSshGitProvider(connectionId)?.getHostPlatform?.()
}

Type guard

function isSshHostPlatformUnavailable(err: unknown): boolean {
  return err instanceof Error && err.message === 'SSH host platform is unavailable. Reconnect the SSH target before cloning.'
}

Try / catch

try {
  await cloneRemoteRepo(store, mainWindow, { connectionId, url, destination })
} catch (err) {
  if (isSshHostPlatformUnavailable(err)) {
    await reconnect(connectionId)
    return retry()
  }
  throw err
}

Prevention

When it happens

Trigger: The git provider exists (so 1272 passed) but does not expose getHostPlatform, or it returns undefined/null. Possible with an older relay that predates the host-platform RPC, or a provider implementation that lazily populates the platform and has not yet received it from the relay.

Common situations: Older SSH relay version that does not report host platform; connection handshake completed but the platform descriptor hasn't landed yet; relay that supports git clone but not platform detection (rare custom relay).

Related errors


AI-assisted analysis of stablyai/orca@1136503c6a (2026-08-12). Data as JSON: /api/errors/d7a4aac57ebc6ea9. Report an issue: GitHub.