Rocket1184/qq-bot-rebown

程序崩溃

Closed this issue · 4 comments

错误信息如下:
(node:2200) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 2): Error: Request failed with status code 504
(node:2200) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.

rocka commented

这个错误是在做什么的时候出现的?能不能贴一下日志的上下文?

错误大概出现在登录后的20个小时

这是错误信息的上一条日志
[Mon Mar 26 2018 09:42:18 GMT+0800 (**标准时间)] INFO 保存 Cookie 到 C:\Users
ADMINI~1\AppData\Local\Temp\2\qq-bot.cookie

猜测是某条request 504,然后Unhandled promise rejections are deprecated

rocka commented

错误信息的上一条日志是保存 Cookie 的话,是不是这一段时间都没有收到过消息?

我遇到过出现 504 错误的情况,是在轮询消息时出现的,也做过处理:

validateStatus: status => status === 200 || status === 504

其他的情况就没有遇到过了。重启一下程序看看能否复现?启动程序时设置环境变量 LOG_LEVELdebug 可以打印更详细的日志。