You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hello 👋, to help manage issues we automatically close stale issues.
This issue has been automatically marked as stale because it has not had activity for quite some time.Has this issue been fixed, or does it still require attention?
This issue will be closed in 15 days if no further activity occurs.
The first has an extra utils() property, and is missing a required automaticDataCollectionEnabled property expected by the auth module.
seems like we need to have the automaticDataCollectionEnabled property on our react-native-specific type, and our react-native-specific FirebaseApp tap should otherwise extend firebase/app-types FirebaseApp definition. We do want to return that as you might need the native utils stuff
But then the auth definition should be able to accept it if it's a sub-type with just something extra? or our auth stuff could accept both types, so that we worked drop-in for people that switched from firebase-js-sdk to react-native-firebase ?
If you change our types to do that (with some quick dummy implementation of automaticDataCollectionEnabled for proof-of-concept) does it work? Seems like it will based on the workaround you're using now
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: