{"record":{"id":"107526a8609a8dc0","repo":"jackwener/OpenCLI","slug":"notebooklm-home-link-probe-returned-malformed-brow","errorCode":null,"errorMessage":"NotebookLM home-link probe returned malformed Browser Bridge data","messagePattern":"NotebookLM home-link probe returned malformed Browser Bridge data","errorType":"exception","errorClass":"CommandExecutionError","httpStatus":null,"severity":"error","filePath":"clis/notebooklm/utils.js","lineNumber":794,"sourceCode":"        subtitleTitleNode?.getAttribute?.('title') ||\n        subtitleTextNode?.textContent ||\n        ''\n      ).trim();\n\n      rows.push({\n        id,\n        title,\n        url: href,\n        source: 'home-links',\n        is_owner: true,\n        created_at: createdAtHint || null,\n      });\n    }\n\n    return rows;\n  })()`, 'home-link probe');\n    if (!Array.isArray(raw))\n        throw new CommandExecutionError('NotebookLM home-link probe returned malformed Browser Bridge data');\n    return raw.map((row) => {\n        if (!isPlainObject(row) || typeof row.id !== 'string' || typeof row.title !== 'string' || typeof row.url !== 'string' || (row.created_at !== null && row.created_at !== undefined && typeof row.created_at !== 'string') || (row.is_owner !== undefined && typeof row.is_owner !== 'boolean')) {\n            throw new CommandExecutionError('NotebookLM home-link probe returned a malformed row');\n        }\n        const url = normalizeNotebooklmNotebookUrl(row.url, row.id);\n        if (!url) {\n            throw new CommandExecutionError('NotebookLM home-link probe returned an untrusted or mismatched notebook URL');\n        }\n        return {\n        id: row.id,\n        title: normalizeNotebooklmTitle(row.title, 'Untitled Notebook'),\n        url,\n        source: 'home-links',\n        is_owner: row.is_owner === false ? false : true,\n        created_at: normalizeNotebooklmCreatedAt(row.created_at),\n        };\n    });\n}","sourceCodeStart":776,"sourceCodeEnd":812,"githubUrl":"https://github.com/jackwener/OpenCLI/blob/49907e53dc3ade5c223ff0c4c2c2785687cec4e6/clis/notebooklm/utils.js#L776-L812","documentation":"The home-link probe asks Browser Bridge for the list of notebook links on the NotebookLM home page. The result must be an array; anything else (null, object, string) means the injected script did not produce the expected rows payload, so the CLI throws this CommandExecutionError rather than iterating over bad data.","triggerScenarios":"The evaluated home-link script returns a non-array — typically because the page is not the NotebookLM home page, the link-collection query matched nothing and the wrapper returned a non-array value, or the bridge evaluation failed and returned an error object.","commonSituations":"Running the list command while the browser shows a notebook detail page instead of home, a NotebookLM redesign changing the home link markup, or the bridge returning undefined when no tabs match.","solutions":["Open the NotebookLM home page (https://notebooklm.google.com/) in the active Chrome tab and retry.","Reload the page so the notebook list has rendered before probing.","Check the Browser Bridge extension is installed, enabled, and connected.","Update the CLI if NotebookLM recently changed its home-page markup."],"exampleFix":"// before: assuming an array\nconst rows = await probeHomeLinks();\nrows.forEach(render);\n\n// after: guard\nlet rows = [];\ntry {\n  rows = await probeHomeLinks();\n} catch (e) {\n  if (!String(e.message).includes('malformed Browser Bridge data')) throw e;\n  console.error('Navigate to the NotebookLM home page and retry.');\n}","handlingStrategy":"try-catch","validationCode":"if (!currentTabUrl || !currentTabUrl.startsWith('https://notebooklm.google.com/')) {\n  throw new Error('Open the NotebookLM home page before listing notebooks.');\n}","typeGuard":"const isRowArray = (v) => Array.isArray(v);","tryCatchPattern":"let notebooks = [];\ntry {\n  notebooks = await probeHomeLinks();\n} catch (e) {\n  if (String(e.message).includes('malformed Browser Bridge data')) {\n    console.error('Open https://notebooklm.google.com/ in Chrome and retry.');\n  } else { throw e; }\n}","preventionTips":["Run list commands only while the NotebookLM home page is open and rendered.","Keep the Browser Bridge extension healthy; re-check after Chrome restarts.","Update the CLI when NotebookLM ships UI changes.","Add a small retry with backoff around probes."],"tags":["browser-bridge","notebooklm","probe","schema-validation-failed"],"backgroundTag":"browser-bridge-malformed-response","analyzedSha":"49907e53dc3ade5c223ff0c4c2c2785687cec4e6","analyzedAt":"2026-08-29T08:14:47.543Z","schemaVersion":2},"datasetVersion":"2026-08-29T12:17:43.993Z"}