{"record":{"id":"3a61ca836238486e","repo":"paperclipai/paperclip","slug":"no-package-files-were-found-in-the-selected-zip-ar","errorCode":null,"errorMessage":"No package files were found in the selected zip archive.","messagePattern":"No package files were found in the selected zip archive\\.","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"ui/src/pages/CompanyImport.tsx","lineNumber":704,"sourceCode":"async function readLocalPackageZip(file: File): Promise<{\n  name: string;\n  /**\n   * The raw .zip File itself. Local imports upload this compressed file as\n   * multipart instead of inflating it into one large inline JSON body (which\n   * truncated in transit on big companies); the parsed `files` map below is\n   * kept only for the client-side preflight display and preview affordances.\n   */\n  file: File;\n  compressedBytes: number;\n  rootPath: string | null;\n  files: Record<string, CompanyPortabilityFileEntry>;\n}> {\n  if (!/\\.zip$/i.test(file.name)) {\n    throw new Error(\"Select a .zip company package.\");\n  }\n  const archive = await readZipArchive(await file.arrayBuffer());\n  if (Object.keys(archive.files).length === 0) {\n    throw new Error(\"No package files were found in the selected zip archive.\");\n  }\n  return {\n    name: file.name,\n    file,\n    compressedBytes: file.size,\n    rootPath: archive.rootPath,\n    files: archive.files,\n  };\n}\n\n// ── Chunked transfer flow for large local zips ───────────────────────\n//\n// A local .zip over the threshold is not uploaded in one request: one dropped\n// connection would restart the whole multi-minute upload. Instead the file is\n// declared as a chunked transfer (whole-file and per-part sha256), the parts\n// are uploaded individually with per-part retries, and preview/apply run\n// server-side against the assembled spool. Re-declaring the same file — after\n// a failure, a refresh, or between preview and import — resumes the prior","sourceCodeStart":686,"sourceCodeEnd":722,"githubUrl":"https://github.com/paperclipai/paperclip/blob/a7e689b3c35347b529cb9f54c9b9a8575a3dcab6/ui/src/pages/CompanyImport.tsx#L686-L722","documentation":"Empty-archive guard in readLocalPackageZip: the file passed the .zip check, but parsing it yielded zero importable package entries (files map empty), so the archive is rejected as not a valid company package export.","triggerScenarios":"Thrown at ui/src/pages/CompanyImport.tsx:704 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Verify the zip actually contains the company package files; re-export the package and retry."],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"a7e689b3c35347b529cb9f54c9b9a8575a3dcab6","analyzedAt":"2026-08-18T22:49:45.177Z","contentChangedAt":"2026-08-18T22:49:45.177Z","schemaVersion":2},"datasetVersion":"2026-09-14T00:17:10.932Z"}