signInWithPhoneNumber() is not working in react-na

2020-05-07 19:06发布

hi I am geeting this error in

firebase.auth().signInWithPhoneNumber(phoneNumber)

Error Domain=FIRAuthErrorDomain Code=17057 "User interaction is still ongoing, another view cannot be presented." UserInfo={NSLocalizedDescription=User interaction is still ongoing, another view cannot be presented., FIRAuthErrorUserInfoNameKey=ERROR_WEB_CONTEXT_ALREADY_PRESENTED}

in RNFirebaseAuth.m.

enter image description here

here is error

enter image description here

const confirmResult = await firebase.auth().signInWithPhoneNumber(phoneNumber);
      if (confirmResult) {
        this.setState({
          confirmResult,
          message: 'Code has been sent!',
          step: 2,
        }, this.goToEnterOtpScreen());
      }

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

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



 pod 'Firebase/Core', '~> 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'

1条回答
SAY GOODBYE
2楼-- · 2020-05-07 19:52

It looks like the method where you are calling await is not async

查看更多
登录 后发表回答