-
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
🔥 [v6] Casting error from JS to native when calling auth().verifyPhoneNumber(phoneNumber) #2639
Comments
I can confirm this bug on v6, It's working on v5. |
Anyone care to PR the change and/or share a patch-package patch file for others? |
It happens on iOS as well. Got this error
PhoneAuthListener.js
|
Thanks for the extra information @r0b0t3d |
I need a quick fix for that so I patched it locally by converting
|
Hey 👋 this issue should now be fixed in v6.0.1, thanks. release notes |
@yogeshkotadiya have pushed up a change above to fix that, will be there in the next release this week. |
@Salakar Thanks for the quick patch but now This is the error I'm getting, [TypeError: undefined is not an object (evaluating 'this._promise.then.bind')] Currently, the only way to access I want to use async/await. try {
const { code } = await auth().verifyPhoneNumber(phoneNumber)
} catch (error){
console.log(error) // [TypeError: undefined is not an object (evaluating 'this._promise.then.bind')]
} react-native-firebase/packages/auth/lib/PhoneAuthListener.js Lines 213 to 227 in c518bb6
|
Hi everyone, |
Fix is now live in v6.0.4. Thanks |
…irebaseError` import (fixes invertase#2639 & fixes invertase#2693)
…2639#issuecomment-539915313)
Issue
When calling
auth().verifyPhoneNumber(phoneNumber)
I get the following error:java.lang.Double cannot be cast to java.lang.String
I traced the error back and I think it's in this line PhoneAuthListener.js#L53 where the
this._phoneAuthRequestId
is passed as number but the method in java ReactNativeFirebaseAuthModule.java#L980 is expecting it as stringCurrently I patched the code locally by converting the
this._phoneAuthRequestId
to string before passing it to the native java methodProject Files
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:6.0.0
Firebase
module(s) you're using that has the issue:Auth
TypeScript
?Y
Think
react-native-firebase
is great? Please consider supporting all of the project maintainers and contributors by donating via our Open Collective where all contributors can submit expenses. [Learn More]React Native Firebase
andInvertase
on Twitter for updates on the library.The text was updated successfully, but these errors were encountered: