laurent22/joplin · error · Error
No folder with id ${id}
Error message
No folder with id ${id} What it means
Thrown by goToFolder when Folder.load(id) returns null — no folder with the given id exists in the database. The helper navigates to the Notes route for a folder; navigation requires the folder to exist.
Source
Thrown at packages/app-mobile/commands/util/goToFolder.ts:6
import Folder from '@joplin/lib/models/Folder';
import NavService from '@joplin/lib/services/NavService';
const goToFolder = async (id: string) => {
if (!(await Folder.load(id))) {
throw new Error(`No folder with id ${id}`);
}
return NavService.go('Notes', { folderId: id });
};
export default goToFolder;
View on GitHub (pinned to 2654b33620)
Solutions
- Sync to pull the latest folder set to this device.
- Verify the id exists via Folder.load before navigating.
- Remove or fix the stale folder link in its source note.
- Catch the error and show a 'notebook not found' message instead of crashing.
Example fix
// before
if (!(await Folder.load(id))) {
throw new Error(`No folder with id ${id}`);
}
// after — softer message with sync hint
if (!(await Folder.load(id))) {
throw new Error(`No folder with id ${id}. It may have been deleted or not yet synced.`);
} Defensive patterns
Strategy: validation
Validate before calling
const folder = await Folder.load(id);
if (!folder) {
// sync then retry, or inform user the notebook is gone
await reg.syncAll();
if (!(await Folder.load(id))) return;
} Type guard
function folderExists(folder: FolderEntity | null): folder is FolderEntity {
return folder != null;
} Try / catch
try {
await goToFolder(id);
} catch (e) {
if (e.message.startsWith('No folder with id')) {
// sync, retry once; else show 'notebook not found'
} else throw e;
} Prevention
- Sync before navigating to folder links from other devices.
- Validate folder IDs against the DB before navigating.
- Remove stale folder links when the target is deleted.
When it happens
Trigger: goToFolder(id) is called (typically from openItemById after resolving a Folder link) and Folder.load(id) yields null. The `if (!(await Folder.load(id)))` guard throws.
Common situations: A link targets a notebook that was deleted; the folder has not synced to this device yet; the id is from another profile; a stale/edited link with a wrong id.
Related errors
- Item not found: ${itemId}
- Unable to scroll to hash -- no note open.
- No note with id ${id}
- Cannot move item with type ${itemType}
- Unsupported item type for links: ${item.type_}
AI-assisted analysis of laurent22/joplin@2654b33620 (2026-08-12).
Data as JSON: /api/errors/6ad4d0c5d86d9e69.
Report an issue: GitHub.