master-token login hangs indefinitely at #close on EmbeddedSetupAndroid consent (no crash)

Author: robjabezCreated Sep 4, 2026Updated Sep 8, 2026
Labelsbug

Description

notebooklm login --master-token crashes the automated browser right after Google sign-in succeeds, so master_token.json is never written. Plain notebooklm login (cookie-based) works fine on the same machine — only the --master-token flow is affected.

Steps to Reproduce

Step 1: Run notebooklm login --master-token --account <email>@gmail.com

Step 2: Complete the Google sign-in flow in the automated browser window: email, password, 2-Step Verification, the "who will be using this device" screen, then "I agree" on the Google ToS screen.

Step 3: Immediately after accepting the ToS, the browser context closes on its own and the CLI raises an error.

Expected Behavior

After Google sign-in succeeds, master-token capture should complete and write master_token.json to the profile directory.

Actual Behavior

The CLI raises:

Unexpected error: Target page, context or browser has been closed

Browser logs right before the crash show repeated errors:

[pid][err] ERROR:google_apis/gcm/engine/registration_request.cc:291 Registration response error message: DEPRECATED_ENDPOINT
[pid][err] ERROR:google_apis/gcm/engine/registration_request.cc:291 Registration response error message: DEPRECATED_ENDPOINT
[pid][err] ERROR:google_apis/gcm/engine/registration_request.cc:291 Registration response error message: DEPRECATED_ENDPOINT

followed by the CLI's own "This may be a bug" message pointing here.

master_token.json is never created. A subsequent notebooklm auth check --test --passive --json still shows master_token.present: false, with auth still sourced from the pre-existing storage_state.json cookie snapshot — so the account stays usable, but only via the fragile cookie-snapshot path this flag exists to avoid.

It looks like Chromium's own background GCM registration hits a deprecated Google endpoint during the automated sign-in and brings down the whole browser context before the token-capture step can run.

Version: notebooklm-py 0.8.2 (c1008a44) — latest release on PyPI as of 2026-09-03 OS: Windows 11