在Heroku

时间:2017-10-26 19:58:02

标签: heroku deployd

我在heroku中部署deployd应用程序时遇到此错误。在当地的环境中,它的工作正常。这是从deployd源代码发生的,我无法弄清楚为什么。我假设它可能是用户对象的东西,但是当我从本地环境看到它时,它看起来还可以。不幸的是,我无法找到一种方法来破解heroku以深入了解node_module级别。用户集合已经与本地密码哈希一起手动复制。有人有线索吗?非常感谢。

UserCollection.getUserAndPasswordHash at /app/node_modules/deployd/lib/resources/user-collection.js:291:35

<body>
  <div class="container-full text-center">
            <form>
                <div class="form-group">
                <label for="exampleInputEmail1">Username</label>
                <input type="text" class="form-control" id="username" placeholder="Username">
              </div>
              <div class="form-group">
                <label for="exampleInputPassword1">Password</label>
                <input type="password" class="form-control" id="password" placeholder="Password">
              </div>
          <button type="submit" id="signin" class="btn btn-info">Sign In</button>
        </form>
        </div>
  </div>
  <script type="text/javascript" src="/js/lib/jquery.js"></script>
    <script type="text/javascript" src="/js/lib/toastr.min.js"></script>
  <script type="text/javascript" src="/dpd.js"></script>
  <script type="text/javascript">
    dpd.users.me(function(user) {
      if (user) {
        location.href = "/assets.html";
      }
    });

    $('#signin').click(function() {
      var username = $('#username').val();
      var password = $('#password').val();

      dpd.users.login({username: username, password: password}, function(session, error) {
        if (error) {
          toastr.error(error.message);
        } else {
          location.href = "/assets.html";
        }
      });
      return false;
    });
  </script>
</body>

-----错误------

  

TypeError:数据必须是字符串或缓冲区   2017-10-26T19:31:10.868780 + 00:00 app [web.1]:在Hash.update   (crypto.js:99:16)2017-10-26T19:31:10.868781 + 00:00 app [web.1]:at   UserCollection.getUserAndPasswordHash   (/app/node_modules/deployd/lib/resources/user-collection.js:291:35)   2017-10-26T19:31:10.868782 + 00:00 app [web.1]:at   /app/node_modules/deployd/lib/resources/user-collection.js:308:27   2017-10-26T19:31:10.868783 + 00:00 app [web.1]:at   /app/node_modules/deployd/lib/db.js:412:11   2017-10-26T19:31:10.868784 + 00:00 app [web.1]:在handleCallback   (/app/node_modules/mongodb/lib/utils.js:120:56)   2017-10-26T19:31:10.868784 + 00:00 app [web.1]:at   /app/node_modules/mongodb/lib/cursor.js:861:16   2017-10-26T19:31:10.868785 + 00:00 app [web.1]:在handleCallback   (/app/node_modules/mongodb-core/lib/cursor.js:171:5)   2017-10-26T19:31:10.868785 + 00:00 app [web.1]:at setCursorNotified   (/app/node_modules/mongodb-core/lib/cursor.js:515:3)   2017-10-26T19:31:10.868786 + 00:00 app [web.1]:at   /app/node_modules/mongodb-core/lib/cursor.js:597:16   2017-10-26T19:31:10.868787 + 00:00 app [web.1]:在queryCallback   (/app/node_modules/mongodb-core/lib/cursor.js:232:18)   2017-10-26T19:31:10.868787 + 00:00 app [web.1]:at   /app/node_modules/mongodb-core/lib/connection/pool.js:469:18   2017-10-26T19:31:10.868788 + 00:00 app [web.1]:at   _combinedTickCallback(internal / process / next_tick.js:131:7)2017-10-26T19:31:10.868788 + 00:00 app [web.1]:at   process._tickDomainCallback(internal / process / next_tick.js:218:9)   2017-10-26T19:31:10.874754 + 00:00 heroku [router]:at =错误代码= H13   desc =“没有响应的连接关闭”方法= GET   path =“/ assets1.html”host = mineralmarket.herokuapp.com   request_id = 6e2be40a-8043-46ff-ae8b-f923e8c59b06 fwd =“220.76.173.176”   dyno = web.1 connect = 0ms service = 52ms status = 503 bytes = 0 protocol = https

0 个答案:

没有答案