(节点:4)UnhandledPromiseRejectionWarning:错误:提供了错误的登录详细信息。 (托管不和谐的漫游器)

时间:2018-11-08 01:13:10

标签: heroku

每当我运行我的机器人时,都会出现以下错误 就像令牌有效一样,它也可以正常工作

我的机器人代码:https://github.com/legouju/funtimesbottrytwo/tree/master (很抱歉,如果我打扰你们,我是Heroku的新手)

日志说:

2018-11-08T01:02:06.643169 + 00:00 app [worker.1]:在_receiver.cleanup(/app/node_modules/ws/lib/websocket.js:220:12) 2018-11-08T01:02:06.643170 + 00:00 app [worker.1]:在Receiver.cleanup(/app/node_modules/ws/lib/receiver.js:535:15) 2018-11-08T01:02:06.643172 + 00:00 app [worker.1]:在WebSocket.finalize(/app/node_modules/ws/lib/websocket.js:206:20) 2018-11-08T01:02:06.643173 + 00:00 app [worker.1]:位于TLSSocket.emit(events.js:187:15) 2018-11-08T01:02:06.643339 + 00:00 app [worker.1]:(node:4)​​UnhandledPromiseRejectionWarning:未处理的承诺被拒绝。引发此错误的原因可能是抛出了一个没有catch块的异步函数,或者是拒绝了一个.catch()无法处理的承诺。 (拒绝ID:2) 2018-11-08T01:02:06.644702 + 00:00 app [worker.1]:(node:4)​​[DEP0018] DeprecationWarning:已弃用未处理的承诺拒绝。将来,未处理的承诺拒绝将以非零退出代码终止Node.js进程。 2018-11-08T01:02:06.806551 + 00:00 heroku [worker.1]:状态从更改为崩溃 2018-11-08T01:09:10.724894 + 00:00 heroku [worker.1]:状态从崩溃变为崩溃 2018-11-08T01:09:10.613680 + 00:00 app [api]:扩展到web @ 0:免费worker @ 0:免费由用户johnmo123jm@gmail.com 2018-11-08T01:09:12.333365 + 00:00 app [api]:扩展到web @ 0:免费worker @ 1:免费由用户johnmo123jm@gmail.com 2018-11-08T01:09:15.179891 + 00:00 heroku [worker.1]:使用命令node index.js启动进程 2018-11-08T01:09:15.924170 + 00:00 heroku [worker.1]:状态从开始更改为开始 2018-11-08T01:09:17.897595 + 00:00 app [worker.1]:(node:4)​​UnhandledPromiseRejectionWarning:错误:提供了错误的登录详细信息。 2018-11-08T01:09:17.897616 + 00:00 app [worker.1]:位于WebSocketConnection.client.ws.connection.once.event(/app/node_modules/discord.js/src/client/ClientManager.js: 48:41) 2018-11-08T01:09:17.897618 + 00:00 app [worker.1]:at Object.onceWrapper(events.js:273:13) 2018-11-08T01:09:17.897620 + 00:00 app [worker.1]:位于WebSocketConnection.emit(events.js:182:13) 2018-11-08T01:09:17.897621 + 00:00 app [worker.1]:位于WebSocketConnection.onClose(/app/node_modules/discord.js/src/client/websocket/WebSocketConnection.js:390:10) 2018-11-08T01:09:17.897623 + 00:00 app [worker.1]:位于WebSocket.onClose(/app/node_modules/ws/lib/event-target.js:124:16) 2018-11-08T01:09:17.897624 + 00:00 app [worker.1]:位于WebSocket.emit(events.js:182:13) 2018-11-08T01:09:17.897626 + 00:00 app [worker.1]:在_receiver.cleanup(/app/node_modules/ws/lib/websocket.js:220:12) 2018-11-08T01:09:17.897628 + 00:00 app [worker.1]:在Receiver.cleanup(/app/node_modules/ws/lib/receiver.js:535:15) 2018-11-08T01:09:17.897629 + 00:00 app [worker.1]:在WebSocket.finalize(/app/node_modules/ws/lib/websocket.js:206:20) 2018-11-08T01:09:17.897631 + 00:00 app [worker.1]:位于TLSSocket.emit(events.js:187:15) 2018-11-08T01:09:17.897691 + 00:00 app [worker.1]:(node:4)​​UnhandledPromiseRejectionWarning:未处理的承诺拒绝。引发此错误的原因可能是抛出了一个没有catch块的异步函数,或者是拒绝了一个.catch()无法处理的承诺。 (拒绝ID:2) 2018-11-08T01:09:17.897804 + 00:00 app [worker.1]:(node:4)​​[DEP0018] DeprecationWarning:已弃用未处理的承诺拒绝。将来,未处理的承诺拒绝将以非零退出代码终止Node.js进程。 2018-11-08T01:09:17.991004 + 00:00 heroku [worker.1]:状态从更改为崩溃 2018-11-08T01:09:17.993376 + 00:00 heroku [worker.1]:状态从崩溃更改为开始 2018-11-08T01:09:17.957224 + 00:00 heroku [worker.1]:进程退出,状态为0 2018-11-08T01:09:20.088995 + 00:00 heroku [worker.1]:使用命令node index.js启动进程 2018-11-08T01:09:20.790067 + 00:00 heroku [worker.1]:状态从开始更改为开始 2018-11-08T01:09:23.458015 + 00:00 heroku [worker.1]:进程退出,状态为0 2018-11-08T01:09:23.386529 + 00:00 app [worker.1]:(node:4)​​UnhandledPromiseRejectionWarning:错误:提供了错误的登录详细信息。 2018-11-08T01:09:23.386549 + 00:00 app [worker.1]:位于WebSocketConnection.client.ws.connection.once.event(/app/node_modules/discord.js/src/client/ClientManager.js: 48:41) 2018-11-08T01:09:23.386550 + 00:00 app [worker.1]:at Object.onceWrapper(events.js:273:13) 2018-11-08T01:09:23.386552 + 00:00 app [worker.1]:位于WebSocketConnection.emit(events.js:182:13) 2018-11-08T01:09:23.386553 + 00:00 app [worker.1]:位于WebSocketConnection.onClose(/app/node_modules/discord.js/src/client/websocket/WebSocketConnection.js:390:10) 2018-11-08T01:09:23.386554 + 00:00 app [worker.1]:位于WebSocket.onClose(/app/node_modules/ws/lib/event-target.js:124:16) 2018-11-08T01:09:23.386555 + 00:00 app [worker.1]:位于WebSocket.emit(events.js:182:13) 2018-11-08T01:09:23.386556 + 00:00 app [worker.1]:在_receiver.cleanup(/app/node_modules/ws/lib/websocket.js:220:12) 2018-11-08T01:09:23.386557 + 00:00 app [worker.1]:在Receiver.cleanup(/app/node_modules/ws/lib/receiver.js:535:15) 2018-11-08T01:09:23.386558 + 00:00 app [worker.1]:在WebSocket.finalize(/app/node_modules/ws/lib/websocket.js:206:20) 2018-11-08T01:09:23.386560 + 00:00 app [worker.1]:位于TLSSocket.emit(events.js:187:15) 2018-11-08T01:09:23.386689 + 00:00 app [worker.1]:(node:4)​​UnhandledPromiseRejectionWarning:未处理的承诺被拒绝。引发此错误的原因可能是抛出了一个没有catch块的异步函数,或者是拒绝了一个.catch()无法处理的承诺。 (拒绝ID:2) 2018-11-08T01:09:23.386844 + 00:00 app [worker.1]:(node:4)​​[DEP0018] DeprecationWarning:已弃用未处理的承诺拒绝。将来,未处理的承诺拒绝将以非零退出代码终止Node.js进程。 2018-11-08T01:09:23.570331 + 00:00 heroku [worker.1]:状态从向上更改为崩溃

1 个答案:

答案 0 :(得分:0)

错误消息似乎试图告诉您以下信息:

UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error 
originated either by throwing inside of an async function without a catch 
block, or by rejecting a promise which was not handled with .catch().

这与您的代码有关。另外还有一个错误,您应该看看:

08T01:09:17.897595+00:00 app[worker.1]: (node:4) 
UnhandledPromiseRejectionWarning: Error: Incorrect login details were 
provided. 2018-11-08T01:09:17.897616+00:00 app[worker.1]: at 
WebSocketConnection.client.ws.connection.once.event 

似乎凭据不正确,请检查您的代码并查看您的数据库授权是否正确