We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
The following code snippet triggers Typescript errors:
import { initializeApp } from "@react-native-firebase/app"; import { getAuth } from "@react-native-firebase/auth"; const firebaseConfig = { ... }; const app = initializeApp(firebaseConfig); const auth = getAuth(app);
The issue is that initializeApp returns a ReactNativeFirebase.FirebaseApp while getAuth wants a FirebaseApp as defined in fiirebase/app-types.
initializeApp
ReactNativeFirebase.FirebaseApp
getAuth
fiirebase/app-types
The first has an extra utils() property, and is missing a required automaticDataCollectionEnabled property expected by the auth module.
utils()
automaticDataCollectionEnabled
This is in a ReactNative (expo) project, where I am building for both native and web.
package.json
"@react-native-firebase/app": "^21.2.0", "@react-native-firebase/auth": "^21.2.0", "firebase": "^11.0.1",
firebase.json
# N/A
ios/Podfile
AppDelegate.m
// N/A
android/gradle.settings
jetifier=true
jetifier
android/build.gradle
android/app/build.gradle
android/settings.gradle
MainApplication.java
AndroidManifest.xml
<!-- N/A -->
react-native info output:
react-native info
OUTPUT GOES HERE
react-native-firebase
e.g. 5.4.3
Firebase
e.g. Instance ID
TypeScript
Y/N
VERSION
React Native Firebase
Invertase
The text was updated successfully, but these errors were encountered:
I discovered that the following seems to solve the issue for now:
getAuth({ ...app, automaticDataCollectionEnabled: false });
Sorry, something went wrong.
No branches or pull requests
Issue
The following code snippet triggers Typescript errors:
The issue is that
initializeApp
returns aReactNativeFirebase.FirebaseApp
whilegetAuth
wants a FirebaseApp as defined infiirebase/app-types
.The first has an extra
utils()
property, and is missing a requiredautomaticDataCollectionEnabled
property expected by the auth module.This is in a ReactNative (expo) project, where I am building for both native and web.
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
:// N/A
android/app/build.gradle
:// N/A
android/settings.gradle
:// N/A
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:e.g. 5.4.3
Firebase
module(s) you're using that has the issue:e.g. Instance ID
TypeScript
?Y/N
&VERSION
React Native Firebase
andInvertase
on Twitter for updates on the library.The text was updated successfully, but these errors were encountered: