NousResearch/hermes-agent · error · Error

Not a valid zip archive (no end-of-central-directory).

Error message

Not a valid zip archive (no end-of-central-directory).

What it means

Error "Not a valid zip archive (no end-of-central-directory)." thrown in NousResearch/hermes-agent.

Source

Thrown at apps/desktop/electron/vscode-marketplace.ts:220

        displayName: extension.displayName || extension.extensionName,
        publisher: extension.publisher?.displayName || publisherName,
        description: extension.shortDescription || '',
        installs: Math.round(installStat?.value ?? 0)
      }
    })
}

// ─── Minimal zip reader ─────────────────────────────────────────────────────

function findEndOfCentralDirectory(buf) {
  // EOCD signature 0x06054b50, scanning back from the end (comment is rare).
  for (let i = buf.length - 22; i >= 0; i--) {
    if (buf.readUInt32LE(i) === 0x06054b50) {
      return i
    }
  }

  throw new Error('Not a valid zip archive (no end-of-central-directory).')
}

/** Parse the central directory into a name → record map. */
function readCentralDirectory(buf) {
  const eocd = findEndOfCentralDirectory(buf)
  const count = buf.readUInt16LE(eocd + 10)
  let offset = buf.readUInt32LE(eocd + 16)
  const records = new Map()

  for (let i = 0; i < count; i++) {
    if (buf.readUInt32LE(offset) !== 0x02014b50) {
      break
    }

    const method = buf.readUInt16LE(offset + 10)
    const compressedSize = buf.readUInt32LE(offset + 20)
    const nameLen = buf.readUInt16LE(offset + 28)
    const extraLen = buf.readUInt16LE(offset + 30)

View on GitHub (pinned to c896c09c42)

Solutions

  1. Re-download the VSIX; the archive is truncated or corrupt.
  2. Clear the extension download cache and retry the install.
  3. If the file was transferred or proxied, fetch it again from the Marketplace over a clean connection.

When it happens

Trigger: Thrown at apps/desktop/electron/vscode-marketplace.ts:220 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of NousResearch/hermes-agent@c896c09c42 (2026-08-14). Data as JSON: /api/errors/3e9c988ff4ee4df4. Report an issue: GitHub.