Hi,
I implemented your component in one of my websites and noticed that some users cannot login successfully. Finally I was able to debug the issue on my coworkers's computer (he uses Safari 11.0.3, but it also happened earlier in version 10, and I myself, using 11.0.2, cannot reproduce this issue, so I don't think the browser is the issue).
So what happens is: he clicks the Google Login Button, a popup is shown listing his Google accounts, he clicks an account, and then nothing happens.
While diving into the code a bit, it turns out that the auth2.signin Promise inside the signIn method is not resolved.
auth2.signIn(options).then(res => this._handleSigninSuccess(res), err => onFailure(err))
I searched a bit for related issues and found a few (e.g. https://github.com/google/google-api-javascript-client/issues/277 and https://github.com/google/google-api-javascript-client/issues/232) also , but was not able to solve the issue myself with the suggested solutions (e.g. https://github.com/google/google-api-javascript-client/issues/232#issuecomment-278348739). But it definitely seems to be an issue with Google's auth2 library?
Has anyone experienced this issue? Any pointers how to proceed? Thanks in advance!
I think I'm getting the same error, though, it appears immediately after clicking on button
google-login.js:1 Uncaught TypeError: Cannot read property 'signIn' of null
Though it never worked for me. I've just installed it and added this
import { GoogleLogin } from 'react-google-login';
<GoogleLogin
clientId={process.env.GOOGLE_KEY}
onSuccess={onLogin}
onFailure={onReject}
/>
Hmm, I actually don't get _any_ error!
Did you make sure your browser is not blocking any third-party cookies (due to some browser extension) etc.? Can you reproduce the issue in a private session?
@tirli I'm having your exact problem. It happens intermittently.

I do not think the button should be enabled until google auth2 has initialized.
https://github.com/anthonyjgrove/react-google-login/blob/master/src/GoogleLogin.js#L42 should be moved to before or after https://github.com/anthonyjgrove/react-google-login/blob/master/src/GoogleLogin.js#L47
@phamcharles This issue is observed when I build through maven. But when I run it locally it is fine. Did you find out a solution for this?
Most helpful comment
I think I'm getting the same error, though, it appears immediately after clicking on button
google-login.js:1 Uncaught TypeError: Cannot read property 'signIn' of nullThough it never worked for me. I've just installed it and added this