{"record":{"id":"277ce5b448a29afc","repo":"stablyai/orca","slug":"accessibility-error-277ce5","errorCode":"accessibility_error","errorMessage":"native macOS helper app startup was cancelled","messagePattern":"native macOS helper app startup was cancelled","errorType":"error_code","errorClass":"RuntimeClientError","httpStatus":null,"severity":"warning","filePath":"src/main/computer/macos-native-provider-socket.ts","lineNumber":23,"sourceCode":"  socketPath: string,\n  timeoutMs: number,\n  signal?: AbortSignal\n): Promise<net.Socket> {\n  const deadline = Date.now() + timeoutMs\n  let lastError: Error | null = null\n  while (Date.now() < deadline && !signal?.aborted) {\n    try {\n      return await connectSocket(socketPath, signal)\n    } catch (error) {\n      lastError = error instanceof Error ? error : new Error(String(error))\n      if (signal?.aborted) {\n        break\n      }\n      await sleep(100, signal)\n    }\n  }\n  if (signal?.aborted) {\n    throw new RuntimeClientError(\n      'accessibility_error',\n      'native macOS helper app startup was cancelled'\n    )\n  }\n  throw new RuntimeClientError(\n    'action_timeout',\n    `native macOS helper app did not open its socket: ${lastError?.message ?? 'timed out'}`\n  )\n}\n\nfunction connectSocket(socketPath: string, signal?: AbortSignal): Promise<net.Socket> {\n  return new Promise((resolve, reject) => {\n    if (signal?.aborted) {\n      reject(\n        new RuntimeClientError(\n          'accessibility_error',\n          'native macOS helper app startup was cancelled'\n        )","sourceCodeStart":5,"sourceCodeEnd":41,"githubUrl":"https://github.com/stablyai/orca/blob/1136503c6a231a16dce8f921f6fadb63d181e8db/src/main/computer/macos-native-provider-socket.ts#L5-L41","documentation":"connectMacOSProviderSocket races repeated connectSocket attempts against a deadline; if the AbortSignal fires first (the transport's catch path aborts on failure, or the outer caller cancelled), it throws RuntimeClientError code 'accessibility_error' with this fixed message. It is the cancellation counterpart to the timeout in 967.","triggerScenarios":"The helper process exits/errors while the connect loop is still retrying, so startMacOSNativeProviderSocket's catch aborts the connect promise; or the caller cancelled the overall startup (e.g. a newer provider superseded this one — see 968).","commonSituations":"Helper crashes during its socket-setup phase; two provider startups racing and the loser is aborted; user-initiated shutdown during the 10s connect window.","solutions":["Check the helper crash cause separately — connectMacOSProviderSocket only reports that startup was cancelled, not why.","If racing startups are expected (concurrent computer-use calls), serialize provider startup through ensureSocketStarted so only one wins.","Retry the computer-use request; the next attempt either starts clean or surfaces the underlying helper error."],"exampleFix":null,"handlingStrategy":"retry","validationCode":null,"typeGuard":"import { RuntimeClientError } from './runtime-client-error'\n\nfunction isHelperStartupCanceled(e: unknown): e is RuntimeClientError {\n  return (\n    e instanceof RuntimeClientError &&\n    e.code === 'accessibility_error' &&\n    /startup was cancelled/.test(e.message)\n  )\n}","tryCatchPattern":"try {\n  await client.listApps()\n} catch (e) {\n  if (isHelperStartupCanceled(e)) {\n    // transient — retry; if it recurs, investigate the helper crash separately\n  } else throw e\n}","preventionTips":["Serialize provider startup through one client instance so concurrent startups do not abort each other.","Treat cancellation as transient and retry the originating computer-use action.","Investigate the helper crash log when cancellation recurs — the cause lives elsewhere."],"tags":["macos","computer-use","socket","abort","startup","accessibility"],"backgroundTag":null,"analyzedSha":"1136503c6a231a16dce8f921f6fadb63d181e8db","analyzedAt":"2026-08-12T23:15:58.167Z","schemaVersion":2},"datasetVersion":"2026-08-12T23:17:12.415Z"}