jackwener/OpenCLI · error · CommandExecutionError
Failed to open NotebookLM notebook ${notebookId}: ${error?.m
Error message
Failed to open NotebookLM notebook ${notebookId}: ${error?.message || error} What it means
This CommandExecutionError wraps any failure while navigating the adapter page to the target notebook's URL (`page.goto` + wait) during `notebooklm generate-audio`. It exists to attach the notebookId to the underlying navigation error.
Source
Thrown at clis/notebooklm/generate-audio.js:68
description: 'Trigger an Audio Overview (Deep Dive podcast) generation for a NotebookLM notebook, using all of its sources',
domain: NOTEBOOKLM_DOMAIN,
strategy: Strategy.COOKIE,
browser: true,
navigateBefore: false,
args: [
{ name: 'notebook', positional: true, required: true, help: 'Notebook id from `notebooklm list` or full notebook URL' },
{ name: 'execute', type: 'boolean', help: 'Actually trigger remote NotebookLM audio generation' },
],
columns: ['notebook_id', 'audio_id', 'source_count', 'status', 'notebook_url'],
func: async (page, kwargs) => {
const notebookId = parseNotebooklmNotebookTarget(String(kwargs.notebook ?? ''));
requireNotebooklmExecute(kwargs.execute, 'generate NotebookLM audio');
try {
await page.goto(buildNotebooklmNotebookUrl(notebookId));
await page.wait(2);
}
catch (error) {
throw new CommandExecutionError(`Failed to open NotebookLM notebook ${notebookId}: ${error?.message || error}`);
}
await requireNotebooklmSession(page);
const sources = await listNotebooklmSourcesViaRpc(page);
const sourceIds = sources.map((s) => s.id).filter((id) => typeof id === 'string' && id);
if (sourceIds.length === 0) {
throw new EmptyResultError('notebooklm generate-audio', 'The notebook has no sources; add a source before generating an audio overview.');
}
const rpc = await callNotebooklmRpc(page, NOTEBOOKLM_CREATE_AUDIO_RPC_ID, buildCreateAudioArgs(notebookId, sourceIds));
const audioId = parseAudioIdFromResult(rpc.result, [notebookId, ...sourceIds]);
if (!audioId) {
throw new CommandExecutionError('NotebookLM CreateAudioOverview RPC returned no audio id; server may have rejected the request.');
}
return [{
notebook_id: notebookId,
audio_id: audioId,
source_count: sourceIds.length,
status: 'pending',
notebook_url: buildNotebooklmNotebookUrl(notebookId),View on GitHub (pinned to 49907e53dc)
Solutions
- Check the notebookId is a valid NotebookLM notebook id/URL and correct typos.
- Re-authenticate the NotebookLM session (refresh cookies / re-login) and retry.
- Verify network connectivity and that the adapter browser session is alive, then rerun generate-audio.
Example fix
// before
callGenerateAudio({ notebookId: 'abc' }) // typo id -> goto fails
// after
const id = 'a1b2c3...verified-from-notebooklm-current'
callGenerateAudio({ notebookId: id }) Defensive patterns
Strategy: try-catch
Validate before calling
if (!notebookId || !/^[A-Za-z0-9_-]+$/.test(notebookId)) throw new Error(`invalid notebookId: ${notebookId}`);
const state = await getNotebooklmPageState(page);
if (!state) throw new Error('adapter session is not alive'); Type guard
const isValidNotebookId = (id) => typeof id === 'string' && id.trim().length > 0;
Try / catch
try {
await generateAudio({ notebookId });
} catch (e) {
if (String(e.message).startsWith('Failed to open NotebookLM notebook')) {
await refreshNotebooklmSession();
return await generateAudio({ notebookId });
}
throw e;
} Prevention
- Verify the notebook id via `notebooklm current` or `list` before generating.
- Keep the NotebookLM session authenticated (fresh cookies).
- Confirm network/proxy availability before long automation runs.
When it happens
Trigger: `page.goto(buildNotebooklmNotebookUrl(notebookId))` or `page.wait(2)` throws — invalid/malformed notebookId producing a bad URL, network timeout, session browser closed, or NotebookLM redirect to login.
Common situations: Typo'd or truncated notebook id; NotebookLM auth cookie expired so navigation redirects and errors; offline or rate-limited session; browser tab crashed.
Related errors
- Failed to open NotebookLM notebook ${notebookId}: ${error?.m
- Failed to open NotebookLM home: ${error?.message || error}
- Failed to load Booking.com search page: ${err?.message || er
- Failed to open Chess.com analysis board: ${error?.message ||
- coupang product navigation failed: ${error?.message || error
AI-assisted analysis of jackwener/OpenCLI@49907e53dc (2026-08-29).
Data as JSON: /api/errors/d1d8c8070d32e8b5.
Report an issue: GitHub.