You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
genkit_firebase_ai: Live sessions fail on web when App Check is enforced #730
This happened for gemini-3.8-live on the Developer API and for both Live models on Agent Platform (us-central1). Non-Live requests in the same run passed App Check with the same registered debug token.
Repro (main at 7cb61bb, 2026-11-10, Chrome, firebase_ai 5.1.0 and 3.15.0, App Check enforced, registered debug token): the README Live example.
Cause. firebase_ai does not send the App Check token on the web WebSocket. LiveSession._defaultConnector (lib/src/live_session.dart):
On web the headers are dropped, and the token is in neither the URL (only ?key=) nor the setup message. Same code in 3.15.0, 4.0.0, 5.0.0 and 5.1.0. Browsers cannot set headers on a WebSocket, so this needs an upstream change.
This conflicts with the smoke run on #719, which records Live passing on web with App Check enforced, in a different project. Before acting on this, please check whether enforcement was active for that project: a generateContent POST to firebasevertexai.googleapis.com with the API key and no X-Firebase-AppCheck header returns 401 UNAUTHENTICATED: Firebase App Check token is invalid. when it is. It did in my project.
Proposed
Confirm on a second project with enforcement on.
README: say in the Live section that Live does not work on web while App Check is enforced. Enforcement is mandatory from 2027-01-21 at the latest.
You're right, my smoke run on #719 didn't have enforcement on for the Gemini API (a key-only generateContent call answers), so it doesn't contradict this. The cause checks out in firebase_ai 5.1.0's _defaultConnector. Filed upstream as firebase/flutterfire#18938, and #738 adds the README caveat.
Activity
adesinah commentedon Nov 10, 2026
You're right, my smoke run on #719 didn't have enforcement on for the Gemini API (a key-only
generateContentcall answers), so it doesn't contradict this. The cause checks out in firebase_ai 5.1.0's_defaultConnector. Filed upstream as firebase/flutterfire#18938, and #738 adds the README caveat.