stablyai/orca · error · Error

No git provider for connection "${args.connectionId}"

Error message

No git provider for connection "${args.connectionId}"

What it means

Thrown by the 'git:abortMerge' handler (src/main/ipc/filesystem.ts:1342) when args.connectionId is set but getSshGitProvider(connectionId) is undefined. Root cause is identical to the SSH_GIT_PROVIDER_UNAVAILABLE_MESSAGE family, but the message is an ad-hoc template literal `No git provider for connection "${connectionId}"` rather than the shared constant — so clients that match on the canonical 'Remote connection dropped...' text will NOT catch this variant.

Source

Thrown at src/main/ipc/filesystem.ts:1342

      if (args.connectionId) {
        const provider = getSshGitProvider(args.connectionId)
        if (!provider) {
          throw new Error(SSH_GIT_PROVIDER_UNAVAILABLE_MESSAGE)
        }
        return provider.detectConflictOperation(args.worktreePath)
      }
      const worktreePath = await resolveRegisteredWorktreePath(args.worktreePath, store)
      return detectConflictOperation(worktreePath)
    }
  )

  ipcMain.handle(
    'git:abortMerge',
    async (_event, args: { worktreePath: string; connectionId?: string }): Promise<void> => {
      if (args.connectionId) {
        const provider = getSshGitProvider(args.connectionId)
        if (!provider) {
          throw new Error(`No git provider for connection "${args.connectionId}"`)
        }
        return provider.abortMerge(args.worktreePath)
      }
      const worktreePath = await resolveRegisteredWorktreePath(args.worktreePath, store)
      const gitOptions = getLocalGitOptionsForRegisteredWorktree(
        store,
        args.worktreePath,
        worktreePath
      )
      await abortMerge(worktreePath, gitOptions)
    }
  )

  ipcMain.handle(
    'git:abortRebase',
    async (_event, args: { worktreePath: string; connectionId?: string }): Promise<void> => {
      if (args.connectionId) {
        const provider = getSshGitProvider(args.connectionId)

View on GitHub (pinned to 1136503c6a)

Solutions

  1. Reconnect the SSH target and retry git:abortMerge with the refreshed connectionId.
  2. When matching this error in client code, key off 'No git provider for connection' rather than the canonical SSH_GIT_PROVIDER_UNAVAILABLE_MESSAGE string.
  3. Consider unifying the message to the shared constant so all remote-provider-missing sites are consistent.

Example fix

// before: abort on a stale connection, only the canonical message handled
try { await invoke('git:abortMerge', { worktreePath, connectionId }) }
catch (e) { if (e.message === SSH_GIT_PROVIDER_UNAVAILABLE_MESSAGE) reconnect() }

// after: also handle the abortMerge/abortRebase variant string
const missing = /No git provider for connection|Remote connection dropped/
try { await invoke('git:abortMerge', { worktreePath, connectionId }) }
catch (e) { if (missing.test(e.message)) connectionId = await reconnect(targetId) }
Defensive patterns

Strategy: retry

Validate before calling

// Handle the abortMerge-specific message variant too.
const MISSING = /No git provider for connection|Remote connection dropped/
if (MISSING.test(lastError)) connectionId = await reconnectSshTarget(targetId)

Try / catch

const MISSING = /No git provider for connection|Remote connection dropped/
try {
  return await invoke('git:abortMerge', { worktreePath, connectionId })
} catch (e) {
  if (e instanceof Error && MISSING.test(e.message)) {
    connectionId = await reconnectSshTarget(targetId)
    return invoke('git:abortMerge', { worktreePath, connectionId })
  }
  throw e
}

Prevention

When it happens

Trigger: Invoking ipcRenderer.invoke('git:abortMerge', { worktreePath, connectionId }) while the SSH git provider for connectionId is unregistered (disconnect/reconnect) or was never established.

Common situations: User clicks 'Abort merge' on a remote worktree right after the SSH session dropped; reconnect produced a new connectionId but the merge-abort action still holds the old one.

Related errors


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