{"record":{"id":"1578b663d581da87","repo":"stablyai/orca","slug":"accessibility-error","errorCode":"accessibility_error","errorMessage":"desktop provider returned invalid JSON: ${error instanceof Error ? error.message : String(error)}","messagePattern":"desktop provider returned invalid JSON: (.+?)","errorType":"error_code","errorClass":"RuntimeClientError","httpStatus":null,"severity":"error","filePath":"src/main/computer/desktop-script-provider-client.ts","lineNumber":215,"sourceCode":"    if (!capabilities.supports.actions[actionKey]) {\n      throw new RuntimeClientError(\n        'unsupported_capability',\n        `${capabilities.provider} does not support actions.${actionKey}`\n      )\n    }\n  }\n\n  private async callBridge(request: BridgeRequest): Promise<BridgeResponse> {\n    const operationDirectory = await mkdtemp(join(tmpdir(), 'orca-computer-use-'))\n    const operationPath = join(operationDirectory, 'operation.json')\n    try {\n      await writeFile(operationPath, JSON.stringify(request), { encoding: 'utf8', mode: 0o600 })\n      const { stdout, stderr } = await execBridge(this.platform, this.scriptPath, operationPath)\n      let response: BridgeResponse\n      try {\n        response = JSON.parse(stdout) as BridgeResponse\n      } catch (error) {\n        throw new RuntimeClientError(\n          'accessibility_error',\n          `desktop provider returned invalid JSON: ${error instanceof Error ? error.message : String(error)}`\n        )\n      }\n      if (!response.ok) {\n        throw mapBridgeError(response.error ?? stderr)\n      }\n      return response\n    } finally {\n      await rm(operationDirectory, { force: true, recursive: true })\n    }\n  }\n\n  private async readCapabilities(): Promise<ComputerProviderCapabilities> {\n    if (this.providerCapabilities) {\n      return this.providerCapabilities\n    }\n    const response = await this.callBridge({ tool: 'handshake' })","sourceCodeStart":197,"sourceCodeEnd":233,"githubUrl":"https://github.com/stablyai/orca/blob/1136503c6a231a16dce8f921f6fadb63d181e8db/src/main/computer/desktop-script-provider-client.ts#L197-L233","documentation":"callBridge writes the request to a temp file, execs the desktop provider script, and parses stdout as JSON. If JSON.parse fails, it throws accessibility_error with the parse failure detail. This signals the provider script crashed or emitted non-JSON output (a stack trace, log lines, or a different format).","triggerScenarios":"Provider script exits with a Python/Node traceback printed to stdout; script writes log lines before the JSON; the script binary is missing or crashes on launch; an incompatible script version outputs a different schema.","commonSituations":"Provider script not built or installed correctly; runtime error inside the script; stderr/stdout mixing; client and provider script versions out of sync.","solutions":["Run the provider script manually with a sample operation.json to inspect its stdout.","Rebuild or reinstall the desktop provider script.","Inspect the script's stderr and exit code for the underlying crash.","Ensure the script prints only JSON to stdout (redirect logs to stderr)."],"exampleFix":null,"handlingStrategy":"fallback","validationCode":null,"typeGuard":null,"tryCatchPattern":"try {\n  return await client.action(method, params)\n} catch (err) {\n  if (err instanceof RuntimeClientError && err.code === 'accessibility_error' && /invalid JSON/.test(err.message)) {\n    // log the script path, surface a provider-repair instruction; do not retry unchanged\n  }\n  throw err\n}","preventionTips":["Verify the provider script path resolves and is executable.","Smoke-test the script's handshake output on startup.","Keep client and provider script versions in sync."],"tags":["accessibility-error","bridge","provider","json"],"backgroundTag":null,"analyzedSha":"1136503c6a231a16dce8f921f6fadb63d181e8db","analyzedAt":"2026-08-12T23:15:58.167Z","schemaVersion":2},"datasetVersion":"2026-08-12T23:17:12.415Z"}