jackwener/OpenCLI · error · CliError
NOTEBOOKLM_RPC
NOTEBOOKLM_RPC
Error message
NotebookLM RPC failed${errorCode ? ` (code=${errorCode})` : ''} What it means
When a batchexecute error frame's numeric code is anything other than 401/403 (or absent), extractNotebooklmRpcResult throws CliError code NOTEBOOKLM_RPC with the code interpolated when known. This covers server-side rejections of the RPC that are not auth problems — malformed request, unknown rpc id, server error, quota. The message advises retrying from a logged-in session and enabling debug logging to inspect the raw response.
Source
Thrown at clis/notebooklm/rpc.js:160
export function extractNotebooklmRpcResult(rawBody, rpcId) {
const chunks = parseNotebooklmChunkedResponse(rawBody);
for (const chunk of chunks) {
if (!Array.isArray(chunk))
continue;
const items = Array.isArray(chunk[0]) ? chunk : [chunk];
for (const item of items) {
if (!Array.isArray(item) || item.length < 1)
continue;
if (item[0] === 'er') {
const errorCode = typeof item[2] === 'number'
? item[2]
: typeof item[5] === 'number'
? item[5]
: null;
if (errorCode === 401 || errorCode === 403) {
throw new AuthRequiredError(NOTEBOOKLM_DOMAIN, `NotebookLM RPC returned auth error (${errorCode})`);
}
throw new CliError('NOTEBOOKLM_RPC', `NotebookLM RPC failed${errorCode ? ` (code=${errorCode})` : ''}`, 'Retry from an already logged-in NotebookLM session, or inspect the raw response with debug logging.');
}
if (item[0] === 'wrb.fr' && item[1] === rpcId) {
const payload = item[2];
if (typeof payload === 'string') {
try {
return JSON.parse(payload);
}
catch {
throw new CliError('NOTEBOOKLM_RPC_SCHEMA', `NotebookLM RPC ${rpcId} returned malformed JSON`, 'Retry from the NotebookLM page; the internal RPC response shape may have changed.');
}
}
return payload;
}
}
}
throw new CliError('NOTEBOOKLM_RPC_SCHEMA', `NotebookLM RPC ${rpcId} returned no matching response frame`, 'Retry from the NotebookLM page; the internal RPC response shape may have changed.');
}
export async function fetchNotebooklmInPage(page, url, options = {}) {View on GitHub (pinned to 49907e53dc)
Solutions
- Retry the command — transient 5xx/429 errors often clear
- Run with debug logging to capture the raw batchexecute response and the error code
- Update the CLI: a changed internal RPC protocol usually means a client update is needed
- Confirm the notebook id/URL passed to the command is valid and accessible
Example fix
// before (blind retry loop on any failure)
try { await rpc(); } catch { await rpc(); }
// after (inspect code before deciding)
try { await rpc(); }
catch (e) {
if (e.code === 'NOTEBOOKLM_RPC' && /code=429/.test(e.message)) await sleep(backoff);
else throw e;
} Defensive patterns
Strategy: retry
Validate before calling
// validate inputs that commonly cause non-auth RPC failures
if (!notebookUrl.match(/https:\/\/notebooklm\.google\.com\/notebook\/[\w-]+/)) {
throw new Error('Invalid notebook URL/id before issuing RPC');
} Type guard
function isNonAuthRpcError(e) {
return e instanceof Error && e.code === 'NOTEBOOKLM_RPC' && !/\(40[13]\)/.test(e.message);
} Try / catch
try {
result = await callNotebooklmRpc(page, rpcId, payload);
} catch (e) {
if (isNonAuthRpcError(e) && /code=(429|5\d\d)/.test(e.message)) {
await sleep(backoff); // transient server-side; retry with backoff
} else throw e;
} Prevention
- Retry transient codes (429/5xx) with exponential backoff
- Update the CLI when errors persist — internal RPC ids change with frontend updates
- Enable debug logging to capture raw responses and exact error codes
When it happens
Trigger: callNotebooklmRpc receives an error frame with errorCode like 400/404/429/500, or a non-numeric code, so the 401/403 branch is skipped and the generic NOTEBOOKLM_RPC CliError is thrown.
Common situations: NotebookLM changed or retired an internal RPC id (protocol drift); request payload shape invalid after a CLI/page version mismatch; server-side quota (429); transient 5xx during Google incidents.
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
- NotebookLM CreateAudioOverview RPC returned no audio id; ser
- NotebookLM CreateArtifact (slides) RPC returned no slide-dec
AI-assisted analysis of jackwener/OpenCLI@49907e53dc (2026-08-29).
Data as JSON: /api/errors/4738d4e9482e1833.
Report an issue: GitHub.