{"record":{"id":"cf13e17ea527ce80","repo":"NousResearch/hermes-agent","slug":"could-not-stage-remote-html-preview","errorCode":null,"errorMessage":"Could not stage remote HTML preview","messagePattern":"Could not stage remote HTML preview","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"apps/desktop/src/lib/local-preview.ts","lineNumber":175,"sourceCode":"    if (target.transient) {\n      throw new Error('Remote HTML preview could not be loaded')\n    }\n\n    await bridge.openPreviewInBrowser(target.url)\n\n    return\n  }\n\n  if (!bridge.saveImageBuffer) {\n    throw new Error('Desktop preview buffer bridge is unavailable')\n  }\n\n  const decoded = atob(dataUrl.slice(dataUrl.indexOf(',') + 1))\n  const bytes = Uint8Array.from(decoded, char => char.charCodeAt(0))\n  const filePath = await bridge.saveImageBuffer(bytes, '.html')\n\n  if (!filePath) {\n    throw new Error('Could not stage remote HTML preview')\n  }\n\n  await bridge.openPreviewInBrowser(pathToFileUrl(filePath))\n}\n\nexport function localPreviewTarget(rawTarget: string, cwd?: string | null): PreviewTarget | null {\n  const raw = rawTarget.trim().replace(/^`|`$/g, '')\n\n  if (!raw) {\n    return null\n  }\n\n  if (/^https?:\\/\\//i.test(raw)) {\n    return { kind: 'url', label: basename(raw), source: raw, url: raw }\n  }\n\n  let path = raw\n","sourceCodeStart":157,"sourceCodeEnd":193,"githubUrl":"https://github.com/NousResearch/hermes-agent/blob/c896c09c42910c584c4c7d2325b58c14713ea42c/apps/desktop/src/lib/local-preview.ts#L157-L193","documentation":"Error \"Could not stage remote HTML preview\" thrown in NousResearch/hermes-agent.","triggerScenarios":"Thrown at apps/desktop/src/lib/local-preview.ts:175 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Check connectivity to the remote backend and retry.","Verify the remote workspace path is writable and has free space.","Re-authenticate to the remote gateway if the session token expired."],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"c896c09c42910c584c4c7d2325b58c14713ea42c","analyzedAt":"2026-08-14T17:18:01.089Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}