paperclipai/paperclip · error · Error

Select a .zip company package.

Error message

Select a .zip company package.

What it means

Input-format guard in readLocalPackageZip: the chosen File's name fails the .zip extension test, so the local company-package import refuses the file before attempting to open it as an archive. The faulting input is the browser File object passed by the package picker.

Source

Thrown at ui/src/pages/CompanyImport.tsx:700

}

// ── Helpers ───────────────────────────────────────────────────────────

async function readLocalPackageZip(file: File): Promise<{
  name: string;
  /**
   * The raw .zip File itself. Local imports upload this compressed file as
   * multipart instead of inflating it into one large inline JSON body (which
   * truncated in transit on big companies); the parsed `files` map below is
   * kept only for the client-side preflight display and preview affordances.
   */
  file: File;
  compressedBytes: number;
  rootPath: string | null;
  files: Record<string, CompanyPortabilityFileEntry>;
}> {
  if (!/\.zip$/i.test(file.name)) {
    throw new Error("Select a .zip company package.");
  }
  const archive = await readZipArchive(await file.arrayBuffer());
  if (Object.keys(archive.files).length === 0) {
    throw new Error("No package files were found in the selected zip archive.");
  }
  return {
    name: file.name,
    file,
    compressedBytes: file.size,
    rootPath: archive.rootPath,
    files: archive.files,
  };
}

// ── Chunked transfer flow for large local zips ───────────────────────
//
// A local .zip over the threshold is not uploaded in one request: one dropped
// connection would restart the whole multi-minute upload. Instead the file is

View on GitHub (pinned to a7e689b3c3)

Solutions

  1. Choose a .zip company package file to import.
Defensive patterns

Strategy: validation

When it happens

Trigger: Thrown at ui/src/pages/CompanyImport.tsx:700 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of paperclipai/paperclip@a7e689b3c3 (2026-08-18). Data as JSON: /api/errors/5778711cffac695b. Report an issue: GitHub.