Closed chenop closed 1 year ago
"@react-native-firebase/analytics": "14.12.0",
"@react-native-firebase/app": "14.12.0",
"@react-native-firebase/app-check": "14.12.0",
"@react-native-firebase/crashlytics": "14.12.0",
"@react-native-firebase/dynamic-links": "14.12.0",
"@react-native-firebase/perf": "14.12.0",
Please only log issues against current stable versions. Update to current stable then report if you still reproduce
[appCheck/token-error] com.google.firebase.FirebaseException: Too many attempts
How many attempts were there :thinking: ? We test it in our CI all the time and it definitely works - I suspect something about your project config and/or timing of requests etc. You should watch adb logcat
while testing.
Thank you @mikehardy for the quick response - will try to upgrade those packages
Hi @mikehardy - Updated to latest version:
"@react-native-firebase/analytics": "16.4.6",
"@react-native-firebase/app": "^16.4.6",
"@react-native-firebase/app-check": "^16.4.6",
"@react-native-firebase/crashlytics": "^16.4.6",
"@react-native-firebase/dynamic-links": "^16.4.6",
"@react-native-firebase/perf": "^16.4.6",
"react-native": "0.66.4",
Still got "too many attempts"
adb logcat:
2022-12-04 16:41:34.186 7174-7358/? E/AppCheck: RNFB: Unknown error while fetching AppCheck token com.google.firebase.FirebaseException: No AppCheckProvider installed.
2022-12-04 16:41:34.187 7174-7280/? E/ReactNativeJS: [Error: [appCheck/token-error] com.google.firebase.FirebaseException: No AppCheckProvider installed.]
2022-12-04 16:41:34.233 7174-7281/? E/unknown:ReactNative: Error: [appCheck/token-error] com.google.firebase.FirebaseException: No AppCheckProvider installed., js engine: hermes, stack:
getToken@1:1846223
_callee$@1:1844795
tryCatch@1:203176
invoke@1:204180
anonymous@1:203324
tryCatch@1:203176
invoke@1:203409
anonymous@1:203848
tryCallTwo@61:8
2022-12-04 16:41:37.488 7174-7358/? E/AppCheck: RNFB: Unknown error while fetching AppCheck token com.google.firebase.FirebaseException: Error returned from API. code: 403 body: App attestation failed.
2022-12-04 16:41:37.489 7174-7358/? E/AppCheck: RNFB: Unknown error while fetching AppCheck token com.google.firebase.FirebaseException: Too many attempts.
2022-12-04 16:41:37.490 7174-7280/? I/ReactNativeJS: { token: 'Error: [appCheck/token-error] com.google.firebase.FirebaseException: Error returned from API. code: 403 body: App attestation failed.' }
2022-12-04 16:41:37.519 7174-7280/? E/ReactNativeJS: [Error: [appCheck/token-error] com.google.firebase.FirebaseException: Error returned from API. code: 403 body: App attestation failed.]
2022-12-04 16:41:37.520 7174-7280/? E/ReactNativeJS: [Error: [appCheck/token-error] com.google.firebase.FirebaseException: Too many attempts.]
2022-12-04 16:41:37.526 7174-7281/? E/unknown:ReactNative: Error: [appCheck/token-error] com.google.firebase.FirebaseException: Error returned from API. code: 403 body: App attestation failed., js engine: hermes, stack:
getToken@1:1846223
_callee$@1:1844795
tryCatch@1:203176
invoke@1:204180
anonymous@1:203324
tryCatch@1:203176
invoke@1:203409
anonymous@1:203848
tryCallTwo@61:8
2022-12-04 16:41:37.529 7174-7281/? E/unknown:ReactNative: Error: [appCheck/token-error] com.google.firebase.FirebaseException: Too many attempts., js engine: hermes, stack:
getToken@1:1846223
_callee$@1:1844795
tryCatch@1:203176
invoke@1:204180
anonymous@1:203324
tryCatch@1:203176
invoke@1:203409
anonymous@1:203848
tryCallTwo@61:8
App Check on Android looks ok
Took the SAH-256 from here:
@mikehardy Is that ok?
Trying to use AppCheck with "Play Integrity" android
We don't support Play Integrity yet.
So I think this is essentially duplicate #6434
Hey, I'm having exactly the same issues with latest react-native-firebase.
I also have similar issue: I have followed all steps, put the debug tokens where necessary. I want to use firebase emulator with real device. This works perfect with web but with mobile app on real device hitting the firebase emulator, has error: D/com.google.firebase.appcheck.debug.internal.DebugAppCheckProvider(25557): Enter this debug secret into the allow list in the Firebase Console for your project: 36c2eb3f-ed60-4d36-b2a8-137d45** W/LocalRequestInterceptor(25557): Error getting App Check token; using placeholder token instead. Error: com.google.firebase.FirebaseException: Too many attempts.
Note that the debug secret is already in the firebase as required.
Is there a clear step by step procedure for setting up firebase emulator with App check, I have failed to get this straight...
And with the live (non emulator, after configuring App check, App intergrity, My app stopped getting downloads. I have set the configuration to :
MEETS_BASIC_INTEGRITY (this is deselected) The app is running on a device that passes basic system integrity checks. Learn more
MEETS_STRONG_INTEGRITY (this is deselected) The app is running on an Android device powered by Google Play services. It has a strong guarantee of system integrity. Learn more
all the necessary configuration on the code side have been done, but Google play keeps showing the Safetynet warning, and still since this configuration, seems my app is no longer visible to users thus no more downloads.... on the Google Cloud part, I disabled or do not have any key restriction for firebase: Android key (auto created by Firebase) because such restrictions were affecting my app (but still, this app check integrity issues persists.... there is clearly a confusion on App check, App integrity, firebase emulator vs Firebase, web vs mobile use for firebase emulator/firebase live....
I wish someone will do a comprehensive guide on these set ups.
I am developing a flutter application and facing the exact same issue Error getting App Check token; using placeholder token instead. Error: com.google.firebase.FirebaseException: Error returned from API. code: 403 body: App attestation failed. I wish someone to help me resolve this error
I am developping Android application and having same issues. Could someone give his experience, how to resolve these issues?
Error getting App Check token; using placeholder token instead. Error: com.google.firebase.FirebaseException: Error returned from API. code: 403 body: App attestation failed.
Error getting App Check token; using placeholder token instead. Error: com.google.firebase.FirebaseException: Too many attempts.
Hey VidojeMuric, I haven't resolved this issue but, i de enforced in the Firebase app check.I dont think there is a exact solution for this, I have tried every way possible to completely resolve this issue. So ignoring this issue would be the best solution.
Issue
Trying to use AppCheck with "Play Integrity" android Did the following:
Actual: [appCheck/token-error] com.google.firebase.FirebaseException: Too many attempts
Expected: Real token
Project Files
Javascript
Click To Expand
#### `package.json`: ```json "@react-native-firebase/analytics": "14.12.0", "@react-native-firebase/app": "14.12.0", "@react-native-firebase/app-check": "14.12.0", "@react-native-firebase/crashlytics": "14.12.0", "@react-native-firebase/dynamic-links": "14.12.0", "@react-native-firebase/perf": "14.12.0", ``` #### `firebase.json` for react-native-firebase v6: ```json # N/A ```
iOS
Click To Expand
#### `ios/Podfile`: - [ ] I'm not using Pods - [x] I'm using Pods and my Podfile looks like: ```ruby # N/A ``` #### `AppDelegate.m`: ```objc // N/A ```
Android
Click To Expand
#### Have you converted to AndroidX? - [ ] my application is an AndroidX application? - [ ] I am using `android/gradle.settings` `jetifier=true` for Android compatibility? - [ ] I am using the NPM package `jetifier` for react-native compatibility? #### `android/build.gradle`: ```groovy // N/A ``` #### `android/app/build.gradle`: ```groovy // N/A ``` #### `android/settings.gradle`: ```groovy // N/A ``` #### `MainApplication.java`: ```java // N/A ``` #### `AndroidManifest.xml`: ```xml ```
Environment
Click To Expand
**`react-native info` output:** ``` OUTPUT GOES HERE ``` - **Platform that you're experiencing the issue on**: - [ ] iOS - [x] Android - [ ] **iOS** but have not tested behavior on Android - [x] **Android** but have not tested behavior on iOS - [ ] Both - **`react-native-firebase` version you're using that has this issue:** - `e.g. 5.4.3` - **`Firebase` module(s) you're using that has the issue:** - `e.g. Instance ID` - **Are you using `TypeScript`?** - `Y/N` & `VERSION`
React Native Firebase
andInvertase
on Twitter for updates on the library.