Wechaty account logout unexpectedly
Created by: Samurais
Description
Since account login successfully, wechaty run in Ubuntu Server, but after several hours, the account logout unexpectedly.
Trace
^[[31m[2016-10-06 22:19:26.753] [ERROR] console - ^[[39mERR PuppetWebServer initEventsFromClient() client on error: TypeError: Cannot read property 'bridge' of undefined
at new MediaMessage (/root/git/chatbot-mvp/philly-wechat/node_modules/wechaty/src/message-media.js:18:33)
at PuppetWeb.onServerMessage (/root/git/chatbot-mvp/philly-wechat/node_modules/wechaty/src/puppet-web/event.js:365:11)
at emitOne (events.js:96:13)
at Server.emit (events.js:188:7)
at Socket.client.on.data (/root/git/chatbot-mvp/philly-wechat/node_modules/wechaty/src/puppet-web/server.js:149:14)
at emitOne (events.js:96:13)
at Socket.emit (events.js:188:7)
at Socket.onevent (/root/git/chatbot-mvp/philly-wechat/node_modules/socket.io/lib/socket.js:335:8)
at Socket.onpacket (/root/git/chatbot-mvp/philly-wechat/node_modules/socket.io/lib/socket.js:295:12)
at Client.ondecoded (/root/git/chatbot-mvp/philly-wechat/node_modules/socket.io/lib/client.js:193:14)
^[[32m[2016-10-06 22:19:26.755] [INFO] console - ^[[39mINFO Bot 小白 logouted
^[[32m[2016-10-06 22:20:12.745] [INFO] console - ^[[39mINFO Bot error: [object Object]
^[[33m[2016-10-06 22:20:12.893] [WARN] console - ^[[39mWARN PuppetWebEvent onBrowserDead() will not init browser because browser.targetState(close) !== open
Is it a bug? Or what is the solution to keep it steady? One solution is auto restart when getting crash.