paperclipai/paperclip · error · Error

Unsupported zip archive: data descriptors are not supported.

Error message

Unsupported zip archive: data descriptors are not supported.

What it means

Thrown by readZipArchive while scanning local file entries of a portability zip. The entry's general purpose flag bit 3 (0x0008) is set, meaning sizes/CRC were deferred to a trailing data descriptor after the compressed body. The reader relies on the local header's sizes to compute record boundaries, so such archives are rejected as unsupported rather than mis-parsed.

Source

Thrown at packages/shared/src/portability-zip.ts:247

      reachedCentralDirectory = true;
      break;
    }
    if (signature !== LOCAL_FILE_SIGNATURE) {
      throw new Error("Invalid zip archive: unsupported local file header.");
    }

    if (offset + 30 > bytes.length) {
      throw new Error("Invalid zip archive: truncated local file header.");
    }

    const generalPurposeFlag = readUint16(bytes, offset + 6);
    const compressionMethod = readUint16(bytes, offset + 8);
    const compressedSize = readUint32(bytes, offset + 18);
    const fileNameLength = readUint16(bytes, offset + 26);
    const extraFieldLength = readUint16(bytes, offset + 28);

    if ((generalPurposeFlag & 0x0008) !== 0) {
      throw new Error("Unsupported zip archive: data descriptors are not supported.");
    }

    const nameOffset = offset + 30;
    const bodyOffset = nameOffset + fileNameLength + extraFieldLength;
    const bodyEnd = bodyOffset + compressedSize;
    if (bodyEnd > bytes.length) {
      throw new Error("Invalid zip archive: truncated file contents.");
    }

    localHeaderCount += 1;
    const rawArchivePath = textDecoder.decode(bytes.slice(nameOffset, nameOffset + fileNameLength));
    const archivePath = normalizeArchivePath(rawArchivePath);
    const isDirectoryEntry = /\/$/.test(rawArchivePath.replace(/\\/g, "/"));
    if (archivePath && !isDirectoryEntry) {
      const entryBytes = inflateZipEntry(compressionMethod, bytes.slice(bodyOffset, bodyEnd), maxEntryDecompressedBytes);
      totalDecompressedBytes += entryBytes.length;
      if (totalDecompressedBytes > maxTotalDecompressedBytes) {
        throw new Error(

View on GitHub (pinned to 120ae5428f)

Solutions

  1. Re-create the archive without data descriptors (seekable output, standard zip writer).
Defensive patterns

Strategy: validation

When it happens

Trigger: Thrown at packages/shared/src/portability-zip.ts:247 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of paperclipai/paperclip@120ae5428f (2026-08-18). Data as JSON: /api/errors/2b38bacc381413f9. Report an issue: GitHub.