jackwener/OpenCLI · error · CliError

NOTEBOOKLM_RPC_SCHEMA

NOTEBOOKLM_RPC_SCHEMA

Error message

NotebookLM list RPC returned a non-array payload

What it means

parseNotebooklmListResult validates the payload returned by the internal NotebookLM list RPC. NotebookLM uses undocumented internal endpoints, so if Google changes the response shape and the parsed result is no longer an array, the library fails fast with NOTEBOOKLM_RPC_SCHEMA rather than producing garbage rows. The remedy hint points at retrying from the NotebookLM home page.

Source

Thrown at clis/notebooklm/utils.js:301

    };
}
function parseNotebooklmVisibleNoteRawRow(row, notebookId, url) {
    const title = normalizeNotebooklmTitle(row?.title, '');
    const content = String(row?.content ?? '').replace(/\r\n/g, '\n').trim();
    if (!title)
        return null;
    return {
        notebook_id: notebookId,
        id: null,
        title,
        content,
        url,
        source: 'studio-editor',
    };
}
export function parseNotebooklmListResult(result) {
    if (!Array.isArray(result)) {
        throw new CliError('NOTEBOOKLM_RPC_SCHEMA', 'NotebookLM list RPC returned a non-array payload', 'Retry from the NotebookLM home page; the internal list response shape may have changed.');
    }
    if (result.length === 0)
        return [];
    const rawNotebooks = result.length === 1 && Array.isArray(result[0]) && (result[0].length === 0 || Array.isArray(result[0][0]))
        ? result[0]
        : result;
    return rawNotebooks.map((item) => {
        if (!Array.isArray(item) || typeof item[2] !== 'string' || !item[2]) {
            throw new CliError('NOTEBOOKLM_RPC_SCHEMA', 'NotebookLM list RPC returned a malformed notebook row', 'Retry from the NotebookLM home page; the internal list response shape may have changed.');
        }
        const meta = Array.isArray(item[5]) ? item[5] : [];
        const timestamps = Array.isArray(meta[5]) ? meta[5] : [];
        const id = typeof item[2] === 'string' ? item[2] : '';
        const title = typeof item[0] === 'string'
            ? item[0].replace(/^thought\s*\n/, '')
            : '';
        return {
            id,

View on GitHub (pinned to 49907e53dc)

Solutions

  1. Retry the command from the NotebookLM home page as the error suggests
  2. Update the CLI to the latest version, which may track the new response schema
  3. Inspect the raw RPC payload to confirm the shape and report/patch the parser if the schema changed upstream

Example fix

// before (stale CLI expecting old shape)
opencli notebooklm list   // NOTEBOOKLM_RPC_SCHEMA: non-array payload
// after
npm update opencli && opencli notebooklm list
Defensive patterns

Strategy: retry

Validate before calling

if (!Array.isArray(listResult)) {
  throw new Error('Unexpected NotebookLM list payload; likely an upstream schema change');
}

Type guard

function isNotebookListPayload(v) {
  return Array.isArray(v);
}

Try / catch

try {
  const rows = opencli.notebooklm.list();
} catch (e) {
  if (e.code === 'NOTEBOOKLM_RPC_SCHEMA') {
    console.error('NotebookLM list response shape changed; retry from the NotebookLM home page and update the CLI.');
  } else throw e;
}

Prevention

When it happens

Trigger: The internal list RPC resolves but with a non-array payload — e.g. an object, null, or a wrapped structure — because NotebookLM changed its internal response schema; parseNotebooklmListResult then hits `!Array.isArray(result)`.

Common situations: NotebookLM ships a frontend update that reshapes the batchexecute/list response; scraping with a stale CLI version; a transient server response such as an error object being parsed as the payload.

Understand the failure class

Background: Schema validation failed / invalid input schema: payload rejected because its shape doesn't match the expected schema — this error's family across 28 libraries.

Related errors


AI-assisted analysis of jackwener/OpenCLI@49907e53dc (2026-08-29). Data as JSON: /api/errors/19d88095705b9962. Report an issue: GitHub.