laurent22/joplin · error · Error
Cannot find "%s".
Error message
Cannot find "%s".
What it means
Thrown by `geoloc <note>` when `app().loadItem(ModelType.Note, title, { parent: app().currentFolder() })` returns null. Like export --note, the lookup is scoped to the current notebook. Note.geolocationUrl requires the note to carry latitude/longitude metadata; the error here fires earlier, before geolocationUrl is reached, so it is purely a lookup failure, not a missing-coordinates problem.
Source
Thrown at packages/app-cli/app/command-geoloc.ts:20
import app from './app';
import { _ } from '@joplin/lib/locale';
import { ModelType } from '@joplin/lib/BaseModel';
import Note from '@joplin/lib/models/Note';
class Command extends BaseCommand {
public override usage() {
return 'geoloc <note>';
}
public override description() {
return _('Displays a geolocation URL for the note.');
}
public override async action(args: { note: string }) {
const title = args['note'];
const item = await app().loadItem(ModelType.Note, title, { parent: app().currentFolder() });
if (!item) throw new Error(_('Cannot find "%s".', title));
const url = Note.geolocationUrl(item);
this.stdout(url);
app()
.gui()
.showConsole();
}
}
module.exports = Command;
View on GitHub (pinned to 2654b33620)
Solutions
- Switch to the notebook containing the note: `joplin use <notebook>`
- Use the exact title from `joplin ls` or the full/short note id
- Confirm the note actually has geolocation metadata if lookup succeeds but the URL is empty (separate concern)
Example fix
// before joplin geoloc "Trip" // throws if "Trip" is not in current notebook // after joplin use Travel joplin geoloc Trip // or by id: joplin geoloc <note-id>
Defensive patterns
Strategy: validation
Validate before calling
import app from './app';
import { ModelType } from '@joplin/lib/BaseModel';
async function resolveNoteForGeoloc(title: string) {
if (!app().currentFolder()) throw new Error('Select a notebook first.');
const item = await app().loadItem(ModelType.Note, title, { parent: app().currentFolder() });
if (!item) throw new Error(`Cannot find "${title}". Verify with \`ls\` or use the note id.`);
return item;
} Type guard
const isNoteWithGeo = (n: any): n is { id: string; latitude?: number; longitude?: number } =>
!!n && typeof n.id === 'string'; Prevention
- Run `geoloc` from the notebook that contains the note
- Use full note ids to avoid title collisions and current-notebook scoping
- Confirm the note actually carries geo metadata if you need a non-empty URL
When it happens
Trigger: Note title typo; note exists in a different notebook than `currentFolder()`; note was deleted; partial note id <2 chars.
Common situations: Running `geoloc` after switching notebooks; referencing a note by a display title that differs from its stored title field.
Related errors
AI-assisted analysis of laurent22/joplin@2654b33620 (2026-08-12).
Data as JSON: /api/errors/c782a0dd5cce1f3a.
Report an issue: GitHub.