{"record":{"id":"1897dff15ad616f2","repo":"NousResearch/hermes-agent","slug":"remote-html-preview-could-not-be-loaded","errorCode":null,"errorMessage":"Remote HTML preview could not be loaded","messagePattern":"Remote HTML preview could not be loaded","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"apps/desktop/src/lib/local-preview.ts","lineNumber":158,"sourceCode":"  policy.httpEquiv = 'Content-Security-Policy'\n  policy.content = csp\n  document.head.prepend(policy)\n\n  return `<!doctype html>${document.documentElement.outerHTML}`\n}\n\nexport async function openPreviewTargetInBrowser(target: PreviewTarget): Promise<void> {\n  const bridge = window.hermesDesktop\n\n  if (!bridge?.openPreviewInBrowser) {\n    throw new Error('Desktop preview browser bridge is unavailable')\n  }\n\n  const dataUrl = target.dataUrl && validatedRemoteHtmlDataUrl(target.dataUrl)\n\n  if (!dataUrl) {\n    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  }","sourceCodeStart":140,"sourceCodeEnd":176,"githubUrl":"https://github.com/NousResearch/hermes-agent/blob/c896c09c42910c584c4c7d2325b58c14713ea42c/apps/desktop/src/lib/local-preview.ts#L140-L176","documentation":"Error \"Remote HTML preview could not be loaded\" thrown in NousResearch/hermes-agent.","triggerScenarios":"Thrown at apps/desktop/src/lib/local-preview.ts:158 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Check the remote backend is reachable and serving the preview URL.","Retry the preview after reconnecting to the remote gateway.","Verify the remote path/URL is correct and the file exists on the remote host."],"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"}