I had tried using this react-native-google-signin plugin for an iOS app, but was unable to get it to work. But anyhow, later, when I try creating a brand new app that has nothing to do with SignIn, I keep getting this error! Even though I am not doing anything to do with sign in!
Literally I just do:
react-native init foo
cd foo
react-native run-ios
And boom! That GoogleSignIn error. What is going on and how do I fix it!?
dont forget to quit RN Packager every time you switch projects
Getting the same issue when targeting android and can't figure it out, running in an iOS device works fine.
Have tried reinstalling multiple times but can't get it to work.
Got the same errors... Try to put directly values in GoogleSignin.android.js ... But it doesn't work. If anyone fixed it ? :)
do you have this error when you run the sample app ?
Nop... I'm getting compilation error's due to my actual configuration :/ The sample app is working for you ???
did you update gradle wrapper, gradle build plugin and google service gradle plugin (see android readme for the actual versions you should be using) ?
I'm doing some updates on the Android SDK manager, and yes, I already did the update in gradle wrapper... but still getting the error... I will see if the problem stay after the others update. I'll let you know
Failed at the [email protected] start script node nodes_modules/react-native/local-cli/cli.js start ... I get this on the sample app... And I have updates all the packages :/
I use : react-native-cli : 0.2.0
react-native : 0.30.0
please post a full log of your error
Tell me if you want other informations....
0 info it worked if it ends with ok
1 verbose cli [ 'C:Program Filesnodejsnode.exe',
1 verbose cli 'C:Program Filesnodejsnode_modulesnpmbinnpm-cli.js',
1 verbose cli 'start' ]
2 info using [email protected]
3 info using [email protected]
4 verbose run-script [ 'prestart', 'start', 'poststart' ]
5 info prestart [email protected]
6 info start [email protected]
7 verbose unsafe-perm in lifecycle true
8 info [email protected] Failed to exec start script
9 verbose stack Error: [email protected] start:node node_modules/react-native/local-cli/cli.js start
9 verbose stack Exit status 1
9 verbose stack at EventEmitter.(C:Program Filesnodejsnode_modulesnpmlibutilslifecycle.js:217:16)
9 verbose stack at emitTwo (events.js:87:13)
9 verbose stack at EventEmitter.emit (events.js:172:7)
9 verbose stack at ChildProcess.(C:Program Filesnodejsnode_modulesnpmlibutilsspawn.js:24:14)
9 verbose stack at emitTwo (events.js:87:13)
9 verbose stack at ChildProcess.emit (events.js:172:7)
9 verbose stack at maybeClose (internal/child_process.js:827:16)
9 verbose stack at Process.ChildProcess._handle.onexit (internal/child_process.js:211:5)
10 verbose pkgid [email protected]
11 verbose cwd C:UsersA628971Downloadsreact-native-google-signin-masterexample
12 error Windows_NT 6.1.7601
13 error argv "C:Program Filesnodejsnode.exe" "C:Program Filesnodejsnode_modulesnpmbinnpm-cli.js" "start"
14 error node v4.4.2
15 error npm v2.15.0
16 error code ELIFECYCLE
17 error [email protected] start:node node_modules/react-native/local-cli/cli.js start
17 error Exit status 1
18 error Failed at the [email protected] start script 'node node_modules/react-native/local-cli/cli.js start'.
18 error This is most likely a problem with the GoogleSigninSampleApp package,
18 error not with npm itself.
18 error Tell the author that this fails on your system:
18 error node node_modules/react-native/local-cli/cli.js start
18 error You can get information on how to open an issue for this project with:
18 error npm bugs GoogleSigninSampleApp
18 error Or if that isn't available, you can get their info via:
18 error
18 error npm owner ls GoogleSigninSampleApp
18 error There is likely additional logging output above.
19 verbose exit [ 1, true ]
well did you npm install from the sample directory ??
Yep , npm install works well !
I found running rnpm unlink react-native-google-signin and then, to relink, running rnpm link react-native-google-signin fixed the problem.
+1 still have the problem !!
someone has a solution ?
Yup still have the same issue....
For me the problem was I didn't have the updated android app installed on my device. I was looking at an older android app using the newer code. My advice: uninstall app from device completely, rebuild and re-install.
In react-native 0.37 I moved import co.apptailor.googlesignin.RNGoogleSigninPackage from MainActivity class into MainApplication class and added to its getPackages method new RNGoogleSigninPackage:
protected List<ReactPackage> getPackages() {
return Arrays.<ReactPackage>asList(
new MainReactPackage(),
new RNGoogleSigninPackage()
);
}
This solved the problem for me. (I also ran rnpm link react-native-google-signin as suggested above).
PS. Just noticed that it's in fact part of the Android instructions. Will keep the comment though as it may help others to figure out the problem sooner.
I guess the solution here is to reinstall the library and run react-native link again. Open a new issue if the problem persists.
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'
};
Most helpful comment
Getting the same issue when targeting android and can't figure it out, running in an iOS device works fine.
Have tried reinstalling multiple times but can't get it to work.