I am gtting and Exception Error in React Native google signin module. here is the compelte code snipt in the error
TypeError: null is not an object (evaluating 'RNGoogleSignin.SIGN_IN_CANCELLED')
export const statusCodes = {
SIGN_IN_CANCELLED: RNGoogleSignin.SIGN_IN_CANCELLED,
IN_PROGRESS: RNGoogleSignin.IN_PROGRESS,
PLAY_SERVICES_NOT_AVAILABLE: RNGoogleSignin.PLAY_SERVICES_NOT_AVAILABLE,
SIGN_IN_REQUIRED: RNGoogleSignin.SIGN_IN_REQUIRED,
};
in node_modules@react-native-google-signin\google-signin\src\GoogleSignin.ts
I am not able to find the solution.
Here is my code snipet
import React, { useState } from "react";
import { View, Text, StyleSheet, StatusBar } from "react-native";
import SplashBG from "../icons/splashbg";
import Logo from "../icons/logo";
import { GoogleSignin } from '@react-native-google-signin/google-signin';
const GetLoginStatus = async () => {
GoogleSignin.configure({ webClientId: '265662725956-ukku7c59o0afjqpig79bdcsrdnai4063.apps.googleusercontent.com' });
await GoogleSignin.hasPlayServices();
const userInfo = await GoogleSignin.signIn();
console.log(userInfo);
}
const Splash = () => {
const userstatus = GetLoginStatus();
return (
<>
<View style={styles.BGContainer}>
<Text>Login Screen</Text>
</View>
</>
);
}
export default Splash;
My React Native Version react-native@0.63.2 @react-native-google-signin/google-signin@7.0.0-alpha.3
I am getting this error in android. I havent checked on iphone but may be the same error is nowing on there too.
Please Help.