{"record":{"id":"d2b8840ece2324d8","repo":"jackwener/OpenCLI","slug":"notebooklm-addsources-rpc-returned-no-source-id-v","errorCode":null,"errorMessage":"NotebookLM AddSources RPC returned no source id; verify the input reaches the NotebookLM backend.","messagePattern":"NotebookLM AddSources RPC returned no source id; verify the input reaches the NotebookLM backend\\.","errorType":"exception","errorClass":"CommandExecutionError","httpStatus":null,"severity":"error","filePath":"clis/notebooklm/add-source.js","lineNumber":246,"sourceCode":"                throw new CommandExecutionError('NotebookLM AddFileSource (o4cbdc) RPC returned no source id; cannot start file upload.');\n            }\n            await uploadFileViaDriveResumable(page, notebookId, sourceId, file.filename, file.base64, file.size);\n            await verifyNotebooklmSourceAdded(page, notebookId, sourceId, 'add-source --file');\n            return [{\n                notebook_id: notebookId,\n                source_id: sourceId,\n                kind: 'file',\n                identifier: `${file.filename} (${mime}, ${file.size} bytes)`,\n                notebook_url: buildNotebooklmNotebookUrl(notebookId),\n            }];\n        }\n        const args = url\n            ? buildAddSourceFromUrlArgs(notebookId, url)\n            : buildAddSourceFromTextArgs(notebookId, title, content);\n        const rpc = await callNotebooklmRpc(page, NOTEBOOKLM_ADD_SOURCES_RPC_ID, args);\n        const sourceId = parseAddSourceResult(rpc.result, [notebookId]);\n        if (!sourceId) {\n            throw new CommandExecutionError('NotebookLM AddSources RPC returned no source id; verify the input reaches the NotebookLM backend.');\n        }\n        await verifyNotebooklmSourceAdded(page, notebookId, sourceId, `add-source --${url ? 'url' : 'content'}`);\n        return [{\n            notebook_id: notebookId,\n            source_id: sourceId,\n            kind: url ? 'url' : 'text',\n            identifier: url || title,\n            notebook_url: buildNotebooklmNotebookUrl(notebookId),\n        }];\n    },\n});\n\nexport const __test__ = {\n    parseSourceUrl,\n    parseSourceText,\n    parseSourceTitle,\n    inferMimeType,\n    buildAddSourceFromUrlArgs,","sourceCodeStart":228,"sourceCodeEnd":264,"githubUrl":"https://github.com/jackwener/OpenCLI/blob/49907e53dc3ade5c223ff0c4c2c2785687cec4e6/clis/notebooklm/add-source.js#L228-L264","documentation":"The AddSources RPC (used for --url and --content source creation) returned a response from which no new source id could be parsed. The library throws this CommandExecutionError because it cannot verify the source was added without an id. The message hints the input may not have reached the backend.","triggerScenarios":"Running `add-source --url <url>` or `add-source --content <text>` where the AddSources RPC resolves but parseAddSourceResult finds no id besides the notebook id in the result.","commonSituations":"Submitting a URL that Google refuses to fetch (paywalled, blocked); NotebookLM session expired so the RPC is a soft failure; very long content truncated; upstream response format changed.","solutions":["Refresh the NotebookLM session/auth and retry the command.","Test with a simple plain-text --content to isolate whether URLs or the RPC pipeline are the problem.","Verify in the NotebookLM web UI whether the source was actually created despite the missing id.","Log the raw rpc.result and check for an error payload or changed schema from the backend."],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":"if (url && !/^https?:\\/\\//.test(url)) throw new Error('URL must start with http(s)://');\nif (content && content.length > 1_000_000) console.warn('Content is very large; may be rejected');","typeGuard":null,"tryCatchPattern":"try {\n  await addSource({ content: text });\n} catch (e) {\n  if (String(e.message).includes('returned no source id')) {\n    await refreshAuth();\n    return addSource({ content: text }); // one retry\n  }\n  throw e;\n}","preventionTips":["Keep session/auth fresh before RPC-heavy commands.","Test with plain-text content to isolate URL-fetch failures.","Log raw RPC results when debugging; watch for backend schema changes."],"tags":["rpc","notebooklm","response-parsing"],"backgroundTag":"rpc-response-missing-field","analyzedSha":"49907e53dc3ade5c223ff0c4c2c2785687cec4e6","analyzedAt":"2026-08-29T08:14:47.543Z","schemaVersion":2},"datasetVersion":"2026-08-29T12:17:43.993Z"}