jackwener/OpenCLI · error · CommandExecutionError

Failed to open NotebookLM home: ${error?.message || error}

Error message

Failed to open NotebookLM home: ${error?.message || error}

What it means

openNotebooklmHome (or equivalent) navigates the browser page to the NotebookLM home URL (optionally with authuser param) and waits; if page.goto or the wait throws, the error is wrapped into this CommandExecutionError. It means the Browser Bridge could not even load the NotebookLM home page, so no subsequent RPC or scraping can proceed.

Source

Thrown at clis/notebooklm/utils.js:638

    return parseNotebooklmVisibleNoteRawRow(raw, state.notebookId, state.url || `https://${NOTEBOOKLM_DOMAIN}/notebook/${state.notebookId}`);
}
export async function ensureNotebooklmHome(page) {
    const currentUrl = page.getCurrentUrl
        ? await page.getCurrentUrl().catch(() => null)
        : null;
    const currentKind = currentUrl ? classifyNotebooklmPage(currentUrl) : 'unknown';
    if (currentKind === 'home')
        return;
    const authuser = getNotebooklmAuthuser();
    const current = parseTrustedNotebooklmUrl(currentUrl);
    const home = current ? `${current.origin}/` : NOTEBOOKLM_HOME_URL;
    const target = authuser ? `${home}?authuser=${encodeURIComponent(authuser)}` : home;
    try {
        await page.goto(target);
        await page.wait(2);
    }
    catch (error) {
        throw new CommandExecutionError(`Failed to open NotebookLM home: ${error?.message || error}`);
    }
}
export async function getNotebooklmPageState(page) {
    const raw = await evaluateNotebooklm(page, `(() => {
    const url = window.location.href;
    const title = document.title || '';
    const hostname = window.location.hostname || '';
    const notebookMatch = url.match(/\\/notebook\\/([^/?#]+)/);
    const notebookId = notebookMatch ? notebookMatch[1] : '';
    const path = window.location.pathname || '/';
    const kind = notebookId
      ? 'notebook'
      : (hostname === 'notebooklm.google.com' || hostname === 'notebook.google.com' ? 'home' : 'unknown');

    const textNodes = Array.from(document.querySelectorAll('a, button, [role="button"], h1, h2'))
      .map(node => (node.textContent || '').trim().toLowerCase())
      .filter(Boolean);
    const loginRequired = path === '/login' || path.startsWith('/login/') || textNodes.some(text =>

View on GitHub (pinned to 49907e53dc)

Solutions

  1. Check network connectivity and that https://notebooklm.google.com loads in a normal browser
  2. Ensure the browser/page is launched and healthy before navigation (recreate the page if closed)
  3. Verify the authuser value is a valid index for the signed-in accounts
  4. Retry the navigation — Google endpoints occasionally return transient errors
  5. Check proxy/VPN/firewall settings if running in a restricted environment

Example fix

// before
await openNotebooklmHome(page);
// after: pre-check and retry
for (let i = 0; i < 3; i++) {
  try { await openNotebooklmHome(page, authuser); break; }
  catch (e) {
    if (!/Failed to open NotebookLM home/.test(e.message) || i === 2) throw e;
    await new Promise((r) => setTimeout(r, 2000));
  }
}
Defensive patterns

Strategy: retry

Validate before calling

// pre-flight: ensure the home URL is reachable
const res = await fetch('https://notebooklm.google.com/').catch(() => null);
if (!res || !res.ok) throw new Error('NotebookLM unreachable; fix network before opening page');

Type guard

function isNavigationFailure(e) {
  return /Failed to open NotebookLM home/.test(String(e?.message));
}

Try / catch

try {
  await openNotebooklmHome(page, authuser);
} catch (e) {
  if (!isNavigationFailure(e)) throw e;
  await new Promise((r) => setTimeout(r, 2000));
  await openNotebooklmHome(page, authuser); // retry transient navigation errors
}

Prevention

When it happens

Trigger: page.goto(target) fails — network outage/DNS failure, NotebookLM unreachable, browser closed or crashed, invalid authuser parameter, or the wait-after-navigation throwing because the page context died.

Common situations: No internet or corporate proxy blocking notebooklm.google.com; headless browser not launched or already closed; wrong Google account/authuser suffix causing a redirect loop; transient 5xx from Google.

Related errors


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