epilande/gatsby-theme-firebase

Social logins buttons in demo not working

Quantmatic opened this issue · 6 comments

When I boot up the demo, everything works fine except the SocialLogin buttons. They appear dead, not generating the pop up window after running yarn dev from the demo directory

Any idea why this could be?

git clone https://github.com/epilande/gatsby-theme-firebase.git

cd ..../.../demo

npm install --save gatsby-theme-firebase

yarn && yarn dev

Hey @Quantmatic did you set up the credentials correctly? https://github.com/epilande/gatsby-theme-firebase#usage

Also you'll need to go into firebase console > authentication > sign-in methods and enable the appropriate providers.

image

The issue seems to be with the Link in the social buttons code:

When I click on one, there is an error logged in the console:
https://ibb.co/sKZg42s

When I click through the console error, I get to this line
reactHotLoader.register(prefetchPathname, "prefetchPathname", "/home/alpha/Firebase/gatsby-theme-firebase/demo/.cache/gatsby-browser-entry.js");

the file gatsby-browser-entry.js isn't in the /demo/.cache/ folder, I checked

I've looked around, it seems similar to this error people were having with Gatsby:
gatsbyjs/gatsby#14729

The gatsby-starter-firebase buttons work just fine for me...
https://github.com/muhajirdev/gatsby-starter-firebase

So either something is getting messed up with my install/build flow, or this is just the latest version of gatsby causing it.

gatsby-browser-entry.js is a generated file from Gatsby.

Hmm..I'm not able to reproduce this error. I tried a clean install of gatsby-theme-firebase and everything is working fine.

I noticed in your original comment #107 (comment), after you git clone, you're running npm install --save gatsby-theme-firebase, which is not necessary since it's already in this repo.

Could you try doing a clean install with the following commands:

  1. $ git clone https://github.com/epilande/gatsby-theme-firebase.git
  2. $ cd gatsby-theme-firebase
  3. $ yarn
  4. $ cd demo
  5. $ yarn dev

Just tried it, same thing... What OS are you on?

I'm on Ubuntu 19.04
Gatsby CLI version: 2.8.8
Gatsby version: 2.18.4
Node 10.16.3

I figured it out....

The FIREBASE_AUTH_DOMAIN was malformed, I had it with https:// in front, and it adds it's own https apparently, so there were two httpses in the domain name, that's how it's godda be:

FIREBASE_AUTH_DOMAIN=your-app-name.firebaseapp.com

Sorry for dragging you into this....

Doh! No worries. I'm glad you got it working! 😄

Feel free to reach out if you run into anymore problems