{"record":{"id":"0d5cb5478d8e0053","repo":"stablyai/orca","slug":"accessibility-error-0d5cb5","errorCode":"accessibility_error","errorMessage":"desktop provider returned no app","messagePattern":"desktop provider returned no app","errorType":"error_code","errorClass":"RuntimeClientError","httpStatus":null,"severity":"error","filePath":"src/main/computer/desktop-script-snapshot-rendering.ts","lineNumber":143,"sourceCode":"function renderTreeText(snapshot: BridgeSnapshot): string {\n  const appRef = snapshot.app.bundleId ?? snapshot.app.bundleIdentifier ?? snapshot.app.name\n  const lines = [\n    `App=${appRef} (pid ${snapshot.app.pid})`,\n    `Window: \"${sanitize(snapshot.windowTitle ?? snapshot.app.name)}\", App: ${sanitize(snapshot.app.name)}.`,\n    '',\n    ...(snapshot.treeLines ?? [])\n  ]\n  if (snapshot.selectedText) {\n    lines.push('', `Selected text: [${sanitize(snapshot.selectedText)}]`)\n  } else if (snapshot.focusedSummary) {\n    lines.push('', `The focused UI element is ${sanitize(snapshot.focusedSummary)}.`)\n  }\n  return lines.join('\\n')\n}\n\nexport function normalizeBridgeApp(app: BridgeResponse['app'] | BridgeWindow['app'] | undefined) {\n  if (!app) {\n    throw new RuntimeClientError('accessibility_error', 'desktop provider returned no app')\n  }\n  return {\n    name: app.name,\n    bundleId: app.bundleId ?? app.bundleIdentifier ?? null,\n    pid: app.pid\n  }\n}\n\nfunction sanitize(value: string): string {\n  return value.replaceAll('\\n', ' ').replaceAll('\\r', ' ')\n}\n","sourceCodeStart":125,"sourceCodeEnd":155,"githubUrl":"https://github.com/stablyai/orca/blob/1136503c6a231a16dce8f921f6fadb63d181e8db/src/main/computer/desktop-script-snapshot-rendering.ts#L125-L155","documentation":"normalizeBridgeApp throws accessibility_error if the bridge response or a window entry has no `app` object. Every snapshot and window-list entry must identify its owning app; a missing app indicates a malformed provider response.","triggerScenarios":"Provider returns a snapshot or window without an app field; a partial response after the target app crashed mid-call.","commonSituations":"Provider bug; app terminated during the call; provider version with schema drift omitting the app object.","solutions":["Re-run the snapshot or window listing.","Confirm the target app is still running.","Update the provider script to a conformant version."],"exampleFix":null,"handlingStrategy":"fallback","validationCode":null,"typeGuard":null,"tryCatchPattern":"try {\n  return await client.snapshot(params)\n} catch (err) {\n  if (err instanceof RuntimeClientError && err.code === 'accessibility_error' && /no app/.test(err.message)) {\n    // confirm the target app is running, then retry\n  }\n  throw err\n}","preventionTips":["Verify the target app is running before snapshot.","Keep the provider script current."],"tags":["accessibility-error","app","provider","malformed-response"],"backgroundTag":null,"analyzedSha":"1136503c6a231a16dce8f921f6fadb63d181e8db","analyzedAt":"2026-08-12T23:15:58.167Z","schemaVersion":2},"datasetVersion":"2026-08-12T23:17:12.415Z"}