TypeError: Cannot read property 'access_token' of null
See original GitHub issueHi !
First of all, thanks for your great library!
Unfortunatly, when using this.$gapi.login()
i receive the following error :
cb=gapi.loaded_0:181 Uncaught TypeError: Cannot read property 'access_token' of null
at GoogleAuthService._setStorage (vue-gapi.common.js?15fd:83)
at GoogleAuthService._setSession (vue-gapi.common.js?15fd:134)
at eval (vue-gapi.common.js?15fd:155)
at e.Sr (cb=gapi.loaded_0:192)
at Lk (cb=gapi.loaded_0:195)
at Gk (cb=gapi.loaded_0:195)
at _.rk.xU (cb=gapi.loaded_0:195)
at ok (cb=gapi.loaded_0:186)
Looking at the parent method, the response
is almost empty.
The profile info is there :
If i call $gapi.login()
a second time, everything works fine.
Also, if i refresh the page, i am logged in correctly
Thanks for your help, Samuel
Issue Analytics
- State:
- Created 3 years ago
- Comments:21 (8 by maintainers)
Top Results From Across the Web
Cannot read properties of null (reading 'accessToken') - Stack ...
I tried to implement the logout feature on the admin page which wasn't done in the tutorial. I grabbed the currentUser in the...
Read more >Cannot read property 'accessToken' of undefined" for any DB ...
Whenever I try to connect, I get the error "TypeError: Cannot read property 'accessToken' of undefined". However, I can connect to the s......
Read more >TypeError: Cannot read property 'accessToken' of null
My React app is returning : TypeError: Cannot read property 'accessToken' of null when tring to open the app without accessToken in the...
Read more >Cannot read property 'accessToken' of null when accessing ...
I'm getting an error "Uncaught TypeError: Cannot read property 'accessToken' of null" when I try to search in suggest control in web entry....
Read more >Cannot read property 'name' of undefined" laravel passport
Please I need a help . when i want to generate the access Token .i had this error [Vue warn]: Error in render:...
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 Free
Top 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
@everttrollip @sadortun @namoscato @vinicius1209 I have just published the fix: 0.3.1
Kindly check and let me know ✌
@cedpoilly, this was introduced with the change from
GoogleAuth.signIn()
toGoogleAuth.grantOfflineAccess()
in https://github.com/cedpoilly/vue-gapi/compare/v0.1.2...v0.2.2:https://github.com/cedpoilly/vue-gapi/blob/8f1c403bce4bb5955a085257bb89a4d63b1b2803/src/VueGAPI/GoogleAuthService.js#L120-L126
In the current state, the subsequent
_setSession
call toGoogleUser.getAuthResponse()
is returningnull
.I’m not sure why that is happening off the top of my head, but why was the change made from
signIn
tograntOfflineAccess
? This seems like a less than ideal default.