jackwener/OpenCLI · error · AuthRequiredError
NotebookLM requires a logged-in Google session
Error message
NotebookLM requires a logged-in Google session
What it means
After confirming a trusted NotebookLM URL, requireNotebooklmSession checks state.loginRequired. When the page indicates Google is not signed in, it throws AuthRequiredError for the NotebookLM domain so callers can trigger their authentication flow instead of scraping a logged-out page.
Source
Thrown at clis/notebooklm/utils.js:875
notebook_id: notebookId,
title: text,
url: window.location.href,
source: 'current-page',
});
}
return rows;
})()`));
if (!Array.isArray(raw))
return [];
return raw.filter((row) => row.id && row.title);
}
export async function requireNotebooklmSession(page) {
const state = await getNotebooklmPageState(page);
if (!parseTrustedNotebooklmUrl(state.url)) {
throw new CliError('NOTEBOOKLM_UNAVAILABLE', 'NotebookLM page is not available in the current browser session', `Open Chrome and navigate to ${NOTEBOOKLM_HOME_URL}`);
}
if (state.loginRequired) {
throw new AuthRequiredError(NOTEBOOKLM_DOMAIN, 'NotebookLM requires a logged-in Google session');
}
return state;
}
View on GitHub (pinned to 49907e53dc)
Solutions
- Sign in to Google in the attached Chrome session and reload the NotebookLM page.
- Retry after completing any Google re-auth/2FA prompt shown in the browser.
- Use a Chrome profile that persists cookies rather than incognito or a wiped automation profile.
- Handle AuthRequiredError in your tooling by pausing and prompting the user to log in interactively.
Example fix
// before: generic handling loses the auth signal
catch (e) { console.error(e.message); }
// after: route auth errors to a login flow
catch (e) {
if (e instanceof AuthRequiredError) {
console.error(`Please sign in to ${e.domain} in Chrome, then retry.`);
return;
}
throw e;
} Defensive patterns
Strategy: try-catch
Validate before calling
const state = await getNotebooklmPageState(page);
if (state.loginRequired) {
console.error('Sign in to Google in Chrome, then retry.');
return;
} Type guard
const isAuthRequired = (e) => e instanceof AuthRequiredError || (e && e.name === 'AuthRequiredError');
Try / catch
try {
const state = await requireNotebooklmSession(page);
} catch (e) {
if (e instanceof AuthRequiredError) {
console.error(`Please sign in to ${e.domain} in the attached Chrome session and retry.`);
return;
}
throw e;
} Prevention
- Use a persistent Chrome profile (not incognito) with an active Google session.
- Re-check login state after long idle periods; Google sessions expire.
- Avoid wiping browser data on profiles used for automation.
- Route AuthRequiredError to an interactive login prompt in tooling.
When it happens
Trigger: The NotebookLM page loaded while the browser has no authenticated Google session — session cookie expired, incognito profile without login, Google signed the user out, or the page redirected to a sign-in screen detected as loginRequired.
Common situations: Cookie expiry after weeks of use, clearing browser data, switching Chrome profiles, Google forcing re-auth after a security event, or running against a fresh automation profile that never logged in.
Related errors
- AuthRequiredError('gitee.com', probe.detail)
- auth
- Instagram sessionid cookie missing
- ${context} requires an active signed-in LinkedIn browser ses
- Manus session cookies missing — anonymous
AI-assisted analysis of jackwener/OpenCLI@49907e53dc (2026-08-29).
Data as JSON: /api/errors/6c1a9e7988e007d5.
Report an issue: GitHub.