different-ai/openwork · error
Workspace archive contains too many entries.
Error message
Workspace archive contains too many entries.
What it means
Error "Workspace archive contains too many entries." thrown in different-ai/openwork.
Source
Thrown at apps/desktop/electron/workspace-archive.mjs:191
const centralSize = central.reduce((sum, chunk) => sum + chunk.length, 0);
chunks.push(...central, endOfCentralDirectory(files.length, centralSize, centralOffset));
await mkdir(path.dirname(outputPath), { recursive: true });
await writeFile(outputPath, Buffer.concat(chunks));
}
function findEndOfCentralDirectory(buffer) {
const start = Math.max(0, buffer.length - 0xffff - 22);
for (let offset = buffer.length - 22; offset >= start; offset -= 1) {
if (buffer.readUInt32LE(offset) === ZIP_END_OF_CENTRAL_DIRECTORY) return offset;
}
throw new Error("Failed to find ZIP central directory.");
}
function listZipEntries(buffer) {
if (buffer.byteLength > MAX_ARCHIVE_BYTES) throw new Error("Workspace archive is too large.");
const eocd = findEndOfCentralDirectory(buffer);
const count = buffer.readUInt16LE(eocd + 10);
if (count > MAX_ARCHIVE_ENTRIES) throw new Error("Workspace archive contains too many entries.");
const centralOffset = buffer.readUInt32LE(eocd + 16);
const entries = [];
let totalUncompressed = 0;
let cursor = centralOffset;
for (let i = 0; i < count; i += 1) {
if (buffer.readUInt32LE(cursor) !== ZIP_CENTRAL_DIRECTORY_HEADER) {
throw new Error("Invalid ZIP central directory entry.");
}
const method = buffer.readUInt16LE(cursor + 10);
const compressedSize = buffer.readUInt32LE(cursor + 20);
const uncompressedSize = buffer.readUInt32LE(cursor + 24);
if (uncompressedSize > MAX_ENTRY_UNCOMPRESSED_BYTES) throw new Error(`Archive entry exceeds the ${MAX_ENTRY_UNCOMPRESSED_BYTES}-byte limit.`);
totalUncompressed += uncompressedSize;
if (totalUncompressed > MAX_TOTAL_UNCOMPRESSED_BYTES) throw new Error("Workspace archive contains too much uncompressed data.");
const nameLength = buffer.readUInt16LE(cursor + 28);
const extraLength = buffer.readUInt16LE(cursor + 30);
const commentLength = buffer.readUInt16LE(cursor + 32);
const localOffset = buffer.readUInt32LE(cursor + 42);View on GitHub (pinned to 2b7df46e8a)
When it happens
Trigger: Thrown at apps/desktop/electron/workspace-archive.mjs:191 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of different-ai/openwork@2b7df46e8a (2026-09-01).
Data as JSON: /api/errors/5ed8021552a20bb5.
Report an issue: GitHub.