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

isSdkLoaded always false when deployed to production #348

Open
MarkLyck opened this issue Jul 6, 2022 · 0 comments
Open

isSdkLoaded always false when deployed to production #348

MarkLyck opened this issue Jul 6, 2022 · 0 comments

Comments

@MarkLyck
Copy link

MarkLyck commented Jul 6, 2022

When deployed to my production environment the isSdkLoaded stays false forever despite react-facebook-login making a successful call to the sdk, and window.FB being set correctly.

This only seems to happen when deployed to https. It works fine in localhost.

When deployed, I'm getting the following renderProps:

{
    "isDisabled": false,
    "isProcessing": false,
    "isSdkLoaded": false
}

and nothing happens when I run the renderProps.onClick function.

The module is loaded and it succesfully makes 1 request to the facebook sdk endpoint.
Screen Shot 2022-07-06 at 17 35 43

I also see it created this div in my HTML:

<div id="fb-root"></div>

and if I console.log window.FB it logs it fine as a function:

ƒ FB(e,t){var n;return!kB(t)&&typeof t!="string"&&t!==void 0&&!e.objectMode&&(n=new TB("chunk",["string","Buffer","Uint8Array"],t)),n}

But no matter what this library will not go past the isSdkLoaded when deployed to a production environment?

I have tried both with and without a valid SSL certificate, and it is on HTTPS so it should not be a security issue.

No errors are being logged, and the onFailure callback is never called :(

neither is the normal callback function.

VERSION: "react-facebook-login": "4.1.1",

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

No branches or pull requests

1 participant