jackwener/OpenCLI · error · EmptyResultError
NotebookLM fulltext was not available for source "${matched.
Error message
NotebookLM fulltext was not available for source "${matched.title}". What it means
Once a source row is matched, source-fulltext tries getNotebooklmSourceFulltextViaRpc; any failure (transport, auth, parse) is swallowed via .catch(() => null). If fulltext comes back null, the command has no content to return and throws an EmptyResultError naming the matched source title — the source exists but its full text could not be retrieved.
Source
Thrown at clis/notebooklm/source-fulltext.js:42
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
- Retry the command — the swallowed error may be transient; re-authenticate first if the session is stale.
- Verify the source opens with readable text in the NotebookLM web UI; for links, re-add as a source that produces extracted text.
- Temporarily remove the .catch(() => null) (or enable debug logging) to surface the underlying RPC error.
- Fall back to fetching the original document directly if NotebookLM cannot serve its fulltext.
Example fix
// before: error silently swallowed
const fulltext = await getNotebooklmSourceFulltextViaRpc(page, id).catch(() => null);
// after: log why fulltext failed
const fulltext = await getNotebooklmSourceFulltextViaRpc(page, id)
.catch(err => { console.error('fulltext RPC failed:', err.message); return null; }); Defensive patterns
Strategy: fallback
Validate before calling
const sources = await runCommand('notebooklm source-list');
const s = sources.find(x => x.id === id);
if (s && /link|website|youtube/i.test(s.kind)) {
console.warn('Source kind may not expose fulltext via RPC; prepare a direct-fetch fallback.');
} Type guard
function hasFulltext(r) {
return r !== null && typeof r === 'object' && typeof r.fulltext === 'string' && r.fulltext.length > 0;
} Try / catch
try {
const rows = await runCommand('notebooklm source-fulltext', { source: query });
} catch (e) {
if (e instanceof EmptyResultError && e.message.includes('fulltext was not available')) {
// re-authenticate and retry once, else fall back to fetching the original document directly
} else throw e;
} Prevention
- Prefer uploaded documents (PDF/TXT) over raw links when fulltext extraction matters.
- Verify the source shows extracted text in the web UI before automating fulltext reads.
- Log the swallowed error from getNotebooklmSourceFulltextViaRpc in debug mode to find root causes.
- Maintain a fallback path to the original document for link-type sources.
When it happens
Trigger: The per-source fulltext RPC failed (auth error, 404 for the source ID, unexpected response shape) and was caught to null; the source type has no extractable text (e.g. certain imported/linked sources); the returned payload parsed but yielded no body.
Common situations: Session auth quietly degraded so the fulltext RPC 401s and is swallowed; the source is a website/YouTube link with no cached text; Google-side change to the fulltext RPC response shape; transient server error during the fulltext fetch.
Related errors
- NotebookLM AddFileSource (o4cbdc) RPC returned no source id;
- NotebookLM AddSources RPC returned no source id; verify the
- NotebookLM CreateProject RPC returned no notebook id
- opencli notebooklm current
- notebooklm generate-audio
AI-assisted analysis of jackwener/OpenCLI@49907e53dc (2026-08-29).
Data as JSON: /api/errors/2cd01015827310df.
Report an issue: GitHub.