toeverything/AFFiNE · error · Error
No valid Bear textbundles found in the archive. Please selec
Error message
No valid Bear textbundles found in the archive. Please select a .bear2bk backup file.
What it means
planBearBackup parsed the .bear2bk zip but none of its entries formed a valid textbundle (missing Info.json or all entries marked trashed), so the archive is not a usable Bear backup; the message tells the user to pick a proper .bear2bk file.
Source
Thrown at blocksuite/affine/widgets/linked-doc/src/transformers/bear.ts:468
if (entry.infoJsonPath) {
try {
const text = await zip.file(entry.infoJsonPath)!.async('string');
info = JSON.parse(text);
} catch {
// Invalid JSON
}
}
const bearMeta = info['net.shinyfrog.bear'] as
| Record<string, unknown>
| undefined;
if (bearMeta?.trashed === 1) continue;
validBundles.push({ entry, bearMeta });
}
if (validBundles.length === 0) {
throw new Error(
'No valid Bear textbundles found in the archive. Please select a .bear2bk backup file.'
);
}
const docIds: string[] = [];
const docs: ImportDoc[] = [];
const importBlobs = new Map<
string,
Awaited<ReturnType<typeof blobsFromAssets>>[0]
>();
const warnings: ImportWarning[] = [];
const tagDocMap = new Map<string, string[]>();
// Process bundles sequentially to limit memory.
// Each bundle is wrapped in try/catch so one bad note does not abort the
// entire import after earlier notes have already been written.
for (const { entry, bearMeta } of validBundles) {
try {View on GitHub (pinned to b4c8548c09)
Solutions
- Make sure you selected a Bear 2.x backup archive with the .bear2bk extension; older Bear 1 backups use a different format.
- Verify the archive is not corrupted — re-export the backup from Bear and try again.
- Check that the zip archive contains .textbundle entries at its root; nested or renamed archives will not be detected.
Example fix
// In Bear: File > Export Notes > Bear2Backup (.bear2bk) // Then import that exact file — do not unzip and re-zip it, // which can strip the .textbundle entries the importer looks for.
Defensive patterns
Strategy: validation
When it happens
Trigger: Thrown at blocksuite/affine/widgets/linked-doc/src/transformers/bear.ts:468 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of toeverything/AFFiNE@b4c8548c09 (2026-08-18).
Data as JSON: /api/errors/b5c2bf4bd87484bd.
Report an issue: GitHub.