-
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
[🐛] auth.PhoneAuthProvider.credential is undefined on IOS release build #8444
Comments
having same issue with Google Auth auth.GoogleAuthProvider.credential credential part is undefined this is only happening in production build, i am on latest verion of react native and react native firebase. LOG CAT 04-07 15:23:19.733 24918 24984 I ReactNativeJS: { [Function: f] <--- this is console.log(auth)
04-07 15:23:19.733 24918 24984 I ReactNativeJS: AppleAuthProvider: [Function: t],
04-07 15:23:19.733 24918 24984 I ReactNativeJS: EmailAuthProvider: [Function: t],
04-07 15:23:19.733 24918 24984 I ReactNativeJS: PhoneAuthProvider: [Function: t],
04-07 15:23:19.733 24918 24984 I ReactNativeJS: GoogleAuthProvider: [Function: t],
04-07 15:23:19.733 24918 24984 I ReactNativeJS: GithubAuthProvider: [Function: t],
04-07 15:23:19.733 24918 24984 I ReactNativeJS: TwitterAuthProvider: [Function: t],
04-07 15:23:19.733 24918 24984 I ReactNativeJS: FacebookAuthProvider: [Function: t],
04-07 15:23:19.733 24918 24984 I ReactNativeJS: PhoneMultiFactorGenerator: { [Function: t] FACTOR_ID: 'phone' },
04-07 15:23:19.733 24918 24984 I ReactNativeJS: OAuthProvider: [Function: t],
04-07 15:23:19.733 24918 24984 I ReactNativeJS: OIDCAuthProvider: [Function: t],
04-07 15:23:19.733 24918 24984 I ReactNativeJS: PhoneAuthState:
04-07 15:23:19.733 24918 24984 I ReactNativeJS: { CODE_SENT: 'sent',
04-07 15:23:19.733 24918 24984 I ReactNativeJS: AUTO_VERIFY_TIMEOUT: 'timeout',
04-07 15:23:19.733 24918 24984 I ReactNativeJS: AUTO_VERIFIED: 'verified',
04-07 15:23:19.733 24918 24984 I ReactNativeJS: ERROR: 'error' },
04-07 15:23:19.733 24918 24984 I ReactNativeJS: getMultiFactorResolver: [Function],
04-07 15:23:19.733 24918 24984 I ReactNativeJS: multiFactor: [Function] }
04-07 15:23:19.733 24918 24984 I ReactNativeJS: [Function] <-- this is console.log(auth.GoogleAuthProvider)
04-07 15:23:19.733 24918 24984 I ReactNativeJS: ERROR AT auth.GoogleAuthProvider.credential
04-07 15:23:19.733 24918 24984 I ReactNativeJS: [TypeError: undefined is not a function] |
This issue appears to be similar, can you see if the users solution also works for you? #8315 |
Hi @MichaelVerdon, indeed it's very similar, that's why I've mentioned the issue in the description as well The user ignored the problem by not using the function at all, which is not an option for us. We still need the credential function in our scenario as attached in the javascript section of the issue, |
Very strange - @MichaelVerdon note that I added the ability to do release-mode testing for android and ios recently in our e2e app, so we should be seeing this. It won't be possible to check the GoogleAuthProvider easily as it requires some provisioning the e2e app doesn't have, but the PhoneAuthProvider should be testable (and should already have tests executing!) in the e2e harness. There were a couple other issues only showing up in release mode and I wanted to try to detect debug/release mode skew in CI so this sort of thing wouldn't happen In fact, we do test this: https://github.com/invertase/react-native-firebase/actions/workflows/tests_e2e_ios.yml Why are we not seeing this? 🤔 |
Is it possible that it may have been optimized away somehow by the compiler? I just don't have any other explanation why the function may not be available only on release builds ... |
Issue
Just noticed our phone authentication does not work anymore (only on release builds), it seems very very similar to this issue
#8315
More specifically when calling
auth.PhoneAuthProvider.credential
Project Files
Javascript
Click To Expand
package.json
:firebase.json
for react-native-firebase v6:iOS
Click To Expand
ios/Podfile
:AppDelegate.m
: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:21.13.0
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: