jackwener/OpenCLI · error · EmptyResultError
opencli notebooklm note-list
Error message
opencli notebooklm note-list
What it means
`opencli notebooklm note-list` throws this EmptyResultError when the adapter session is not currently on a notebook page. The command lists notes from the Studio panel, which only exists inside an open notebook, so it checks getNotebooklmPageState first and aborts if kind !== 'notebook'.
Source
Thrown at clis/notebooklm/note-list.js:21
import { NOTEBOOKLM_DOMAIN, NOTEBOOKLM_SITE } from './shared.js';
import { getNotebooklmPageState, listNotebooklmNotesFromPage, requireNotebooklmSession, } from './utils.js';
cli({
site: NOTEBOOKLM_SITE,
name: 'note-list',
access: 'read',
aliases: ['notes-list'],
description: 'List saved notes from the Studio panel of the current NotebookLM notebook',
domain: NOTEBOOKLM_DOMAIN,
strategy: Strategy.COOKIE,
browser: true,
navigateBefore: false,
args: [],
columns: ['title', 'created_at', 'source', 'url'],
func: async (page) => {
await requireNotebooklmSession(page);
const state = await getNotebooklmPageState(page);
if (state.kind !== 'notebook') {
throw new EmptyResultError('opencli notebooklm note-list', 'No NotebookLM notebook is open in the adapter session. Run `opencli notebooklm open <notebook>` first.');
}
const rows = await listNotebooklmNotesFromPage(page);
if (rows.length > 0)
return rows;
throw new EmptyResultError('opencli notebooklm note-list', 'No NotebookLM notes are visible in the Studio panel. Reload the notebook page or close the note editor and retry.');
},
});
View on GitHub (pinned to 49907e53dc)
Solutions
- Run `opencli notebooklm open <notebook-id-or-url>` before `note-list`.
- Verify the notebook id with `opencli notebooklm list -f json`.
- Re-authenticate if the session was redirected away from the notebook.
- Keep the page on the notebook URL for the duration of note commands.
Example fix
// before opencli notebooklm note-list // after opencli notebooklm open <notebook-id> opencli notebooklm note-list
Defensive patterns
Strategy: validation
Validate before calling
if (!notebookId) throw new Error('note-list requires a notebook: run `opencli notebooklm open <notebook>` first'); Try / catch
try {
notes = await run('opencli notebooklm note-list -f json');
} catch (e) {
if (String(e.message).includes('No NotebookLM notebook is open')) {
await run('opencli notebooklm open <notebook-id>');
notes = await run('opencli notebooklm note-list -f json');
} else throw e;
} Prevention
- Make `open <notebook>` a mandatory preceding step in scripts.
- Store the opened notebook id and reuse it across commands.
- Re-run `open` if any other navigation occurred.
- Check for expired-session redirects before notebook-scoped calls.
When it happens
Trigger: Calling `opencli notebooklm note-list` with no prior `opencli notebooklm open <notebook>` in the session, or after the page has navigated away from the notebook (home page, sign-in redirect).
Common situations: Script ordering mistake where note-list runs before open; session cookie expiry redirecting to home; reusing a page object whose URL changed mid-script.
Related errors
- opencli notebooklm current
- opencli notebooklm get
- opencli notebooklm history
- opencli notebooklm notes-get
- No NotebookLM notebook is open in the adapter session. Run `
AI-assisted analysis of jackwener/OpenCLI@49907e53dc (2026-08-29).
Data as JSON: /api/errors/71a19e3687b5fcfe.
Report an issue: GitHub.