{"record":{"id":"784d1b57ad829c8c","repo":"jackwener/OpenCLI","slug":"no-notebooklm-sources-were-found-on-the-current-pa","errorCode":null,"errorMessage":"No NotebookLM sources were found on the current page.","messagePattern":"No NotebookLM sources were found on the current page\\.","errorType":"exception","errorClass":"EmptyResultError","httpStatus":null,"severity":"error","filePath":"clis/notebooklm/source-fulltext.js","lineNumber":32,"sourceCode":"    args: [\n        {\n            name: 'source',\n            positional: true,\n            required: true,\n            help: 'Source id or title from the current notebook',\n        },\n    ],\n    columns: ['title', 'kind', 'char_count', 'url', 'source'],\n    func: async (page, kwargs) => {\n        await requireNotebooklmSession(page);\n        const state = await getNotebooklmPageState(page);\n        if (state.kind !== 'notebook') {\n            throw new EmptyResultError('opencli notebooklm source-fulltext', 'No NotebookLM notebook is open in the adapter session. Run `opencli notebooklm open <notebook>` first.');\n        }\n        const rpcRows = await listNotebooklmSourcesViaRpc(page).catch(() => []);\n        const rows = rpcRows.length > 0 ? rpcRows : await listNotebooklmSourcesFromPage(page);\n        if (rows.length === 0) {\n            throw new EmptyResultError('opencli notebooklm source-fulltext', 'No NotebookLM sources were found on the current page.');\n        }\n        const query = typeof kwargs.source === 'string' ? kwargs.source : String(kwargs.source ?? '');\n        const matched = findNotebooklmSourceRow(rows, query);\n        if (!matched) {\n            throw new EmptyResultError('opencli notebooklm source-fulltext', `Source \"${query}\" was not found in the current notebook.`);\n        }\n        const fulltext = await getNotebooklmSourceFulltextViaRpc(page, matched.id).catch(() => null);\n        if (fulltext)\n            return [fulltext];\n        throw new EmptyResultError('opencli notebooklm source-fulltext', `NotebookLM fulltext was not available for source \"${matched.title}\".`);\n    },\n});\n","sourceCodeStart":14,"sourceCodeEnd":45,"githubUrl":"https://github.com/jackwener/OpenCLI/blob/49907e53dc3ade5c223ff0c4c2c2785687cec4e6/clis/notebooklm/source-fulltext.js#L14-L45","documentation":"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.","triggerScenarios":"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.","commonSituations":"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).","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."],"exampleFix":"// before: immediate fulltext call after open\nawait openNotebook(id);\nconst text = await sourceFulltext('doc.pdf');\n// after: allow the source list to hydrate\nawait openNotebook(id);\nawait page.waitForSelector('[data-source-row]', { timeout: 10000 });\nconst text = await sourceFulltext('doc.pdf');","handlingStrategy":"validation","validationCode":"// ensure the notebook has sources before requesting fulltext\nconst sources = await runCommand('notebooklm source-list');\nif (!sources || sources.length === 0) {\n  throw new Error('Notebook has no sources — add one before calling source-fulltext.');\n}","typeGuard":null,"tryCatchPattern":"try {\n  const rows = await runCommand('notebooklm source-fulltext', { source });\n} catch (e) {\n  if (e instanceof EmptyResultError && e.message.includes('No NotebookLM sources were found')) {\n    await delay(2000); // let the source list hydrate, then retry once\n    // or add a source before proceeding\n  } else throw e;\n}","preventionTips":["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."],"tags":["empty-result","empty-notebook","notebooklm","race-condition"],"backgroundTag":"empty-result-set","analyzedSha":"49907e53dc3ade5c223ff0c4c2c2785687cec4e6","analyzedAt":"2026-08-29T08:14:47.543Z","schemaVersion":2},"datasetVersion":"2026-08-29T12:17:43.993Z"}