toeverything/AFFiNE · error

Failed to process ${failures.length} blobs:

Error message

Failed to process ${failures.length} blobs:

What it means

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.

Source

Thrown at blocksuite/affine/widgets/linked-doc/src/transformers/zip.ts:69

      try {
        await job.assetsManager.readFromBlob(blobId);
        const ext = getAssetName(assetsMap, blobId).split('.').at(-1);
        const blob = assetsMap.get(blobId);
        if (blob) {
          await assets.file(`${blobId}.${ext}`, blob);
          return { success: true, blobId };
        }
        return { success: false, blobId, error: 'Blob not found' };
      } catch (error) {
        console.error(`Failed to process blob: ${blobId}`, error);
        return { success: false, blobId, error };
      }
    })
  );

  const failures = results.filter(r => !r.success);
  if (failures.length > 0) {
    console.warn(`Failed to process ${failures.length} blobs:`, failures);
  }

  const downloadBlob = await zip.generate();
  // Use the collection id as the zip file name
  return download(downloadBlob, `${collection.id}.bs.zip`);
}

async function importDocs(
  collection: Workspace,
  schema: Schema,
  imported: Blob
) {
  const unzip = new Unzip();
  await unzip.load(imported);

  const assetBlobs: [string, Blob][] = [];
  const snapshotsBlobs: Blob[] = [];

View on GitHub (pinned to b4c8548c09)

Solutions

  1. Inspect the listed blob failures and retry the zip transform.
  2. Remove or replace the failing blobs.
Defensive patterns

Strategy: fallback

When it happens

Trigger: 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.

Common situations: 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.


AI-assisted analysis of toeverything/AFFiNE@b4c8548c09 (2026-08-18). Data as JSON: /api/errors/cdf16ea86ae89d26. Report an issue: GitHub.