binsee / padchat-sdk

padchat项目,sdk开发包,提供直接对协议服务的对接。本项目已停止维护,请转向新方案 https://github.com/botorange/wechaty-puppet-padpro
261 stars 88 forks source link

服务器重启后,客户端断线重连成功,但是等待指令超时 #95

Open hawkwithwind opened 5 years ago

hawkwithwind commented 5 years ago

3月4日凌晨服务器重启后,客户端尝试重连成功,但是报错等待指令超时。 (在十几个客户端中,两个发生这个问题,其他的正常)

事后在早8点发现,重启客户端自动登录后恢复正常。日志如下

[2019-03-04T00:00:00.502] [INFO] app - Websocket已关闭!code: 1005 - 
[2019-03-04T00:00:00.502] [INFO] app - 第 1 次与服务器连接断开!现在将重试连接服务器。
[2019-03-04T00:00:00.599] [INFO] app - 连接成功!
[2019-03-04T00:00:00.646] [INFO] app - 新建任务成功, json:  { success: true, data: {} }
[2019-03-04T00:00:01.147] [INFO] app - Websocket已关闭!code: 1005 - 
[2019-03-04T00:00:01.147] [INFO] app - 第 2 次与服务器连接断开!现在将重试连接服务器。
[2019-03-04T00:00:01.243] [INFO] app - 连接成功!
[2019-03-04T00:00:13.423] [INFO] app - 新建任务成功, json:  { success: true, data: {} }
[2019-03-04T00:00:14.791] [INFO] app - 微信账号登陆成功!
[2019-03-04T00:00:14.792] [INFO] app - 断线重连请求成功 { success: true,
  data: 
   { email: '',
     external: 0,
     message: 'Everything is ok',
     qq: 0,
     status: 0,
     uin: ****,
     longLinkServer: 'szlong.weixin.qq.com',
     nickName: '',
     phoneNumber: '',
     shortLinkServer: 'szshort.weixin.qq.com:80',
     userName: 'wxid_****' } }
[2019-03-04T00:00:14.844] [INFO] app - 当前账号信息: { userName: 'wxid_***', uin: *** }
[2019-03-04T00:00:17.069] [INFO] app - 收到推送联系人:weixin - 微信团队
[2019-03-04T00:00:17.070] [INFO] app - 收到推送联系人:fmessage - 朋友推荐消息
[2019-03-04T00:00:17.071] [INFO] app - 收到推送联系人:medianote - 语音记事本
[2019-03-04T00:00:17.071] [INFO] app - 收到推送联系人:floatbottle - 漂流瓶
[2019-03-04T00:00:17.073] [INFO] app - 收到推送联系人:filehelper - 文件传输助手
[2019-03-04T00:00:17.192] [INFO] app - 设备参数已写入到 config/login.json文件
(node:1) UnhandledPromiseRejectionWarning: Error: 等待指令操作结果超时!当前超时时间为:30000000
    at Timeout.setTimeout [as _onTimeout] (/home/work/node_modules/padchat-sdk/index.js:2498:11)
    at ontimeout (timers.js:498:11)
    at tryOnTimeout (timers.js:323:5)
    at Timer.listOnTimeout (timers.js:290:5)
(node:1) 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(). (rejection id: 1)