Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[redux] Error when Google/Facebook script wasn't loaded #79

Closed
tashburn opened this issue Jan 28, 2017 · 5 comments
Closed

[redux] Error when Google/Facebook script wasn't loaded #79

tashburn opened this issue Jan 28, 2017 · 5 comments
Labels

Comments

@tashburn
Copy link

Thanks for creating this. I just starting playing with it and it looks fantastic.

I downloaded the fullstack branch code, ran yarn, then yarn run dev.

The browser at localhost:3000 throws an exception:

utils.js:215 uncaught at _default 
 at _default 
 at watchSocialLoginGoogle 
 at prepareGoogle 
 TypeError: Cannot read property 'load' of undefined
    at eval (webpack:///./src/store/social/sagas.js?:47:18)
    at loadGoogleAuth2 (webpack:///./src/store/social/sagas.js?:46:12)
    at runCallEffect (webpack:///./~/redux-saga/lib/internal/proc.js?:501:19)
    at runEffect (webpack:///./~/redux-saga/lib/internal/proc.js?:429:399)
    at next (webpack:///./~/redux-saga/lib/internal/proc.js?:310:9)
    at currCb (webpack:///./~/redux-saga/lib/internal/proc.js?:383:7)

I'm on MacOS 10.12.1 and using Chrome Version 55.0.2883.95 (64-bit). # @

@diegohaz
Copy link
Owner

diegohaz commented Jan 28, 2017

Hi, @tashburn. Thanks for the report. I tried to reproduce it (also on MacOS 10.12.1 and Chrome 55), but I couldn't see the error.

It seems to be related to this snippet on src/store/social/sagas.js:

  loadGoogleAuth2: () => new Promise((resolve) => {
    window.gapi.load('auth2', resolve)
  })

Something went wrong while loading google script and window.gapi was not set.

Does this only happen on fullstack? That code also exists on the redux branch.

@diegohaz diegohaz added the bug label Jan 28, 2017
@tashburn
Copy link
Author

Mmm. Sounds likely that it's something peculiar on my side then. Thanks for checking it out.

@diegohaz diegohaz changed the title [v0.6.0-fullstack] Fresh clone throws exception in browser [redux] Fresh clone throws exception in browser Feb 6, 2017
@diegohaz diegohaz changed the title [redux] Fresh clone throws exception in browser [redux] Error when Google/Facebook script wasn't loaded Feb 6, 2017
@diegohaz
Copy link
Owner

diegohaz commented Feb 6, 2017

Added a verification to get rid of this error in 7d3cad0

@diegohaz diegohaz closed this as completed Feb 6, 2017
@diegohaz
Copy link
Owner

Reopening as I'm still seeing an uncaught error.

@diegohaz
Copy link
Owner

Fixed in #98

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants