usebruno/bruno · error · Error
Failed to reopen collection after migration
Error message
Failed to reopen collection after migration
What it means
Error "Failed to reopen collection after migration" thrown in usebruno/bruno.
Source
Thrown at packages/bruno-electron/src/ipc/yml-migration.js:282
mainWindow.webContents.send('main:display-error', { message });
};
// The renderer dropped the collection from its store before invoking us, so on every
// exit — success, failure or cancel — re-open from disk; the renderer re-creates and
// mounts it fresh via the normal main:collection-opened flow (same deterministic uid).
// openCollection catches load errors and returns { opened: false, error } rather than
// always throwing, so treat that shape as failure too.
const reopenCollection = async () => {
let result;
try {
result = await openCollection(mainWindow, watcher, collectionPathname);
} catch (reopenError) {
console.error('Failed to reopen collection after migration:', reopenError);
throw reopenError;
}
if (result?.opened === false) {
const message = result.error || 'Failed to reopen collection after migration';
console.error('Failed to reopen collection after migration:', message);
throw new Error(message);
}
};
let result;
try {
result = await migrateCollectionOnDisk({
collectionPathname,
brunoConfig,
backupRootDir: path.join(app.getPath('userData'), 'tmp', 'yml-migration'),
checkCancelled,
emitProgress,
reportError
});
// Remap .bru → .yml tab paths across EVERY workspace snapshot entry for this
// collection. Force-flushing only rewrites the active workspace; shared
// collections keep per-workspace tab lists that would otherwise restore as
// dead "Not Found" tabs after switching workspaces.View on GitHub (pinned to 9bdd81c7bd)
Solutions
- Close and reopen the collection manually from its directory.
- Check the collection directory still exists and is readable.
When it happens
Trigger: Thrown at packages/bruno-electron/src/ipc/yml-migration.js:282 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of usebruno/bruno@9bdd81c7bd (2026-08-13).
Data as JSON: /api/errors/316f9caa710d99e0.
Report an issue: GitHub.