-
Notifications
You must be signed in to change notification settings - Fork 2.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[🐛][Android] Calling firebase.appCheck().activate()
throws an exception
#5981
Comments
Hi there! react-native-firebase/packages/app-check/lib/index.d.ts Lines 138 to 141 in 23fdf61
You may always consult our e2e tests in order to see how we expect usage to go:
Also the documentation shows whether a parameter is required or not and should be examined: https://rnfirebase.io/reference/app-check#activate I'm going to leave this open because we should be more tolerant in what we expect and how we message expectation violations in the API usage but I'll assume you can move forward with this information? |
I'm sorry that I missed it. Calling
Also there are no examples in App check Usage Documentation and also no link to the API reference page like rest of the usage pages. Allow me update the usage page when I get it working on both iOS and android. Thank you! |
Very strange with regard to the usage docs etc, clearly something is not right. Thanks for mentioning that the second supposed-to-be-optional parameter also has problems, I'll clean that as well as I sweep through this. Glad you are unblocked at least, there is one happy path blazed through the module that I'm certain really does work :-), glad you are on it now |
previously, the required string argument was not validated, and the optional boolean argument was not supplied to native, causing an android native crash if not supplied omitting the string now correctly throws an error, and omitting the token refresh boolean will default correctly to app check token refresh as configured in firebase.json, app-wide data collection if app check does not have a config, and the default true if there is no config Fixes #5981 - thanks to @rawatnaresh for catching this!
previously, the required string argument was not validated, and the optional boolean argument was not supplied to native, causing an android native crash if not supplied omitting the string now correctly throws an error, and omitting the token refresh boolean will default correctly to app check token refresh as configured in firebase.json, app-wide data collection if app check does not have a config, and the default true if there is no config Fixes #5981 - thanks to @rawatnaresh for catching this!
previously, the required string argument was not validated, and the optional boolean argument was not supplied to native, causing an android native crash if not supplied omitting the string now correctly throws an error, and omitting the token refresh boolean will default correctly to app check token refresh as configured in firebase.json, app-wide data collection if app check does not have a config, and the default true if there is no config Fixes #5981 - thanks to @rawatnaresh for catching this!
Issue
Calling
firebase.appCheck().activate()
throws an exception : 👇 👇 👇Click To Expand index.js
index.js
:SafetyNet is enabled in firebase
To reproduce this issue 🧑💻
npx react-native init MyApp --template react-native-template-typescript
yarn add @react-native-firebase/app
yarn add @react-native-firebase/app-check
yarn start
yarn android
Project Files
Javascript
Click To Expand
package.json
:firebase.json
for react-native-firebase v6:# N/A
iOS
Click To Expand
ios/Podfile
:# N/A
AppDelegate.m
:// N/A
Android
Click To Expand
Have you converted to AndroidX?
android/gradle.settings
jetifier=true
for Android compatibility?jetifier
for react-native compatibility?android/build.gradle
:android/app/build.gradle
:// N/A
android/settings.gradle
:MainApplication.java
:// N/A
AndroidManifest.xml
:<!-- N/A -->
Environment
Click To Expand
react-native info
output:react-native-firebase
version you're using that has this issue: *14.1.0
Firebase
module(s) you're using that has the issue:@react-native-firebase/app-check
TypeScript
? *Y
&4.4.4
React Native Firebase
andInvertase
on Twitter for updates on the library.The text was updated successfully, but these errors were encountered: