Kristjan Retter
Kristjan Retter

Reputation: 431

React Native Firebase phone auth crashes the app on reCaptcha (Android)

I am having trouble with react native firebase phone auth. When I run the function then the app redirects to reCaptcha but then the screen remains black and reCaptcha does not appear. It was working fine at first but when I changed the project director it broke. The weirdest part is that there is no error the app just freezes and/or crashes after being frozen for some time.

I reinstalled node_modules. Also, I generated a new sha1 code and tried running it on another computer to see if sha1 may be the cause. I tried creating a completely new react-native project but still no change.

Packages:

    "@react-native-firebase/app": "^10.0.0", // also tried older
    "@react-native-firebase/auth": "^10.0.0", // also tried older
    "react": "16.13.1",
    "react-native": "0.63.3"

My sign in function:

 const loginWithPhoneNumber = async () => {
    const confirmation = await auth().signInWithPhoneNumber(firebaseTestPhonenumber);
  };

Upvotes: 2

Views: 1609

Answers (1)

TheMechanical
TheMechanical

Reputation: 76

Add this to your app/build.gradle file dependencies:

 implementation 'androidx.browser:browser:1.2.0'

The issue is related to a major update in Firebase. This issue was discussed here

Upvotes: 6

Related Questions