{"record":{"id":"490279573b1a0886","repo":"NousResearch/hermes-agent","slug":"gateway-returned-no-file-data","errorCode":null,"errorMessage":"Gateway returned no file data","messagePattern":"Gateway returned no file data","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"apps/desktop/src/lib/media.ts","lineNumber":174,"sourceCode":"  return $connection.get()?.mode === 'remote'\n}\n\n// Fetch gateway-local media as a data URL via the authenticated desktop FS\n// bridge. Remote Desktop artifacts can live anywhere the gateway can read\n// (workspace, skills, ~/.hermes/cache, etc.); /api/media is intentionally\n// narrower and rejects non-images plus images outside its media roots.\nexport async function gatewayMediaDataUrl(path: string): Promise<string> {\n  return readDesktopFileDataUrl(filePathFromMediaPath(path))\n}\n\n// Remote-mode replacement for opening gateway-local file paths with file://.\n// The file lives on the gateway, so fetch it over the authenticated fs bridge\n// and hand the bytes to the local browser shell as a download.\nexport async function downloadGatewayMediaFile(path: string): Promise<void> {\n  const dataUrl = await readDesktopFileDataUrl(filePathFromMediaPath(path))\n\n  if (!dataUrl) {\n    throw new Error('Gateway returned no file data')\n  }\n\n  const response = await fetch(dataUrl)\n  const blobUrl = URL.createObjectURL(await response.blob())\n  const anchor = document.createElement('a')\n  anchor.href = blobUrl\n  anchor.download = mediaName(path)\n  anchor.rel = 'noopener noreferrer'\n  document.body.appendChild(anchor)\n  anchor.click()\n  anchor.remove()\n  window.setTimeout(() => URL.revokeObjectURL(blobUrl), 30_000)\n}\n\nexport function mediaDisplayLabel(path: string): string {\n  const escaped = mediaName(path).replace(/[[\\]\\\\]/g, '\\\\$&')\n  const kind = mediaKind(path)\n","sourceCodeStart":156,"sourceCodeEnd":192,"githubUrl":"https://github.com/NousResearch/hermes-agent/blob/c896c09c42910c584c4c7d2325b58c14713ea42c/apps/desktop/src/lib/media.ts#L156-L192","documentation":"Error \"Gateway returned no file data\" thrown in NousResearch/hermes-agent.","triggerScenarios":"Thrown at apps/desktop/src/lib/media.ts:174 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Retry the download; the gateway returned an empty payload.","Verify the file still exists on the backend and the path is valid.","Check gateway connectivity and backend logs for the file read."],"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-15T17:31:12.345Z"}