Google-signin: RNGoogleSignin.BUTTON_SIZE_ICON undefined is not an object

Created on 16 Apr 2018  路  8Comments  路  Source: react-native-google-signin/google-signin

i dont know what is wrong but i keep getting error.

Most helpful comment

Hi Guys... I was having the same issue which just got resolved.
all you need to do is in the js files GoogleSignin.ios.js and GoogleSignin.android.js (located in
node_modules/react-native-google-signin/src/) replace the below constants

GoogleSigninButton.Size = {
Icon: RNGoogleSignin.BUTTON_SIZE_ICON,
Standard: RNGoogleSignin.BUTTON_SIZE_STANDARD,
Wide: RNGoogleSignin.BUTTON_SIZE_WIDE
};
GoogleSigninButton.Color = {
Auto: RNGoogleSignin.BUTTON_COLOR_AUTO,
Light: RNGoogleSignin.BUTTON_COLOR_LIGHT,
Dark: RNGoogleSignin.BUTTON_COLOR_DARK
};

with

GoogleSigninButton.Size = {
Icon: '48 x 48',
Standard: '230 x 48',
Wide: '312 x 48'
};

GoogleSigninButton.Color = {
Auto: 'white',
Light: 'blue',
Dark: 'grey'
};

All 8 comments

same here

react-native link should fix your problem

nope, it seems this lib is broken

Hi Guys... I was having the same issue which just got resolved.
all you need to do is in the js files GoogleSignin.ios.js and GoogleSignin.android.js (located in
node_modules/react-native-google-signin/src/) replace the below constants

GoogleSigninButton.Size = {
Icon: RNGoogleSignin.BUTTON_SIZE_ICON,
Standard: RNGoogleSignin.BUTTON_SIZE_STANDARD,
Wide: RNGoogleSignin.BUTTON_SIZE_WIDE
};
GoogleSigninButton.Color = {
Auto: RNGoogleSignin.BUTTON_COLOR_AUTO,
Light: RNGoogleSignin.BUTTON_COLOR_LIGHT,
Dark: RNGoogleSignin.BUTTON_COLOR_DARK
};

with

GoogleSigninButton.Size = {
Icon: '48 x 48',
Standard: '230 x 48',
Wide: '312 x 48'
};

GoogleSigninButton.Color = {
Auto: 'white',
Light: 'blue',
Dark: 'grey'
};

It because you link failed, you SHOULD follow Docs for Android (or for iOS) and rebuild.

Please follow the guide that @havinhthai pointed out or check out our example which is now working.

Hi Everybody I was having the same issue which just got resolved.
My react-native version is 0.50.4
react-natve-google-sign-in version is 0.12.0
I followed this link only automatic linking not mannual
https://github.com/react-native-community/react-native-google-signin/blob/master/ios-guide.md
and one more change in
node_modules/react-native-google-signin/src/
replace the below constants

GoogleSigninButton.Size = {
Icon: RNGoogleSignin.BUTTON_SIZE_ICON,
Standard: RNGoogleSignin.BUTTON_SIZE_STANDARD,
Wide: RNGoogleSignin.BUTTON_SIZE_WIDE
};
GoogleSigninButton.Color = {
Auto: RNGoogleSignin.BUTTON_COLOR_AUTO,
Light: RNGoogleSignin.BUTTON_COLOR_LIGHT,
Dark: RNGoogleSignin.BUTTON_COLOR_DARK
};

with

GoogleSigninButton.Size = {
Icon: '48 x 48',
Standard: '230 x 48',
Wide: '312 x 48'
};

GoogleSigninButton.Color = {
Auto: 'white',
Light: 'blue',
Dark: 'grey'
};

You just need to upgrade to next version. I solved my issue by following steps below.

  1. uninstall version installed npm uninstall react-native-google-signin
  2. npm install [email protected] --save
  3. react-native link [email protected]
Was this page helpful?
0 / 5 - 0 ratings