gapi client not loading
See original GitHub issueHi,
This package has worked swimmingly for me in the past, but has recently stopped working as it does not load gapi in the window, such that the following:
index.js(31)
window.gapi.load('auth2', () => {
returns this error:
Uncaught TypeError: Cannot read property 'load' of undefined
at HTMLScriptElement.<anonymous> (google-login.js:1)
I’ve also tried using the module in a test boilerplate project and it still has this issue. The script is inserting itself before the first script element in document.scripts
but it’s not loading. Any ideas?
Issue Analytics
- State:
- Created 6 years ago
- Comments:6 (1 by maintainers)
Top Results From Across the Web
gapi.client.load not working - Stack Overflow
After spending hours googling the problem, I found out the problem was because I was running this file on the local machine and...
Read more >unable to load library gapi.load('client:auth2',function) #406
i first loaded the script then tried to init the client but it was failing environment : npm and webpack attached the snapshot...
Read more >gapi.auth.authorize not working? - Google Groups
My problem is that auth.init isn't working. As a result, checkAuth is never getting called. I'm also getting another error that I can't...
Read more >Google Sign-In JavaScript client reference | Authentication
This reference describes the JavaScript client methods and attributes you will use to implement Google Sign-In in your web applications. If you ...
Read more >GAPI — The Google APIs Client Library for Browser JavaScript
One of the easiest ways to use an API is by not having a server at all. ... Loading the gapi client; Initializing...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I was able to circumvent it by including gapi in my html
<script src="https://apis.google.com/js/platform.js?onload=onLoadCallback" async defer></script>
But it seems like you may have some async issue down there with react componentDidMount (where it looks like its breaking) firing before gapi has been loaded.
It was the Disconnect Chrome extension. All good.