{"record":{"id":"3e9c988ff4ee4df4","repo":"NousResearch/hermes-agent","slug":"not-a-valid-zip-archive-no-end-of-central-directo","errorCode":null,"errorMessage":"Not a valid zip archive (no end-of-central-directory).","messagePattern":"Not a valid zip archive \\(no end-of-central-directory\\)\\.","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"apps/desktop/electron/vscode-marketplace.ts","lineNumber":220,"sourceCode":"        displayName: extension.displayName || extension.extensionName,\n        publisher: extension.publisher?.displayName || publisherName,\n        description: extension.shortDescription || '',\n        installs: Math.round(installStat?.value ?? 0)\n      }\n    })\n}\n\n// ─── Minimal zip reader ─────────────────────────────────────────────────────\n\nfunction findEndOfCentralDirectory(buf) {\n  // EOCD signature 0x06054b50, scanning back from the end (comment is rare).\n  for (let i = buf.length - 22; i >= 0; i--) {\n    if (buf.readUInt32LE(i) === 0x06054b50) {\n      return i\n    }\n  }\n\n  throw new Error('Not a valid zip archive (no end-of-central-directory).')\n}\n\n/** Parse the central directory into a name → record map. */\nfunction readCentralDirectory(buf) {\n  const eocd = findEndOfCentralDirectory(buf)\n  const count = buf.readUInt16LE(eocd + 10)\n  let offset = buf.readUInt32LE(eocd + 16)\n  const records = new Map()\n\n  for (let i = 0; i < count; i++) {\n    if (buf.readUInt32LE(offset) !== 0x02014b50) {\n      break\n    }\n\n    const method = buf.readUInt16LE(offset + 10)\n    const compressedSize = buf.readUInt32LE(offset + 20)\n    const nameLen = buf.readUInt16LE(offset + 28)\n    const extraLen = buf.readUInt16LE(offset + 30)","sourceCodeStart":202,"sourceCodeEnd":238,"githubUrl":"https://github.com/NousResearch/hermes-agent/blob/c896c09c42910c584c4c7d2325b58c14713ea42c/apps/desktop/electron/vscode-marketplace.ts#L202-L238","documentation":"Error \"Not a valid zip archive (no end-of-central-directory).\" thrown in NousResearch/hermes-agent.","triggerScenarios":"Thrown at apps/desktop/electron/vscode-marketplace.ts:220 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Re-download the VSIX; the archive is truncated or corrupt.","Clear the extension download cache and retry the install.","If the file was transferred or proxied, fetch it again from the Marketplace over a clean connection."],"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"}