Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Not enough data error : while doing Disqus SSO

I am trying to integrate Disqus SSO in my site.

var DISQUS_SECRET = "xyz"; var DISQUS_PUBLIC = "abc"; var disqus_developer = 1;  function disqusSignon() {     var disqusData = {         id: "{{ user.id }}",         username: "{{ user.username }}",         email: "{{ user.email }}"     };      var disqusStr = JSON.stringify(disqusData);     var timestamp = Math.round(+new Date() / 1000);     var message = window.btoa(disqusStr);     var result = CryptoJS.HmacSHA1(message + " " + timestamp, DISQUS_SECRET);     var hexsig = CryptoJS.enc.Hex.stringify(result);      return {         pubKey: DISQUS_PUBLIC,         auth: message + " " + hexsig + " " + timestamp     }; }  var data = disqusSignon();  function disqus_config(){     this.callbacks.afterRender = [function() {         this.page.remote_auth_s3 = data.auth;         this.page.api_key = data.pubKey;     }]; }  var disqus_config = function() {     this.page.remote_auth_s3 = data.auth;     this.page.api_key = data.pubKey; }  var disqus_shortname = 'askpopulo'; /* * * DON'T EDIT BELOW THIS LINE * * */ (function() {     var dsq = document.createElement('script'); dsq.type = 'text/javascript'; dsq.async = true;     dsq.src = '//' + disqus_shortname + '.disqus.com/embed.js';     (document.getElementsByTagName('head')[0] || document.getElementsByTagName('body')[0]).appendChild(dsq); })(); 

Every thing is fine, the payload that is getting generated is also validated correctly on Disqus SSO debug tool. Still the user is not getting signed in using SSO.

And also this message is getting printed on the javascript console:

It looks like there was a problem: Error: Not enough data {stack: (...), message: "Not enough data"}message: "Not enough data"stack: (...)get stack: function () { [native code] }arguments: nullcaller: nulllength: 0name: ""prototype: StackTraceGetter__proto__: function Empty() {}set stack: function () { [native code] }arguments: nullcaller: nulllength: 1name: ""prototype: StackTraceSetter__proto__: function Empty() {}proto: dr.DiscoveryApp.a.Model.extend.onComplete @ discovery.bundle.fce1a5edaced8a1898cef54c2d9fb2bf.js:2(anonymous function) @ common.bundle.91cd39decece4de79b12c1d2e99a09c8.js:9(anonymous function) @ common.bundle.91cd39decece4de79b12c1d2e99a09c8.js:9p @ common.bundle.91cd39decece4de79b12c1d2e99a09c8.js:9o @ common.bundle.91cd39decece4de79b12c1d2e99a09c8.js:9e @ common.bundle.91cd39decece4de79b12c1d2e99a09c8.js:9(anonymous function) @ common.bundle.91cd39decece4de79b12c1d2e99a09c8.js:9(anonymous function) @ common.bundle.91cd39decece4de79b12c1d2e99a09c8.js:9p @ common.bundle.91cd39decece4de79b12c1d2e99a09c8.js:9o @ common.bundle.91cd39decece4de79b12c1d2e99a09c8.js:9c @ common.bundle.91cd39decece4de79b12c1d2e99a09c8.js:9(anonymous function) @ common.bundle.91cd39decece4de79b12c1d2e99a09c8.js:9(anonymous function) @ common.bundle.91cd39decece4de79b12c1d2e99a09c8.js:9p @ common.bundle.91cd39decece4de79b12c1d2e99a09c8.js:9o @ common.bundle.91cd39decece4de79b12c1d2e99a09c8.js:9c @ common.bundle.91cd39decece4de79b12c1d2e99a09c8.js:9(anonymous function) @ common.bundle.91cd39decece4de79b12c1d2e99a09c8.js:9(anonymous function) @ common.bundle.91cd39decece4de79b12c1d2e99a09c8.js:9p @ common.bundle.91cd39decece4de79b12c1d2e99a09c8.j

like image 476
ankit Avatar asked May 18 '15 16:05

ankit


1 Answers

I think you should accept @Sainaen 's comment as answer. I am just elaborating on that as no one else has done that till now. The reference is Disqus Bug Report

We checked with our team and these errors aren't a result of any problem so you can safely ignore them. However, were considering hiding them so they don't cause any annoyance. Thanks for reporting!

I verified and the errors are still coming however they do not effect the system's working in any way whatsoever. This is more of an annoyance rather than an error. Still, it should be fixed because Disqus is too big an entity to ignore these silly warnings. What i would suggest is to mail to them the new stack trace along with any other details you think are important. even i would mail them and let's hope it gets removed. If not, then turn a blind eye towards that. Hope it helps.

like image 153
200ok Avatar answered Sep 21 '22 03:09

200ok