{"record":{"id":"2cd01015827310df","repo":"jackwener/OpenCLI","slug":"notebooklm-fulltext-was-not-available-for-source","errorCode":null,"errorMessage":"NotebookLM fulltext was not available for source \"${matched.title}\".","messagePattern":"NotebookLM fulltext was not available for source \"(.+?)\"\\.","errorType":"exception","errorClass":"EmptyResultError","httpStatus":null,"severity":"error","filePath":"clis/notebooklm/source-fulltext.js","lineNumber":42,"sourceCode":"        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":24,"sourceCodeEnd":45,"githubUrl":"https://github.com/jackwener/OpenCLI/blob/49907e53dc3ade5c223ff0c4c2c2785687cec4e6/clis/notebooklm/source-fulltext.js#L24-L45","documentation":"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.","triggerScenarios":"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.","commonSituations":"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.","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."],"exampleFix":"// before: error silently swallowed\nconst fulltext = await getNotebooklmSourceFulltextViaRpc(page, id).catch(() => null);\n// after: log why fulltext failed\nconst fulltext = await getNotebooklmSourceFulltextViaRpc(page, id)\n  .catch(err => { console.error('fulltext RPC failed:', err.message); return null; });","handlingStrategy":"fallback","validationCode":"const sources = await runCommand('notebooklm source-list');\nconst s = sources.find(x => x.id === id);\nif (s && /link|website|youtube/i.test(s.kind)) {\n  console.warn('Source kind may not expose fulltext via RPC; prepare a direct-fetch fallback.');\n}","typeGuard":"function hasFulltext(r) {\n  return r !== null && typeof r === 'object' && typeof r.fulltext === 'string' && r.fulltext.length > 0;\n}","tryCatchPattern":"try {\n  const rows = await runCommand('notebooklm source-fulltext', { source: query });\n} catch (e) {\n  if (e instanceof EmptyResultError && e.message.includes('fulltext was not available')) {\n    // re-authenticate and retry once, else fall back to fetching the original document directly\n  } else throw e;\n}","preventionTips":["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."],"tags":["empty-result","fulltext","rpc","notebooklm","swallowed-error"],"backgroundTag":"content-unavailable","analyzedSha":"49907e53dc3ade5c223ff0c4c2c2785687cec4e6","analyzedAt":"2026-08-29T08:14:47.543Z","schemaVersion":2},"datasetVersion":"2026-08-29T12:17:43.993Z"}