firebase / flutterfire

🔥 A collection of Firebase plugins for Flutter apps.
https://firebase.google.com/docs/flutter/setup
BSD 3-Clause "New" or "Revised" License
8.66k stars 3.96k forks source link

🐛 [FIREBASE APP CHECK] App attestation failed. getToken() API. #10980

Open elirehema opened 1 year ago

elirehema commented 1 year ago

Bug report

Describe the bug I have implemented the app check as instructed in then documentation

Steps to reproduce

Steps to reproduce the behavior:

  1. Install the firebase app check
  2. Use the same example provided in the installation documentation
  3. See the following steps by app check and the error message

Expected behavior

Expected to receive integrity token

Sample project

Please link to the public repository URL. https://github.com/elirehema/sampleintegrity


Aditional infos

This is what i get as an error

image

Flutter doctor

Run flutter doctor and paste the output below: image

Click To Expand ``` PASTE OUTPUT INSIDE HERE ```

Flutter dependencies

Run flutter pub deps -- --style=compact and paste the output below:

Click To Expand ``` ![image](https://github.com/firebase/flutterfire/assets/29277048/1fbf9223-89fa-4a7c-87c7-2048468a8f53) ```

darshankawar commented 1 year ago

Thanks for the report. Using the repo provided and integrating it with local firebase project, I was able to replicate the reported behavior.

SadMitsuyaMood commented 1 year ago

Hello, have the same issue. Does anyone have any updates connected with this issue?

charleshoong97 commented 1 year ago

same happen to me using following version in pubspec.yaml

  firebase_core: ^2.9.0
  firebase_analytics: ^10.2.0
  firebase_auth: ^4.4.1
  firebase_messaging: ^14.4.0
  firebase_app_check: ^0.1.2+1
charleshoong97 commented 1 year ago

Hi, is there any update for this issue? I'm still facing it.

mashoodpv commented 1 year ago

waiting to solve the issue...

salim97 commented 1 year ago

any update on this issue ?

russellwheatley commented 8 months ago

Hey @elirehema - if in debug mode, it is likely because the debug token has expired and you need to update. If in release mode, you need to have the app in playstore for play store provider to work along with the requisite app signing SHA key in your Firebase console.

LabN36 commented 8 months ago

It still doesn't work in release mode(provided the sha is added and app is uploaded in play store(internal test))

jingjiewei commented 7 months ago

Facing the same issue, provided the sha is added and app is uploaded in play store(internal test)

sheinix commented 7 months ago

Same issue here, does anyone have a fix for it?

SadMitsuyaMood commented 6 months ago

It still doesn't work in release mode(provided the sha is added and app is uploaded in play store(internal test))

I had the same issue, but while I was reviewing the configuration found that I forgot to add an app release SHA-256 from the google play console -> app signing tab to the app check fingerprints on the FB project. So after it starts working for the versions from the internal test. May be helpful.

CanArslanDev commented 1 month ago

same issue, any solution? i uploaded in play store(internal test), but still i get error 403 or too many attempts error

CanArslanDev commented 1 month ago

In my case this solution worked:

If .getToken() function is working in your app, comment it out. (Only .activate() command should work in your app) After opening your Flutter app, wait 10-20 seconds, the console will show the following text.

Enter this debug secret into the allow list in the Firebase Console for your project: 0c3e59b1-9f49-4bc5-a656-b3c2037cbb07

Add the debug key here to firebase > app check > apps > select app > manage debug tokens.