stablyai/orca · info · Error
Clone aborted
Error message
Clone aborted
What it means
Thrown in the clone catch block when controller.signal.aborted is true. The AbortController is created per clone and its signal is passed to gitProvider.clone; abort can be triggered by the clone-cancel IPC, by a newer clone superseding this one, or by teardown. The 'Clone aborted' message distinguishes a user/system-initiated cancel from a git failure (which goes through the 'Clone failed:' branch).
Source
Thrown at src/main/ipc/repos.ts:550
// Why: match local clone by creating the parent first, or a fresh remote parent surfaces as spawn ENOENT.
await fsProvider.createDir(trimmedDestination)
// Why: the SSH relay runs git argv, not a shell; use the repo folder name so git creates it under the chosen parent.
await gitProvider.clone(
['clone', '--progress', '--', args.url.trim(), repoName],
trimmedDestination,
{
signal: controller.signal,
timeoutMs: 10 * 60_000,
onProgress: (progress) => {
if (!mainWindow.isDestroyed()) {
mainWindow.webContents.send('repos:clone-progress', progress)
}
}
}
)
} catch (err) {
if (controller.signal.aborted) {
throw new Error('Clone aborted')
}
const message = err instanceof Error ? err.message : String(err)
if (message.startsWith('Clone failed:')) {
throw new Error(`Clone failed: ${getGitCloneFailureMessage(message, { clonePath })}`)
}
throw err
} finally {
if (activeRemoteClone === metadata) {
activeRemoteClone = null
}
remoteCloneInFlightByPath.delete(remoteCloneKey)
}
if (existing && isFolderRepo(existing)) {
const updated = store.updateRepo(existing.id, {
kind: 'git',
projectHostSetupMethod: 'cloned'
})
if (updated) {View on GitHub (pinned to 1136503c6a)
Solutions
- Treat as informational, not an error: the abort was intentional; surface 'Clone canceled' to the user.
- If unintended, audit who called controller.abort() — check the cancel IPC handler and any superseding-clone logic.
- Ensure no automatic retry fires on 'Clone aborted' (retry only on 'Clone failed:' or rethrown err).
- On teardown, accept the abort as expected and skip showing it as an error.
Example fix
// before
catch (err) {
showUserError(err.message)
}
// after — distinguish abort from real failure
import { abortController } from './clone-state'
catch (err) {
if (controller.signal.aborted) {
showUserToast('Clone canceled')
return
}
showUserError(err.message)
} Defensive patterns
Strategy: try-catch
Validate before calling
// Nothing to validate pre-call — abort is initiated by the caller. Track the controller instead.
const controller = new AbortController()
window.addEventListener('beforeunload', () => controller.abort()) Type guard
function isCloneAborted(err: unknown): boolean {
return err instanceof Error && err.message === 'Clone aborted'
} Try / catch
try {
await gitProvider.clone(['clone', '--progress', '--', url, repoName], destination, { signal: controller.signal })
} catch (err) {
if (controller.signal.aborted) {
surfaceToast('Clone canceled')
return
}
throw err
} Prevention
- Distinguish 'Clone aborted' from 'Clone failed:' in error UIs — only the latter is a real failure.
- Do not auto-retry on abort; the cancel was intentional (user or teardown).
- Always run the clone's finally block so remoteCloneInFlightByPath clears even on abort.
When it happens
Trigger: controller.abort() was called during gitProvider.clone. Concretely: the user clicked cancel; the activeRemoteClone metadata was replaced by a new clone that aborts the prior one; window/app teardown aborted in-flight clones; the AbortController's signal fired for any other reason.
Common situations: User clicked 'Cancel' on the clone progress UI; a second clone to the same destination superseded the first; main window closed mid-clone; abort signal chained from a parent operation.
Related errors
- Claude sign-in was cancelled.
- SSH provider wait aborted for target "${targetId}".
- SSH connection "${args.connectionId}" not found or not conne
- SSH host platform is unavailable. Reconnect the SSH target b
- Clone destination must be an absolute path on the SSH host
AI-assisted analysis of stablyai/orca@1136503c6a (2026-08-12).
Data as JSON: /api/errors/3f58534c7ab7795e.
Report an issue: GitHub.