Topic-icon Facebook login fails after upgrade to 6.2.4 -

Active Subscriptions:

None
9 years 2 months ago #50759 by davlar
Hi - i just resubscribed for the purposes up updating to 6.2.4, however since doing so Facebook connect is failing on this platform tinyurl.com/p4tchp6

Uncaught TypeError: Cannot read property 'comment' of undefined
connect.facebook.net/en_GB/sdk.js:93
The topic has been locked.
Support Specialist
9 years 2 months ago #50764 by alzander
I'm seeing the following Javascript errors:

Uncaught TypeError: Cannot read property 'value' of null VM34141:18
Uncaught TypeError: undefined is not a function sdk.js
Error: [olark] emailAddress string expected application2.js?v=1421866280003:7

The 2nd line is from the Facebook Javascript library. The first is from AdRoll and I'm not sure what the 3rd is from.

I'm not sure what's causing the 1st and 3rd, but any Javascript errors can cause errors in other features. Can you try to fix the 1st and 3rd errors (or disable whatever code is inserting them) to see if that fixes the problem with Facebook?

Beyond that, do you know what version of JFBConnect you are upgrading from? That may provide some insight, but probably not. The only thing I can think of from here is narrowing down all the Javascript errors in general.

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

None
9 years 2 months ago #50775 by davlar
Thanks Alex, but those aren't the issue. The first is a google places autocomplete issue which does not affect this. The second is merely olark expecting a user email. it goes away when the user logs in. both errors were in console before the upgrade to v 6.2.4 and facebook connect was working fine. Can you suggest what else it might be?
The topic has been locked.
Support Specialist
9 years 2 months ago #50778 by mel
With a little tinkering, I was able to login via Facebook on your site. Here are the steps that I followed:

1. Open entrusters.com/index.php?lang=en&template=beez3 Note that I forced the template to something else
2. The error console shows that there were 0 javascript errors on the page.
3. On the Developer Tools console in Chrome, executed the following statement since the login module wasn't present in the beez3 template
jfbc.login.provider('facebook');
4. When the code executed, loaded your page entrusters.com/index.php?lang=en and it indicated that I was logged in.
5. I was able to log out properly.
6. I attempted to log in via the entrusters.com/index.php?lang=en page and it failed as expected (and the javascript errors that Alex pointed were present again).

This suggests to me that the problem could lie within your template or any/all of the three javascript errors that you indicated were not the problem. Please look into your template and temporarily disable the two features you mentioned above.

-Melissa
The topic has been locked.
Active Subscriptions:

None
9 years 2 months ago #50780 by davlar
I have now resolved both the other two issues in console. Console is now clear until the facebook button is clicked. That hasn't helped. On attempting to connect with facebook this issue remains:

Uncaught TypeError: undefined is not a function - sdk.js:93

line 93 of sdk.js is:

__d("sdk.ErrorHandling",["ManagedError","sdk.Runtime","sdk.Scribe","sdk.UA","sdk.feature","wrapFunction"],function(a,b,c,d,e,f,g,h,i,j,k,l){var m=k('error_handling',false),n='';function o(u){var v=u._originalError;delete u._originalError;i.log('jssdk_error',{appId:h.getClientID(),error:u.name||u.message,extra:u});throw v;}function p(u){var v={line:u.lineNumber||u.line,message:u.message,name:u.name,script:u.fileName||u.sourceURL||u.script,stack:u.stackTrace||u.stack};v._originalError=u;if(j.chrome()&&/([\w:\.\/]+\.js):(\d+)/.test(u.stack)){v.script=RegExp.$1;v.line=parseInt(RegExp.$2,10);}for(var w in v)(v[w]==null&&delete v[w]);return v;}function q(u,v){return function(){if(!m)return u.apply(this,arguments);try{n=v;return u.apply(this,arguments);}catch(w){if(w instanceof g)throw w;var x=p(w);x.entry=v;var y=ES(Array.prototype.slice.call(arguments),'map',true,function(z){var aa=Object.prototype.toString.call(z);return (/^\[object (String|Number|Boolean|Object|Date)\]$/).test(aa)?z:z.toString();});x.args=ES('JSON','stringify',false,y).substring(0,200);o(x);}finally{n='';}};}function r(u){if(!u.__wrapper)u.__wrapper=function(){try{return u.apply(this,arguments);}catch(v){window.setTimeout(function(){throw v;},0);return false;}};return u.__wrapper;}function s(u,v){return function(w,x){var y=v+':'+(n||'[global]')+':'+(w.name||'[anonymous]'+(arguments.callee.caller.name?'('+arguments.callee.caller.name+')':''));return u(l(w,'entry',y),x);};}if(m){setTimeout=s(setTimeout,'setTimeout');setInterval=s(setInterval,'setInterval');l.setWrapper(q,'entry');}var t={guard:q,unguard:r};e.exports=t;},null);


Has something changed to perhaps jquery or something else since version 6.0.0?
The topic has been locked.
Active Subscriptions:

None
9 years 2 months ago #50781 by davlar
has the onclick for login changed?

previously it was: jfbc.login.login_custom();

but you used:

jfbc.login.provider('facebook');
The topic has been locked.
Active Subscriptions:

None
9 years 2 months ago #50782 by davlar
ok - I appear to have fixed it by setting: "Show 'Logging In' message" to "No" in the JFBConnect backend.
The topic has been locked.
Support Specialist
9 years 2 months ago #50783 by mel
The older jfbc.login.login_custom() call is deprecated, but it currently just calls the new call. It would be best to update it to jfbc.login.provider('facebook'); and also the google one should be jfbc.login.provider('google');

Both Alex and I just tried logging in on your site from Chrome from both of our computers and had no issues logging in multiple times using Facebook. Could you try clearing your browser cache and cookies and trying again?

-Melissa
The topic has been locked.
Support Specialist
9 years 2 months ago #50784 by mel
Just cross-posted and saw your newest message. Glad you got it going and let us know if you run into any further issues.
The topic has been locked.