{"record":{"id":"19d88095705b9962","repo":"jackwener/OpenCLI","slug":"notebooklm-rpc-schema-19d880","errorCode":"NOTEBOOKLM_RPC_SCHEMA","errorMessage":"NotebookLM list RPC returned a non-array payload","messagePattern":"NotebookLM list RPC returned a non-array payload","errorType":"error_code","errorClass":"CliError","httpStatus":null,"severity":"error","filePath":"clis/notebooklm/utils.js","lineNumber":301,"sourceCode":"    };\n}\nfunction parseNotebooklmVisibleNoteRawRow(row, notebookId, url) {\n    const title = normalizeNotebooklmTitle(row?.title, '');\n    const content = String(row?.content ?? '').replace(/\\r\\n/g, '\\n').trim();\n    if (!title)\n        return null;\n    return {\n        notebook_id: notebookId,\n        id: null,\n        title,\n        content,\n        url,\n        source: 'studio-editor',\n    };\n}\nexport function parseNotebooklmListResult(result) {\n    if (!Array.isArray(result)) {\n        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.');\n    }\n    if (result.length === 0)\n        return [];\n    const rawNotebooks = result.length === 1 && Array.isArray(result[0]) && (result[0].length === 0 || Array.isArray(result[0][0]))\n        ? result[0]\n        : result;\n    return rawNotebooks.map((item) => {\n        if (!Array.isArray(item) || typeof item[2] !== 'string' || !item[2]) {\n            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.');\n        }\n        const meta = Array.isArray(item[5]) ? item[5] : [];\n        const timestamps = Array.isArray(meta[5]) ? meta[5] : [];\n        const id = typeof item[2] === 'string' ? item[2] : '';\n        const title = typeof item[0] === 'string'\n            ? item[0].replace(/^thought\\s*\\n/, '')\n            : '';\n        return {\n            id,","sourceCodeStart":283,"sourceCodeEnd":319,"githubUrl":"https://github.com/jackwener/OpenCLI/blob/49907e53dc3ade5c223ff0c4c2c2785687cec4e6/clis/notebooklm/utils.js#L283-L319","documentation":"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.","triggerScenarios":"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)`.","commonSituations":"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.","solutions":["Retry the command from the NotebookLM home page as the error suggests","Update the CLI to the latest version, which may track the new response schema","Inspect the raw RPC payload to confirm the shape and report/patch the parser if the schema changed upstream"],"exampleFix":"// before (stale CLI expecting old shape)\nopencli notebooklm list   // NOTEBOOKLM_RPC_SCHEMA: non-array payload\n// after\nnpm update opencli && opencli notebooklm list","handlingStrategy":"retry","validationCode":"if (!Array.isArray(listResult)) {\n  throw new Error('Unexpected NotebookLM list payload; likely an upstream schema change');\n}","typeGuard":"function isNotebookListPayload(v) {\n  return Array.isArray(v);\n}","tryCatchPattern":"try {\n  const rows = opencli.notebooklm.list();\n} catch (e) {\n  if (e.code === 'NOTEBOOKLM_RPC_SCHEMA') {\n    console.error('NotebookLM list response shape changed; retry from the NotebookLM home page and update the CLI.');\n  } else throw e;\n}","preventionTips":["Keep the CLI updated so the parser tracks NotebookLM's internal schema changes","Retry from the NotebookLM home page when this error appears, as the error suggests","Treat this as an upstream/API change, not an input mistake — report it if updating does not help"],"tags":["schema-changed","rpc","upstream-api","notebooklm"],"backgroundTag":"schema-validation-failed","analyzedSha":"49907e53dc3ade5c223ff0c4c2c2785687cec4e6","analyzedAt":"2026-08-29T08:14:47.543Z","schemaVersion":2},"datasetVersion":"2026-08-29T12:17:43.993Z"}