React-native-firebase: signInWithPhoneNumber getting error

Created on 12 Sep 2019  路  7Comments  路  Source: invertase/react-native-firebase

Hello everyone, I'm trying to impelment Phone Number Auth verification on mobile app.
What I would like to achieve?

Illegal callback invocation from native module. This callback type only permits a single invocation from native code.

` makeFireBaseCall = async (sendPhoneNumber) => {

try {
  firebase
    .auth()
    .signInWithPhoneNumber(sendPhoneNumber)
    .then((confirmResult) => {

      this.setState({
        confirmResult,
        message: 'Code has been sent!',
        step: 2,
      });
      this.goToOtpScreen();

    })
    .catch((error) => {
      this.setState({
        message: `Sign In With Phone Number Error: ${error.message}`,
      });
      Toast.show(error.message, Toast.SHORT);
    });

} catch (error) {
  Toast.show(error.message, Toast.SHORT);
}

}
`

"react-native-firebase": "^5.5.4",

` # Required by RNFirebase
pod 'Firebase/Core', '~> 6.3.0'

# [OPTIONAL PODS] - comment out pods for firebase products you won't be using.
# pod 'Firebase/AdMob', '~> 6.3.0'
pod 'Firebase/Auth', '~> 6.3.0'
pod 'Firebase/Database', '~> 6.3.0'
pod 'Firebase/Functions', '~> 6.3.0'
pod 'Firebase/DynamicLinks', '~> 6.3.0'
pod 'Firebase/Firestore', '~> 6.3.0'
pod 'Firebase/Messaging', '~> 6.3.0'
pod 'Firebase/RemoteConfig', '~> 6.3.0'
pod 'Firebase/Storage', '~> 6.3.0'
pod 'Firebase/Performance', '~> 6.3.0'
pod 'Fabric', '~> 1.10.2'
pod 'Crashlytics', '~> 3.13.2'`

Simulator Screen Shot - iPhone Xs - 2019-09-05 at 12 59 25

Stale

Most helpful comment

This occurs while trying to open the CAPTCHA screen on WebView. Worked a few times for me, but now getting the error everytime.

All 7 comments

How did you put your sendPhoneNumber?

+91 mob number (country code mob number ) @HubertRyanOfficial

This occurs while trying to open the CAPTCHA screen on WebView. Worked a few times for me, but now getting the error everytime.

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 the community's attention?

This issue will be closed in 15 days if no further activity occurs.
Thank you for your contributions.

I'm facing the same issue. For me, the issue is on iOS simulator when I try to live reload the modified code and then try to login. But if I kill the app and try again then it works fine always. Not sure how to resolve this issue. Also, I'm not able to reproduce this on an actual device.

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 the community's attention?

This issue will be closed in 15 days if no further activity occurs.
Thank you for your contributions.

Closing this issue after a prolonged period of inactivity. If this is still present in the latest release, please feel free to create a new issue with up-to-date information.

Was this page helpful?
0 / 5 - 0 ratings