jackwener/OpenCLI · error · CommandExecutionError
NotebookLM AddFileSource (o4cbdc) RPC returned no source…
Error message
NotebookLM AddFileSource (o4cbdc) RPC returned no source id; cannot start file upload.
What it means
After registering a file source via the NotebookLM AddFileSource RPC (id o4cbdc), the library parses the response for a source id. If none is found it cannot proceed to the Drive resumable upload, so it throws this CommandExecutionError. It indicates the backend rejected or failed the registration step.
Solutions
- Re-run the command after confirming an active NotebookLM session (browser login / auth refresh).
- Verify the file type is supported by NotebookLM (pdf, txt, md, docx, audio, etc.) and that the file is non-empty.
- Check whether the NotebookLM web UI can add the same file manually; if not, it is a backend/permission issue.
- Capture the raw RPC result (logging) and compare against the expected schema — the RPC id may have changed.
Defensive patterns
Strategy: try-catch
Validate before calling
if (!fs.existsSync(filePath) || fs.statSync(filePath).size === 0) throw new Error(`File missing or empty: ${filePath}`); Try / catch
try {
await addSource({ file: path });
} catch (e) {
if (String(e.message).includes('returned no source id')) {
// refresh session, verify file type supported, then retry once
}
throw e;
} Prevention
- Verify the session is logged in before uploads.
- Use supported, non-empty NotebookLM file types.
- Manually test the same file in the NotebookLM web UI first.
When it happens
Trigger: Calling `add-source --file <path>` where callNotebooklmRpc succeeds at the transport level but the o4cbdc response body contains no source id adjacent to the notebook id.
Common situations: Uploading an unsupported or zero-byte file type; the NotebookLM session is stale so the RPC silently fails; NotebookLM changed the RPC response schema; network interruption mid-RPC.
Related errors
- --file path does not exist
- --file path is not a regular file
- NotebookLM AddSources RPC returned no source id; verify the…
- NotebookLM CreateArtifact (slides) RPC returned no…
- NotebookLM CreateAudioOverview RPC returned no audio id…
AI-assisted analysis of jackwener/OpenCLI@49907e53dc (2026-08-29).
Data as JSON: /api/errors/b92e73725b61c7dd.
Report an issue: GitHub.
Appendix: source
Thrown at clis/notebooklm/add-source.js:228
const filePath = typeof kwargs.file === 'string' && kwargs.file.trim() ? kwargs.file.trim() : '';
const modes = [url ? 'url' : '', content !== null ? 'text' : '', filePath ? 'file' : ''].filter(Boolean);
if (modes.length === 0) {
throw new ArgumentError('Pass exactly one of --url <url>, --content <text>, or --file <path>');
}
if (modes.length > 1) {
throw new ArgumentError('Pass exactly one of --url, --content, --file (got: ' + modes.join(' + ') + ')');
}
requireNotebooklmExecute(kwargs.execute, 'add a NotebookLM source');
const title = parseSourceTitle(kwargs.title, 'Text Source');
await ensureNotebooklmHome(page);
await requireNotebooklmSession(page);
if (filePath) {
const file = readFileForUpload(filePath);
const mime = inferMimeType(file.filename, kwargs['mime-type']);
const registerRpc = await callNotebooklmRpc(page, NOTEBOOKLM_ADD_FILE_SOURCE_RPC_ID, buildRegisterFileSourceArgs(notebookId, file.filename));
const sourceId = parseAddSourceResult(registerRpc.result, [notebookId]);
if (!sourceId) {
throw new CommandExecutionError('NotebookLM AddFileSource (o4cbdc) RPC returned no source id; cannot start file upload.');
}
await uploadFileViaDriveResumable(page, notebookId, sourceId, file.filename, file.base64, file.size);
await verifyNotebooklmSourceAdded(page, notebookId, sourceId, 'add-source --file');
return [{
notebook_id: notebookId,
source_id: sourceId,
kind: 'file',
identifier: `${file.filename} (${mime}, ${file.size} bytes)`,
notebook_url: buildNotebooklmNotebookUrl(notebookId),
}];
}
const args = url
? buildAddSourceFromUrlArgs(notebookId, url)
: buildAddSourceFromTextArgs(notebookId, title, content);
const rpc = await callNotebooklmRpc(page, NOTEBOOKLM_ADD_SOURCES_RPC_ID, args);
const sourceId = parseAddSourceResult(rpc.result, [notebookId]);
if (!sourceId) {
throw new CommandExecutionError('NotebookLM AddSources RPC returned no source id; verify the input reaches the NotebookLM backend.');View on GitHub (pinned to 49907e53dc)