{"record":{"id":"cdf16ea86ae89d26","repo":"toeverything/AFFiNE","slug":"failed-to-process-failures-length-blobs","errorCode":null,"errorMessage":"Failed to process ${failures.length} blobs:","messagePattern":"Failed to process (.+?) blobs:","errorType":"console","errorClass":null,"httpStatus":null,"severity":"error","filePath":"blocksuite/affine/widgets/linked-doc/src/transformers/zip.ts","lineNumber":69,"sourceCode":"      try {\n        await job.assetsManager.readFromBlob(blobId);\n        const ext = getAssetName(assetsMap, blobId).split('.').at(-1);\n        const blob = assetsMap.get(blobId);\n        if (blob) {\n          await assets.file(`${blobId}.${ext}`, blob);\n          return { success: true, blobId };\n        }\n        return { success: false, blobId, error: 'Blob not found' };\n      } catch (error) {\n        console.error(`Failed to process blob: ${blobId}`, error);\n        return { success: false, blobId, error };\n      }\n    })\n  );\n\n  const failures = results.filter(r => !r.success);\n  if (failures.length > 0) {\n    console.warn(`Failed to process ${failures.length} blobs:`, failures);\n  }\n\n  const downloadBlob = await zip.generate();\n  // Use the collection id as the zip file name\n  return download(downloadBlob, `${collection.id}.bs.zip`);\n}\n\nasync function importDocs(\n  collection: Workspace,\n  schema: Schema,\n  imported: Blob\n) {\n  const unzip = new Unzip();\n  await unzip.load(imported);\n\n  const assetBlobs: [string, Blob][] = [];\n  const snapshotsBlobs: Blob[] = [];\n","sourceCodeStart":51,"sourceCodeEnd":87,"githubUrl":"https://github.com/toeverything/AFFiNE/blob/b4c8548c09da21b2898443559a5b846f0ccf5dd8/blocksuite/affine/widgets/linked-doc/src/transformers/zip.ts#L51-L87","documentation":"Warning logged in `exportDocs` when one or more blobs could not be written into the export zip — readFromBlob threw (missing/corrupt blob) or the blob entry was absent. The failing blob ids are listed and export continues with everything else, producing a zip that omits the failed assets.","triggerScenarios":"Triggered when exporting docs to a zip archive and one or more blobs fail to be retrieved from the blob storage, so the export proceeds with those blobs missing.","commonSituations":"Occurs when exporting a workspace whose attachments are not fully synced or were removed. Re-export after sync completes, and expect missing files in the archive otherwise.","solutions":["Inspect the listed blob failures and retry the zip transform.","Remove or replace the failing blobs."],"exampleFix":null,"handlingStrategy":"fallback","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"b4c8548c09da21b2898443559a5b846f0ccf5dd8","analyzedAt":"2026-08-18T21:16:52.546Z","contentChangedAt":"2026-08-18T21:16:52.546Z","schemaVersion":2},"datasetVersion":"2026-09-14T00:17:10.932Z"}