Is there an existing issue for this?
Which plugins are affected?
App Check
Which platforms are affected?
Android
Description
Expected Behavior:
The FirebaseAppCheck.instance.activate() method should successfully activate App Check, and getToken() should return a valid token.
Actual Behavior:
The code fails to activate App Check or retrieve a valid token on Xiaomi devices, resulting in an error.
Error Details:
[firebase_app_check/unknown] ha.k: Error returned from API. code: 403 body: App attestation failed.
Additional Details:
Android and iOS works only xiaomi devices not working
Device:
Device: Xiaomi (Redmi Note 12S)
Android version: Android 13
Reproducing the issue
void main() async {
WidgetsFlutterBinding.ensureInitialized();
await Firebase.initializeApp();
try {
await FirebaseAppCheck.instance.activate(
androidProvider: kDebugMode
? AndroidProvider.debug
: AndroidProvider.playIntegrity,
appleProvider: kDebugMode
? AppleProvider.debug
: AppleProvider.appAttestWithDeviceCheckFallback,
);
final token = await FirebaseAppCheck.instance.getToken(true);
print('App Check Token: $token');
} catch (e) {
print('Error: $e');
}
runApp(MyApp());
}
Firebase Core version
3.9.0
Flutter Version
3.24.0
Relevant Log Output
Flutter dependencies
Expand Flutter dependencies snippet
Replace this line with the contents of your `flutter pub deps -- --style=compact`.
Additional context and comments
The error seen in production environment
Is there an existing issue for this?
Which plugins are affected?
App Check
Which platforms are affected?
Android
Description
Expected Behavior:
The FirebaseAppCheck.instance.activate() method should successfully activate App Check, and getToken() should return a valid token.
Actual Behavior:
The code fails to activate App Check or retrieve a valid token on Xiaomi devices, resulting in an error.
Error Details:
[firebase_app_check/unknown] ha.k: Error returned from API. code: 403 body: App attestation failed.
Additional Details:
Android and iOS works only xiaomi devices not working
Device:
Device: Xiaomi (Redmi Note 12S)
Android version: Android 13
Reproducing the issue
Firebase Core version
3.9.0
Flutter Version
3.24.0
Relevant Log Output
Flutter dependencies
Expand
Flutter dependenciessnippetReplace this line with the contents of your `flutter pub deps -- --style=compact`.Additional context and comments
The error seen in production environment