paperclipai/paperclip · error · Error
Invalid zip archive: duplicate entry path "${normalizedPath}
Error message
Invalid zip archive: duplicate entry path "${normalizedPath}". What it means
Duplicate-path guard in readZipArchive: after stripping the shared archive root, two entries normalize to the same relative path. Since entries are collected into a Record keyed by path, a duplicate would silently overwrite earlier content (a classic zip-slip/confusion vector), so the import aborts instead.
Source
Thrown at packages/shared/src/portability-zip.ts:305
const eocdOffset = findEndOfCentralDirectoryOffset(bytes);
if (eocdOffset === -1) {
throw new Error("Invalid zip archive: missing end-of-central-directory record.");
}
validateCentralDirectory(bytes, eocdOffset, localHeaderCount);
const rootPath = sharedArchiveRoot(entries.map((entry) => entry.path));
const files: Record<string, CompanyPortabilityFileEntry> = {};
for (const entry of entries) {
const normalizedPath =
rootPath && entry.path.startsWith(`${rootPath}/`)
? entry.path.slice(rootPath.length + 1)
: entry.path;
if (!normalizedPath) continue;
// Two entries that normalize to the same path (e.g. `a/b` and `a//b`) make
// the package ambiguous; reject it rather than silently letting the later
// entry's contents win over the earlier one.
if (Object.prototype.hasOwnProperty.call(files, normalizedPath)) {
throw new Error(`Invalid zip archive: duplicate entry path "${normalizedPath}".`);
}
files[normalizedPath] = entry.body;
}
return { rootPath, files };
}
View on GitHub (pinned to 120ae5428f)
Solutions
- Remove duplicate entry paths from the archive before uploading.
Defensive patterns
Strategy: validation
When it happens
Trigger: Thrown at packages/shared/src/portability-zip.ts:305 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/7b897c24681b0606.
Report an issue: GitHub.