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
source-fulltext resolves the notebook's sources via the RPC path (falling back to page scraping); if both return zero rows, there is nothing to match the requested source against, so it throws an EmptyResultError for 'source-fulltext'. The notebook is open and valid but contains no (discoverable) sources.
Source
Thrown at clis/notebooklm/source-fulltext.js:32
args: [
{
name: 'source',
positional: true,
required: true,
help: 'Source id or title from the current notebook',
},
],
columns: ['title', 'kind', 'char_count', 'url', 'source'],
func: async (page, kwargs) => {
await requireNotebooklmSession(page);
const state = await getNotebooklmPageState(page);
if (state.kind !== 'notebook') {
throw new EmptyResultError('opencli notebooklm source-fulltext', 'No NotebookLM notebook is open in the adapter session. Run `opencli notebooklm open <notebook>` first.');
}
const rpcRows = await listNotebooklmSourcesViaRpc(page).catch(() => []);
const rows = rpcRows.length > 0 ? rpcRows : await listNotebooklmSourcesFromPage(page);
if (rows.length === 0) {
throw new EmptyResultError('opencli notebooklm source-fulltext', 'No NotebookLM sources were found on the current page.');
}
const query = typeof kwargs.source === 'string' ? kwargs.source : String(kwargs.source ?? '');
const matched = findNotebooklmSourceRow(rows, query);
if (!matched) {
throw new EmptyResultError('opencli notebooklm source-fulltext', `Source "${query}" was not found in the current notebook.`);
}
const fulltext = await getNotebooklmSourceFulltextViaRpc(page, matched.id).catch(() => null);
if (fulltext)
return [fulltext];
throw new EmptyResultError('opencli notebooklm source-fulltext', `NotebookLM fulltext was not available for source "${matched.title}".`);
},
});
View on GitHub (pinned to 49907e53dc)
Solutions
- Add the source to the notebook first (`opencli notebooklm add-source ...`) or pick a notebook that has sources.
- Wait a moment after opening the notebook and retry so the source list finishes loading.
- Retry to let listNotebooklmSourcesViaRpc succeed (its failure is swallowed by .catch(() => [])); check RPC errors separately if it keeps failing.
- Verify in the NotebookLM web UI that the notebook actually lists sources.
Example fix
// before: immediate fulltext call after open
await openNotebook(id);
const text = await sourceFulltext('doc.pdf');
// after: allow the source list to hydrate
await openNotebook(id);
await page.waitForSelector('[data-source-row]', { timeout: 10000 });
const text = await sourceFulltext('doc.pdf'); Defensive patterns
Strategy: validation
Validate before calling
// ensure the notebook has sources before requesting fulltext
const sources = await runCommand('notebooklm source-list');
if (!sources || sources.length === 0) {
throw new Error('Notebook has no sources — add one before calling source-fulltext.');
} Try / catch
try {
const rows = await runCommand('notebooklm source-fulltext', { source });
} catch (e) {
if (e instanceof EmptyResultError && e.message.includes('No NotebookLM sources were found')) {
await delay(2000); // let the source list hydrate, then retry once
// or add a source before proceeding
} else throw e;
} Prevention
- Allow a short delay after opening a notebook before querying sources.
- Check the source list is non-empty before fulltext calls.
- Verify in the web UI that the notebook actually contains sources.
- Don't swallow listNotebooklmSourcesViaRpc errors silently when debugging empty results.
When it happens
Trigger: Running source-fulltext on a brand-new empty notebook; listNotebooklmSourcesViaRpc failed silently (caught to []) and listNotebooklmSourcesFromPage found no rendered source rows (e.g. sources panel not loaded or lazy-rendered); page state detected as notebook before sources finished loading.
Common situations: Calling the command immediately after opening a notebook before the source list hydrates; a genuinely empty notebook; a UI change breaking the scraper fallback while RPC also failed (e.g. 403 caught and swallowed).
Understand the failure class
Background: EmptyResultError / "no results found": when an API or scraper succeeds but returns zero rows — this error's family across 9 libraries.
Related errors
- opencli notebooklm current
- notebooklm generate-audio
- notebooklm generate-slides
- opencli notebooklm get
- opencli notebooklm history
AI-assisted analysis of jackwener/OpenCLI@49907e53dc (2026-08-29).
Data as JSON: /api/errors/784d1b57ad829c8c.
Report an issue: GitHub.