Skip to content

Token capture no longer sees a Bearer during the labs.google handoff (NO_FLOW_KEY with PR #13 applied) #15

Description

@bmbcompanybrazil-maker

Summary

Since ~2026-09-11 the extension no longer captures a Bearer ya29.* token, even with PR #13 applied (flow.google.com host permissions, captcha on /project/<id> tabs). Every request then fails with NO_FLOW_KEY while /health still reports has_flow_key: true (stale cache).

What I measured (headed Chrome 151, Xvfb, real logged-in PRO profile, PR #13 at c8216f5 plus the sticky-tab fix)

  1. chrome.storage.local of the extension service worker: flowKeyStored: false, tokenCapturedAt: null, metrics.lastError: "NO_FLOW_KEY".
  2. Driving the handoff manually (labs.google/fx/tools/flow) now lands directly on https://flow.google.com/ (server redirect). No request to aisandbox-pa.googleapis.com carrying Authorization: Bearer was observed during the handoff nor on a full reload of a /project/<id> page (Playwright request listener on the same tab).
  3. On project load the app issues only POST flow.google.com/_/AiSandboxAngularFrontend/data/batchexecute (16x) plus SAPISIDHASH-authenticated calls to ogads-pa.clients6.google.com and play.google.com/log. So the page-level RPCs moved to a cookie-authenticated batchexecute path.
  4. POST /v1/refresh-tokens nudges the extension (nudged: 1), the extension logs refresh_flow_tab: forcing tab reload + re-capture, but no bearer appears afterwards.
  5. The Flow web UI itself keeps working in the same profile (composer with Frames/Start/End, Omni 1.1 Flash, 720p, credits shown), so the account and session are fine; only the token surface the extension relies on is gone.

Why it matters

The webRequest.onBeforeSendHeaders capture (background.js, startsWith('Bearer ya29.')) assumes the ya29 bearer is sent by the page during the labs.google handoff. That assumption no longer holds for this account/region, which makes flow image / flow video unusable even with PR #13.

Possible directions

  • Check whether the generation call issued from the UI (composer "Start generation") still goes to aisandbox-pa.googleapis.com with a bearer minted elsewhere (I did not trigger a paid generation while sniffing). If it does, the capture could hook that request instead of the handoff.
  • Otherwise the bridge would need to speak the batchexecute dialect with cookies (SAPISIDHASH), which is a larger change.
  • Meanwhile, /health should not report has_flow_key: true when the extension has no stored key; that masked the failure for me for a while.

Happy to run more measurements on this profile if useful.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions