jackwener/OpenCLI · error · EmptyResultError
No NotebookLM sources were found on the current page.
Error message
No NotebookLM sources were found on the current page.
What it means
opencli notebooklm source-list throws this EmptyResultError when a notebook page is open but both the RPC-based listing (listNotebooklmSourcesViaRpc, errors swallowed to []) and the DOM fallback (listNotebooklmSourcesFromPage) returned zero rows. There are genuinely no sources visible to the adapter.
Source
Thrown at clis/notebooklm/source-list.js:28
domain: NOTEBOOKLM_DOMAIN,
strategy: Strategy.COOKIE,
browser: true,
navigateBefore: false,
args: [],
columns: ['title', 'id', 'type', 'size', 'created_at', 'updated_at', 'url', 'source'],
func: async (page) => {
await requireNotebooklmSession(page);
const state = await getNotebooklmPageState(page);
if (state.kind !== 'notebook') {
throw new EmptyResultError('opencli notebooklm source-list', 'No NotebookLM notebook is open in the adapter session. Run `opencli notebooklm open <notebook>` first.');
}
const rpcRows = await listNotebooklmSourcesViaRpc(page).catch(() => []);
if (rpcRows.length > 0)
return rpcRows;
const domRows = await listNotebooklmSourcesFromPage(page);
if (domRows.length > 0)
return domRows;
throw new EmptyResultError('opencli notebooklm source-list', 'No NotebookLM sources were found on the current page.');
},
});
View on GitHub (pinned to 49907e53dc)
Solutions
- Add a source (`opencli notebooklm add-source`) if the notebook is truly empty.
- Reopen/reload the notebook (`opencli notebooklm open <notebook>`) and retry after the UI settles.
- Retry after a delay; if both strategies keep failing on a non-empty notebook, update opencli to match the current NotebookLM UI/RPC.
Example fix
// before opencli notebooklm source-list # empty notebook // after opencli notebooklm add-source "overview.md" opencli notebooklm source-list
Defensive patterns
Strategy: fallback
Validate before calling
const sources = await exec('opencli notebooklm source-list --json');
if (!Array.isArray(sources) || sources.length === 0) {
console.warn('No sources listed — notebook may be empty or still loading');
} Type guard
function hasSources(rows) {
return Array.isArray(rows) && rows.length > 0 && typeof rows[0]?.id === 'string';
} Try / catch
let sources = [];
try {
sources = await run('opencli notebooklm source-list');
} catch (err) {
if (/No NotebookLM sources were found/.test(err.message)) {
await run('opencli notebooklm open', [notebook]);
await delay(3000);
sources = await run('opencli notebooklm source-list').catch(() => []);
} else {
throw err;
}
} Prevention
- Populate the notebook with add-source before listing in pipelines.
- Reopen and wait for render if the notebook was just opened.
- Retry once on empty results before failing the pipeline.
- Track NotebookLM UI updates; empty listings on populated notebooks indicate an outdated adapter.
When it happens
Trigger: source-list on an empty notebook; both listing strategies fail during page load/animation; NotebookLM UI change breaks DOM selectors while the RPC endpoint errors; sources section collapsed/not rendered at scrape time.
Common situations: Newly created empty notebook; flaky network preventing the internal batchexecute RPC; adapter outdated after a NotebookLM frontend update; scraping raced ahead of the source panel rendering.
Related errors
- No NotebookLM sources were found on the current page.
- No NotebookLM sources were found on the current page.
- opencli notebooklm current
- notebooklm generate-audio
- notebooklm generate-slides
AI-assisted analysis of jackwener/OpenCLI@49907e53dc (2026-08-29).
Data as JSON: /api/errors/106d283121c9bb5a.
Report an issue: GitHub.