@react-native-google-signin/google-signin/src/GoogleSignin.js threw an exception null is not an object (evaluating 'RNGoogleSignin.SIGN_IN_CANCELLED')

Viewed 1686

I'm implementing GoogleSign using firebase for the firebase project. I installed these three packages:

    "@react-native-firebase/app": "^11.3.0",
    "@react-native-firebase/auth": "^11.3.0",
    "@react-native-google-signin/google-signin": "^6.0.0",

Then in my Login.js file I'm importing them as:

import auth from '@react-native-firebase/auth'
import { GoogleSignin } from '@react-native-google-signin/google-signin';

Then inside function Login(props) { I've

    GoogleSignin.configure({
        webClientId: 'MY_WEB_CLIENT_ID.apps.googleusercontent.com'
    });

But as soon as I run I get this error:

Error: Requiring module "node_modules/@react-native-google-signin/google-signin/src/GoogleSignin.js", which threw an exception: TypeError: null is not an object (evaluating 'RNGoogleSignin.SIGN_IN_CANCELLED')

1 Answers

Please run pod-install and on pod install confirm

Installing FirebaseAuth (8.1.0)
Installing FirebaseInstallations (8.1.0)
Installing FirebaseMessaging (8.1.0)
Installing GTMAppAuth (1.2.2)
Installing GTMSessionFetcher (1.5.0)
Installing GoogleSignIn (5.0.2)
Installing GoogleUtilities 7.4.1
Installing RNFBAuth (12.1.0)
Installing RNFBMessaging (12.1.0)
Installing **RNGoogleSignin** (6.0.0)
Related