Skip to content

[ firebase_app_check: ^0.3.0+4]: [firebase_app_check/unknown] The operation couldn’t be completed. Too many attempts. Underlying error: The operation couldn’t be completed. The server responded with an error. #17288

@bonisha-mandora

Description

@bonisha-mandora

Is there an existing issue for this?

  • I have searched the existing issues.

Which plugins are affected?

App Check

Which platforms are affected?

iOS

Description

I have integrated Firebase app check with version : firebase_app_check: ^0.3.0+4 , My flutter version is Flutter (Channel stable, 3.29.3, on macOS 15.3.1 24D70 darwin-arm64, locale en-IN). And environment:
sdk: ">=3.5.4 <4.0.0" . I am using xcode 16.2 for mac OS 15.3.1 (24D70). I had create new iOS app on firbase and configure firebase_options.dart and firebase_json.dart with correct bundle id and new GoogleService-Info.plist file replaced ffrom firebase console.

Stilll getting flutter: error [firebase_app_check/unknown] The operation couldn’t be completed. Too many attempts. Underlying error: The operation couldn’t be completed. The server responded with an error: flutter: - URL: https://firebaseappcheck.googleapis.com/v1/projects/torch-social/apps/1:858584873764:ios:e716d88ed9ac919fdbd1b1:exchangeDeviceCheckToken flutter: - HTTP status code: 400 flutter: - Response body: { flutter: "error": { flutter: "code": 400, flutter: "message": "App not registered: 1:858584873764:ios:e716d88ed9ac919fdbd1b1.", flutter: "status": "FAILED_PRECONDITION" flutter: } flutter: } error.
Can you please let us know what is wrong that needs to correct for get Appcheck token without error.

My code :

await Firebase.initializeApp(
options: DefaultFirebaseOptions.currentPlatform,
);

await FirebaseAppCheck.instance.activate(
appleProvider:
kDebugMode ? AppleProvider.debug : AppleProvider.appAttest,
androidProvider:
kDebugMode ? AndroidProvider.debug : AndroidProvider.playIntegrity);

await FirebaseAppCheck.instance.setTokenAutoRefreshEnabled(true);
final result = await FirebaseAppCheck.instance.getToken();

getToken method give 404 error always i have changed my appattest-environment to production also

Reproducing the issue

await Firebase.initializeApp(
options: DefaultFirebaseOptions.currentPlatform,
);

await FirebaseAppCheck.instance.activate(
appleProvider:
kDebugMode ? AppleProvider.debug : AppleProvider.appAttest,
androidProvider:
kDebugMode ? AndroidProvider.debug : AndroidProvider.playIntegrity);

await FirebaseAppCheck.instance.setTokenAutoRefreshEnabled(true);
final result = await FirebaseAppCheck.instance.getToken();

Firebase Core version

3.2.0

Flutter Version

3.29.3

Relevant Log Output

error [firebase_app_check/unknown] The operation couldn’t be completed. Too many attempts. Underlying error: The operation couldn’t be completed. The server responded with an error: flutter: - URL: https://firebaseappcheck.googleapis.com/v1/projects/torch-social/apps/1:858584873764:ios:e716d88ed9ac919fdbd1b1:exchangeDeviceCheckToken flutter: - HTTP status code: 400 flutter: - Response body: { flutter: "error": { flutter: "code": 400, flutter: "message": "App not registered: 1:858584873764:ios:e716d88ed9ac919fdbd1b1.", flutter: "status": "FAILED_PRECONDITION" flutter: } flutter: } error

Flutter dependencies

Expand Flutter dependencies snippet
Replace this line with the contents of your `flutter pub deps -- --style=compact`.

Additional context and comments

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions