title: Bluebird promise chain error: Maximum call stack size exceeded
body: <p>I keep getting this error while trying to run Promise chain. I can see in log first step went trough, then second step too and instead of third step I keep getting this error. I can't see any recursions here.. Also I'm using mysql client for bluebird database connection.</p>
  
  <pre><code>Promise.try(function () {
          console.log(1);
          return validator.escape(data.cookie);
      }).then(function (cookie) {
          console.log(2);
          return db('cs_users').where({
              secret_login_key: cookie
          }).limit(1);
      }).then(function (userData) {
          console.log(3);
          if (userData &amp;&amp; userData.length &gt; 0) {
              console.log(3.5);
              if (userData[0].user_last_contacted &gt; 0 &amp;&amp; (Math.floor(Date.now() / 1000) + (60 * 60 * 10)) &gt; userData[0].user_last_contacted) {
                  self.contact(data);
                  return db('cs_users').where({id: userData[0].id}).update({user_last_contacted: Math.floor(Date.now() / 1000)});
              } else {
                  self.io.to(socketID).emit('contactError', 1);
              }
          }
      }).then(function(){
          console.log(4);
          self.io.to(socketID).emit('contactSuccess', 1);
      }).catch(function(e){
          console.log('Error while contacting: ' + e.message);
      });
  </code></pre>