Topic-icon Login to Facebook works only in site debug mode

Active Subscriptions:

None
12 years 3 months ago #41947 by bungee
Hi,

I got two problems with the latest version (6.0.2). This is the first time I'm using this plugin so I might be doing something wrong.

Sometimes login to Facebook works fine. It takes a while though (up to 30 seconds). I couldn't figure out why. I have found some pointers in this forum but none of them worked for me.
Sometimes the dialog just pops out and immediately closes. However, when I put the site to debug mode, everything works fine. It is still slow but it works everytime.

The AutoTune feature claims everything is correct.

Any thoughts?

Thanks
The topic has been locked.
Support Specialist
12 years 3 months ago #41950 by alzander
Autotune should be reporting an error, like below, for your site:

Test: Facebook Javascript library inclusion
Warn: Another Facebook extension is installed, including the Facebook Javascript library, and may conflict.


You have a separate extension including the Facebook Javascript library for the Facebook Like Box in the top right of your sidebar. You'll want to remove that module and replace it with an instance of our SCSocialWidget module using the Facebook -> Likebox widget. That should have the same features and clear up your conflict.

I hope that helps, but if not, let us know.

Thanks,
Alex
The topic has been locked.
Active Subscriptions:

None
12 years 3 months ago #41960 by bungee
Hi Alex,

thanks for your help.

The following piece of code
// First, hide the SCLogin modal if it's there
jfbcJQuery('#login-modal').modal('hide');

in jfbconnect.js was throwing an exception complaining there was no 'modal' method.

Re-enabling 'Load jQuery/Bootstrap' option in JFBConnect configuration fixed the problem. I thought those libraries should have been included already.

I have removed conflicting modules, but I still got one module that I need and that one also implements some kind of the Facebook login for content sharing purposes. I guess I will have to bother these other guys to make this work :)

Thanks for the support,
Alan
The topic has been locked.
Support Specialist
12 years 3 months ago #41970 by alzander
Alan,
Glad to hear you're making some progress. Many sites have jQuery installed, but not all have Bootstrap. In either case, there can be many conflicts between extensions and different versions of jQuery. If you have both properly installed and running on all pages, you don't need our setting to include them enabled. Our version of jQuery and Bootstrap is very specific to JFBConnect and meant to not cause conflicts with other extensions and should 'just work'. It does mean an extra script has to be loaded on the page, but we've done our best to minimize it's size.

If you need any help with the other extension, just let us know what it is, what it does, and any conflicts/issues you may have while using it. We'll gladly help how we can.

Thanks,
Alex
The topic has been locked.
Active Subscriptions:

None
12 years 3 months ago #42002 by bungee
Alex,

once again thanks for your quick response and help.

I'm still having a problem with one of the modules. Apart from that one everything works superb. When this module is displayed as a main content, the login progress bar just opens and returns to the same page in a few seconds, without user being logged in to FB. As far as I can tell this module is not using its own jQuery/bootstrap support, but is using built in version from Joomla.
For obvious reasons I won't mention this component's name, but I would appreciate if you could take a quick look at the following page where this problem occurs.

Page link

Thanks,
Alan
The topic has been locked.
Support Specialist
12 years 3 months ago #42011 by alzander
We don't mind if you mention other extension names in our forums. It will help others more quickly find your post if they are having similar conflicts.

As to the issue, on the page you linked, there are 2 extra loads of the Facebook Javascript library on the page. That's in addition to the load of the library inclusion that JFBConnect makes. Those 2 extra loads are most definitely causing a conflict as they are re-initialzing the Facebook library in a 'simple' mode, which isn't meant for authentication.

You'll need to either a) disable the re-inclusion of the Facebook library (some extensions have an option to not re-load it) or b) disable the social buttons in that extension and replace them with JFBConnect's.

I hope that helps, but should you need more assistance, just let us know.

Thanks,
Alex
The topic has been locked.
Active Subscriptions:

None
12 years 2 months ago #42033 by bungee
Ok for mentioning the other component names :) I just wasn't sure the other guys would be happy too to be mentioned :)

I did as you suggested and now everything works as expected.

One final question though, regarding speed. It still takes a while to log in. What duration would be regarded as "expected" to log in. Sometime it takes up to 30 seconds. I noticed in this forum that this could be some kind of cache/discovery issue from the Facebook side. Any thoughts oh that?

Thanks,
Alan
The topic has been locked.
Support Specialist
12 years 2 months ago #42042 by alzander
30-seconds is definitely longer than I'd expect.

There's a few things to try to tinker with to determine what could be the problem:
1) Disable any Social Profile plugins you have enabled. Those plugins import user data, convert avatars and do other things during the login process. Each one can slow things down. If it's still really slow with those disabled, it's a good indication of a server/lookup/connection issue. If it's fast, it could be a server issue or a integration issue with the other extension
2) Try using the Twitter, LinkedIn or Google authentication to see if that's slow as well. That will narrow down if it's FB specific.

Let us know if either of those help narrow down the possible cause. Either way, we'll gladly help investigate however we can.

Thanks,
Alex
The topic has been locked.
Active Subscriptions:

None
12 years 2 months ago #42057 by bungee
Both of the two social profile logins were disabled:
Social Profiles - Joomla
Social Profiles - Custom DB

Login to Google is even slower (up to 3 or 4 minutes).

The following request stays in pending state for that period of time:

Auth request

Once it is completed, I am logged in to Google.

Redirect URI in the Google application is set as follows:

Redirect URI

As far as I can see there are no obvious connectivity/lookup issues with the server. The server is running other applications/sites just fine.

Thanks,
Alan
The topic has been locked.
Support Specialist
12 years 2 months ago #42062 by alzander
Alan,
I'm not sure what other application/sites your referring too, but if they aren't making outgoing connections and doing similar behavior to JFBConnect, it may not be a similar situation.

When connecting to Google+, JFBConnect needs to connect to the following URLs:
https://www.googleapis.com
https://plus.google.com
https://accounts.google.com
The best thing to test is to check the responses to the following commands for each of those URLs from the command line on your server:
nslookup www.googleapis.com
ping www.googleapis.com
Try for each domain. Feel free to post the results, but they generally should be:
* nslookup - a very quick response returning an IP Address that should be used to connect
* ping - a repeated sequence of how long it takes to make a request. Generally, each response should be under 50ms and there should be 0% packet loss

It definitely sounds like a server connectivity issue since there's *nothing* in JFBConnect that should possibly take that long to process. The only thing that could be causing that is waiting for a response from Google.

You may need to get your hosting company to help with the tests above, or ask if they need to whitelist outgoing connections to specific domains (which is sometimes required). Hopefully, that will help narrow things down though.

Please let me know what you find,
Alex
The topic has been locked.