If Gemini works in your Flutter emulator but stops responding in a Play Store build, you may be looking at an App Check configuration problem, not a broken chat screen. The distinction matters now: Firebase says January 21, 2027 is the last date for projects that delayed or temporarily disabled baseline App Check enforcement for Firebase AI Logic. An older app version without valid attestation can lose its AI features even while the rest of the app works.
- 01What changes on January 21?
- 02What App Check does, and what it cannot do
- 03Step 1: Audit the app version your users actually have
- 04Step 2: Get a local Android example working
- 05Step 3: Verify a Play-distributed build, not just a local APK
- 06If Gemini still fails: narrow down the cause
- 07Official references
Here is how to work out whether the deadline affects your app, get an Android test build working, and verify the production build before users depend on it. This is a documentation-based walkthrough, not a claim that we tested your Firebase project.
What changes on January 21?
Firebase started automatically enforcing App Check for Firebase AI Logic on November 2, 2026. January 21 is the backstop, not the first day of enforcement. Firebase says projects that delayed or temporarily removed enforcement will be re-enforced, and baseline protection can no longer be turned off. If your project already enforces App Check, you can have the same version-specific failure today. Check the status of each Firebase project your app uses, including production and staging.
This change concerns apps calling Firebase AI Logic, including Flutter code using firebase_ai. It does not automatically apply to an on-device model or a Gemini call made by your own backend through a different integration. If you are choosing between those approaches, see our Flutter guide to Genkit and on-device AI.
What App Check does, and what it cannot do
App Check helps Firebase tell that a request came from a recognized app or device environment. On Android, a production provider such as Play Integrity helps establish that trust. The client SDK handles obtaining App Check tokens after setup. With baseline enforcement enabled, the service rejects requests without valid attestation.
Firebase Authentication and App Check answer different questions. Authentication identifies the signed-in user. App Check helps verify the app making the request. A user may be correctly signed in and still have a request rejected if the app build does not obtain a valid token. Conversely, a valid token does not tell you what that user is allowed to do or how many model calls they should make.
Step 1: Audit the app version your users actually have
- Find the Firebase project attached to your production release. Check the active flavor and generated Firebase options, not just the project open in your browser.
- In Firebase Console, open App Check and look at Firebase AI Logic in the APIs tab. Confirm whether baseline protection is enforced, and inspect the verified and unverified request metrics.
- List the app versions you still support and which call AI Logic. A debug build working on your laptop says nothing about users who installed an older build last month.
If you are starting from FlutterFever’s Firebase-backed chat example, insert App Check before the tutorial’s first model request. You do not need to rebuild the chat widget to add it.
Step 2: Get a local Android example working
In an already configured FlutterFire project, add the missing package with flutter pub add firebase_app_check. Import it along with firebase_core; import foundation.dart for kDebugMode. Place the following inside your async main(), before the line that constructs FirebaseAI.googleAI(). This example is scoped to Android and uses the current class-based FlutterFire API.
WidgetsFlutterBinding.ensureInitialized();
await Firebase.initializeApp(
options: DefaultFirebaseOptions.currentPlatform,
);
await FirebaseAppCheck.instance.activate(
providerAndroid: kDebugMode
? const AndroidDebugProvider()
: const AndroidPlayIntegrityProvider(),
);
// Construct the Firebase AI Logic model after activation.
For an emulator, use a disposable development project wherever possible. Trigger a benign model request, find the debug token in the local logs, and register it under that test app’s debug tokens in the Firebase Console. Retry the same prompt and look for a response with App Check enforcement still on. Keep the debug token out of code, screenshots, bug reports and shared logs. Revoke it if exposed. Do not ship the debug provider or its token in a release.
Step 3: Verify a Play-distributed build, not just a local APK
- Follow Firebase’s production provider setup for the exact Android app and project. Check the Android package name and the appropriate SHA-256 signing certificate. A build distributed by Google Play may be signed differently from a local debug APK.
- Install through a Play testing track when that is how you will ship. Test on a supported physical device with a fresh install, then test an update over a version users already have. In both cases, send the same simple prompt.
- Check that the prompt produces a response and that the requests show up as verified in App Check metrics. A spinner disappearing or the Firebase Auth sign-in success is not enough evidence.
- Roll the update out early. Give existing users time to install it. Keep a clear fallback in the app if the AI feature is unavailable; don’t take unrelated screens down with it.
If Gemini still fails: narrow down the cause
- Only the emulator fails: verify the debug token was registered for the exact test app and project before changing model names or keys.
- Only the Play build fails: double-check production flavor, package identity, signing certificate and provider setup. Retest from the same distribution route.
- App Check is verified but the model call fails: investigate the returned error. A quota limit, model availability issue, or network failure is a different problem; do not treat every 403 or failed response as proof of attestation failure.
- Only older app versions fail: confirm whether those versions initialize App Check. Plan an update path rather than putting a Gemini key into the app or weakening production enforcement.
Release gate: verify one request from development and one from the actual release distribution path. Confirm which old versions are still making unverified requests, and ship the update with enough time for users to install it before the January backstop.