Maaz Zindani

Loading the index…

↑↓ move↵ openesc close4072 pages
Flutter and app store releases

Flutter: FirebaseException No AppCheckProvider installed

Errorcom.google.firebase.FirebaseException: No AppCheckProvider installed

Short answer

Firebase App Check needs a provider chosen in your Dart code before other Firebase calls run. This error means no provider was ever activated, or activation ran in the wrong place. Call FirebaseAppCheck.instance.activate right after Firebase.initializeApp, with the debug provider for emulators and development builds.

  • Applies to Flutter 3, firebase_core, firebase_app_check
  • Updated
  • By Maaz Zindani, Senior Software Engineer

Fix it fast

  1. 1Find out which cause you have

    Search the project for the activate call. If nothing is found, or it sits after code that already uses Firebase, that is the cause.

    grep -rn "FirebaseAppCheck.instance.activate" lib/
  2. 2Match what you see, then jump to its fix

    1. 1The grep finds nothing, or the call is not directly after initializeAppactivate() is never called, or called too lateFix
    2. 2FirebaseAppCheck is an undefined name, or the native side was never built with the pluginThe firebase_app_check package is not in the app yetFix
    3. 3The error or App Check rejections appear only on emulators, CI, or debug buildsAn emulator or development build cannot be attestedFix

What does the error look like?

  • com.google.firebase.FirebaseException: No AppCheckProvider installed

Cause 1 of 3

activate() is never called, or called too late

1Check

Open main.dart and look at the order of calls before runApp.

grep -n "initializeApp\|activate\|runApp" lib/main.dart

2Fix

Initialize Firebase first, then activate App Check, then use any other Firebase service. Android uses Play Integrity by default, and Apple platforms take an appleProvider.

await Firebase.initializeApp(
  options: DefaultFirebaseOptions.currentPlatform,
);
await FirebaseAppCheck.instance.activate(
  appleProvider: AppleProvider.appAttest,
);

3Verify

Rebuild with a full run, then trigger the Firebase call that failed.

flutter run

Confirmed by firebase.google.com

Did this fix it?

Cause 2 of 3

The firebase_app_check package is not in the app yet

1Check

Look for the package in pubspec.yaml.

grep -n "firebase_app_check" pubspec.yaml

2Fix

Add the package and rebuild the app. Hot reload does not install a new native plugin.

flutter pub add firebase_app_check
flutter run

3Verify

The import resolves and the app starts without the exception.

flutter analyze

Confirmed by firebase.google.com

Did this fix it?

Cause 3 of 3

An emulator or development build cannot be attested

1Check

Real attestation providers only accept genuine devices and store-installed apps. Confirm whether you are running on an emulator.

flutter devices

2Fix

Use the debug provider for development, read the debug secret the app prints in logcat, and register it under App Check, Apps, Manage debug tokens in the Firebase console. Never ship the debug provider or commit the token.

await FirebaseAppCheck.instance.activate(
  androidProvider: AndroidProvider.debug,
);

3Verify

Run the app, find the line starting DebugAppCheckProvider in the logs, and register that token.

adb logcat | grep DebugAppCheckProvider

Confirmed by firebase.google.com

Did this fix it?

How do I stop it coming back?

  • Keep Firebase.initializeApp and FirebaseAppCheck.instance.activate together in main(), in that order.
  • Switch providers by build mode, so release builds never use the debug provider.
  • Turn on enforcement only after the metrics show your real clients send valid tokens.

Sources

How was this page made?

I drafted this page with AI assistance from the official documents listed under Sources. Every cause above names the document that confirms it. I have not reproduced this fix on a machine of my own yet, so read it as documented guidance, not a test report. Found a mistake? Tell me.

Which stack is behind this page?

Projects of mine built on the same technologies:

Related fixes

Mobile apps

Flutter Android: Failed to load FirebaseOptions from resource

Failed to load FirebaseOptions from resource. Check that you have defined values.xml correctly.

On Android, Firebase reads its settings from a values.xml file that the Google services Gradle plugin builds from google-services.json.

4 causes, each with a fix

Mobile apps

Xcode cannot find GoogleService-Info.plist for the Runner target

error: Build input file cannot be found: '/Users/GoogleService-Info.plist' (in target 'Runner' from project 'Runner')

Xcode's project file lists GoogleService-Info.plist as an input, but nothing exists at the path it records.

3 causes, each with a fix

Next step

Want this handled for good?

I look after servers, apps and releases end to end. Tell me what keeps breaking.