Bug Summary
notebooklm login cannot switch to a different Google account. Two issues:
-
Cached browser profile auto-logs in: Even after deleting ~/.notebooklm/storage_state.json, running notebooklm login automatically logs into the previously authenticated account because the browser profile at ~/.notebooklm/browser_profile/ retains Google session cookies.
-
Crash when adding new account: When attempting to click "Use another account" on the Google sign-in page, the browser closes and throws a TargetClosedError.
Steps to Reproduce
- Authenticate with Account A:
notebooklm login
- Delete auth state:
rm ~/.notebooklm/storage_state.json
- Run
notebooklm login again — it auto-logs into Account A (no account picker shown)
- If you manually navigate to "Use another account" before it auto-redirects, the browser closes with:
playwright._impl._errors.TargetClosedError: Page.goto: Target page, context or browser has been closed
Expected Behavior
- A
notebooklm logout command (or notebooklm auth logout) that clears both storage_state.json and the browser profile session
- OR
notebooklm login --new / notebooklm login --account flag that opens a fresh browser context without cached Google sessions
Workaround
Manually delete the entire browser profile directory before re-login:
rm -rf ~/.notebooklm/browser_profile ~/.notebooklm/storage_state.json
notebooklm login
Environment
- notebooklm-py: v0.3.4
- Python: 3.14
- OS: macOS (Darwin 24.6.0)
- Playwright browser: Chromium (bundled)
Interested in Contributing
Happy to submit a PR for this if the maintainers agree on the approach (e.g., adding a logout command or a --fresh flag to login).
Bug Summary
notebooklm logincannot switch to a different Google account. Two issues:Cached browser profile auto-logs in: Even after deleting
~/.notebooklm/storage_state.json, runningnotebooklm loginautomatically logs into the previously authenticated account because the browser profile at~/.notebooklm/browser_profile/retains Google session cookies.Crash when adding new account: When attempting to click "Use another account" on the Google sign-in page, the browser closes and throws a
TargetClosedError.Steps to Reproduce
notebooklm loginrm ~/.notebooklm/storage_state.jsonnotebooklm loginagain — it auto-logs into Account A (no account picker shown)Expected Behavior
notebooklm logoutcommand (ornotebooklm auth logout) that clears bothstorage_state.jsonand the browser profile sessionnotebooklm login --new/notebooklm login --accountflag that opens a fresh browser context without cached Google sessionsWorkaround
Manually delete the entire browser profile directory before re-login:
Environment
Interested in Contributing
Happy to submit a PR for this if the maintainers agree on the approach (e.g., adding a
logoutcommand or a--freshflag tologin).