{"record":{"id":"2b38bacc381413f9","repo":"paperclipai/paperclip","slug":"unsupported-zip-archive-data-descriptors-are-not","errorCode":null,"errorMessage":"Unsupported zip archive: data descriptors are not supported.","messagePattern":"Unsupported zip archive: data descriptors are not supported\\.","errorType":"validation","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"packages/shared/src/portability-zip.ts","lineNumber":247,"sourceCode":"      reachedCentralDirectory = true;\n      break;\n    }\n    if (signature !== LOCAL_FILE_SIGNATURE) {\n      throw new Error(\"Invalid zip archive: unsupported local file header.\");\n    }\n\n    if (offset + 30 > bytes.length) {\n      throw new Error(\"Invalid zip archive: truncated local file header.\");\n    }\n\n    const generalPurposeFlag = readUint16(bytes, offset + 6);\n    const compressionMethod = readUint16(bytes, offset + 8);\n    const compressedSize = readUint32(bytes, offset + 18);\n    const fileNameLength = readUint16(bytes, offset + 26);\n    const extraFieldLength = readUint16(bytes, offset + 28);\n\n    if ((generalPurposeFlag & 0x0008) !== 0) {\n      throw new Error(\"Unsupported zip archive: data descriptors are not supported.\");\n    }\n\n    const nameOffset = offset + 30;\n    const bodyOffset = nameOffset + fileNameLength + extraFieldLength;\n    const bodyEnd = bodyOffset + compressedSize;\n    if (bodyEnd > bytes.length) {\n      throw new Error(\"Invalid zip archive: truncated file contents.\");\n    }\n\n    localHeaderCount += 1;\n    const rawArchivePath = textDecoder.decode(bytes.slice(nameOffset, nameOffset + fileNameLength));\n    const archivePath = normalizeArchivePath(rawArchivePath);\n    const isDirectoryEntry = /\\/$/.test(rawArchivePath.replace(/\\\\/g, \"/\"));\n    if (archivePath && !isDirectoryEntry) {\n      const entryBytes = inflateZipEntry(compressionMethod, bytes.slice(bodyOffset, bodyEnd), maxEntryDecompressedBytes);\n      totalDecompressedBytes += entryBytes.length;\n      if (totalDecompressedBytes > maxTotalDecompressedBytes) {\n        throw new Error(","sourceCodeStart":229,"sourceCodeEnd":265,"githubUrl":"https://github.com/paperclipai/paperclip/blob/120ae5428fa29bee300bcf806491cd4d965fbb7c/packages/shared/src/portability-zip.ts#L229-L265","documentation":"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.","triggerScenarios":"Thrown at packages/shared/src/portability-zip.ts:247 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Re-create the archive without data descriptors (seekable output, standard zip writer)."],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"120ae5428fa29bee300bcf806491cd4d965fbb7c","analyzedAt":"2026-08-18T22:49:45.177Z","contentChangedAt":"2026-08-18T22:49:45.177Z","schemaVersion":2},"datasetVersion":"2026-09-14T05:17:10.506Z"}