Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

近期wechaty启动失败次数较多 #53

Closed
lijiarui opened this issue Oct 20, 2016 · 5 comments
Closed

近期wechaty启动失败次数较多 #53

lijiarui opened this issue Oct 20, 2016 · 5 comments

Comments

@lijiarui
Copy link
Member

lijiarui commented Oct 20, 2016

更新后的代码,启动wechaty会出现错误

关闭代理、清除json文件后,依然启动失败,程序卡死。

多试几次后,可以成功跑通。

具体日志如下:

lijiaruideMacBook-Air:orangiss lijiarui$ WECHATY_LOG=silly npm run ts-node orangiss/testfun.ts

[email protected] ts-node /Users/lijiarui/git/wechaty
ts-node "orangiss/testfun.ts"

VERB Brolog WECHATY_LOG set level to silly
VERB Wechaty contructor()
VERB Wechaty on(login, function)
VERB Wechaty on(logout, function)
VERB Wechaty on(error, function)
VERB Wechaty on(scan, function)
VERB Wechaty on(room-join, function)
VERB Wechaty on(room-leave, function)
VERB Wechaty on(room-topic, function)
VERB Wechaty on(message, function)
INFO Wechaty v#git[6a400a2 #52 add chinese friend confirm message] initializing...
VERB Wechaty puppet: web
VERB Wechaty head: chrome
VERB Wechaty profile: TestFun.wechaty.json
VERB Wechaty uuid: 4e6c9108-4287-4b76-be10-ed6e3258abcb
VERB Puppet targetState(dead)
VERB Puppet currentState(dead)
VERB PuppetWeb init() with head:chrome, profile:TestFun.wechaty.json
VERB Puppet targetState(live)
VERB Puppet currentState(birthing)
VERB UtilLib getPort(18788)
VERB UtilLib getPort(18788) return: 19005
VERB PuppetWeb init() getPort 19005
VERB PuppetWeb initServer()
VERB PuppetWebServer init() on port 19005
VERB PuppetWebServer createHttpsServer() listen on port 19005
VERB PuppetWebServer init()-ed
VERB PuppetWeb initServer() done
VERB PuppetWeb initBrowser()
VERB PuppetWebBrowser constructor() with head(chrome) sessionFile(TestFun.wechaty.json)
VERB PuppetWebBrowser targetState(close)
VERB PuppetWebBrowser currentState(close)
VERB PuppetWebBrowser targetState(open)
VERB PuppetWebBrowser currentState(opening)
VERB PuppetWebBrowser initDriver(head: chrome)
VERB PuppetWebBrowser getChromeDriver()
VERB PuppetWebBrowser open(https://wx.qq.com/zh_CN/htmledition/v2/images/webwxgeticon.jpg)
VERB PuppetWebBrowser loadSession(TestFun.wechaty.json)
SILL PuppetWebBrowser dead() checking ...
SILL PuppetWebBrowser dead() checking ...
SILL PuppetWebBrowser dead() checking ...
SILL PuppetWebBrowser addCookies({"domain":".wx.qq.com","expiry":1476928227,"httpOnly":false,"name":"wxsid","path":"/","secure":false,"value":"Y Tkp m7jO0X AIf"})
SILL PuppetWebBrowser dead() checking ...
SILL PuppetWebBrowser addCookies({"domain":".wx.qq.com","expiry":1477144227,"httpOnly":false,"name":"wxuin","path":"/","secure":false,"value":"891575575"})
SILL PuppetWebBrowser dead() checking ...
SILL PuppetWebBrowser addCookies({"domain":".wx.qq.com","expiry":1476928227,"httpOnly":false,"name":"wxloadtime","path":"/","secure":false,"value":"1476885027_expired"})
SILL PuppetWebBrowser dead() checking ...
SILL PuppetWebBrowser addCookies({"domain":".wx.qq.com","expiry":1792241469,"httpOnly":false,"name":"webwxuvid","path":"/","secure":false,"value":"389a7ed41c7b9fa88205a69eff706fa79d6108aedcaa14e11b47fb41e71ac4b4db1f040ee0bea303a02e026e595106c6"})
SILL PuppetWebBrowser dead() checking ...
SILL PuppetWebBrowser addCookies({"domain":".wx.qq.com","expiry":1476928227,"httpOnly":false,"name":"wxpluginkey","path":"/","secure":false,"value":"1476870482"})
SILL PuppetWebBrowser dead() checking ...
SILL PuppetWebBrowser addCookies({"domain":".qq.com","expiry":2147385600,"httpOnly":false,"name":"pgv_pvi","path":"/","secure":false,"value":"8638175360"})
SILL PuppetWebBrowser dead() checking ...
SILL PuppetWebBrowser addCookies({"domain":".qq.com","expiry":1476928227,"httpOnly":false,"name":"webwx_data_ticket","path":"/","secure":false,"value":"gSe51PVVyozkkWQ2Ox87ln8S"})
SILL PuppetWebBrowser dead() checking ...
SILL PuppetWebBrowser addCookies({"domain":".wx.qq.com","expiry":1476928227,"httpOnly":false,"name":"mm_lang","path":"/","secure":false,"value":"zh_CN"})
SILL PuppetWebBrowser dead() checking ...
SILL PuppetWebBrowser addCookies({"domain":".qq.com","httpOnly":false,"name":"pgv_si","path":"/","secure":false,"value":"s4124510208"})
VERB PuppetWebBrowser loaded session(9 cookies) from TestFun.wechaty.json
VERB PuppetWebBrowser open(https://wx.qq.com)
VERB PuppetWebBrowser currentState(open)
VERB PuppetWeb initBrowser() done
VERB PuppetWeb initBridge()
VERB PuppetWebBridge new Bridge({puppet: PuppetWeb, port: 19005})
VERB PuppetWebBridge init()
VERB PuppetWebBridge inject()
SILL PuppetWebBrowser Browser.execute("injectioReturnValue = /** * * Wechaty - Wechat for Bot, and human who talk to ... ")
SILL PuppetWebBrowser dead() checking ...
SILL PuppetWebBridge inject() eval(Wechaty) return code[200] message[WechatyBro Inject Succ] port[19005]
SILL PuppetWebBrowser Browser.execute("return typeof WechatyBro === "undefined"")

@huan
Copy link
Member

huan commented Oct 20, 2016

it seems the log is truncated, because the last line is a Browser.execute.

please provide the full log for diagnosis.

@lijiarui
Copy link
Member Author

lijiarui commented Oct 20, 2016

what about the the following log?

I found PuppetWebBrowser dead several times, when Browser.execute, then PuppetWebBrowser dead.....

lijiaruideMacBook-Air:orangiss lijiarui$ WECHATY_LOG=silly npm run ts-node orangiss/testfun.ts

[email protected] ts-node /Users/lijiarui/git/wechaty
ts-node "orangiss/testfun.ts"

VERB Brolog WECHATY_LOG set level to silly
VERB Wechaty contructor()
VERB Wechaty on(login, function)
VERB Wechaty on(logout, function)
VERB Wechaty on(error, function)
VERB Wechaty on(scan, function)
VERB Wechaty on(room-join, function)
VERB Wechaty on(room-leave, function)
VERB Wechaty on(room-topic, function)
VERB Wechaty on(message, function)
INFO Wechaty v#git[6a400a2 #52 add chinese friend confirm message] initializing...
VERB Wechaty puppet: web
VERB Wechaty head: chrome
VERB Wechaty profile: TestFun.wechaty.json
VERB Wechaty uuid: 0d56f87c-45f3-473a-bcf2-6285455d05e0
VERB Puppet targetState(dead)
VERB Puppet currentState(dead)
VERB PuppetWeb init() with head:chrome, profile:TestFun.wechaty.json
VERB Puppet targetState(live)
VERB Puppet currentState(birthing)
VERB UtilLib getPort(18788)
VERB UtilLib getPort(18788) return: 19520
VERB PuppetWeb init() getPort 19520
VERB PuppetWeb initServer()
VERB PuppetWebServer init() on port 19520
VERB PuppetWebServer createHttpsServer() listen on port 19520
VERB PuppetWebServer init()-ed
VERB PuppetWeb initServer() done
VERB PuppetWeb initBrowser()
VERB PuppetWebBrowser constructor() with head(chrome) sessionFile(TestFun.wechaty.json)
VERB PuppetWebBrowser targetState(close)
VERB PuppetWebBrowser currentState(close)
VERB PuppetWebBrowser targetState(open)
VERB PuppetWebBrowser currentState(opening)
VERB PuppetWebBrowser initDriver(head: chrome)
VERB PuppetWebBrowser getChromeDriver()
VERB PuppetWebBrowser open(https://wx.qq.com/zh_CN/htmledition/v2/images/webwxgeticon.jpg)
VERB PuppetWebBrowser loadSession(TestFun.wechaty.json)
SILL PuppetWebBrowser dead() checking ...
SILL PuppetWebBrowser dead() checking ...
SILL PuppetWebBrowser dead() checking ...
SILL PuppetWebBrowser addCookies({"domain":".wx.qq.com","expiry":1476978774,"httpOnly":false,"name":"wxsid","path":"/","secure":false,"value":"qU4jyjKBH2Pa71mk"})
SILL PuppetWebBrowser dead() checking ...
SILL PuppetWebBrowser addCookies({"domain":".wx.qq.com","expiry":1477194774,"httpOnly":false,"name":"wxuin","path":"/","secure":false,"value":"891575575"})
SILL PuppetWebBrowser dead() checking ...
SILL PuppetWebBrowser addCookies({"domain":".qq.com","expiry":1476978774,"httpOnly":false,"name":"webwx_data_ticket","path":"/","secure":false,"value":"gSfKwh0Gs2ED0s4aVpH5gPsm"})
SILL PuppetWebBrowser dead() checking ...
SILL PuppetWebBrowser addCookies({"domain":".qq.com","httpOnly":false,"name":"pgv_si","path":"/","secure":false,"value":"s4124510208"})
SILL PuppetWebBrowser dead() checking ...
SILL PuppetWebBrowser addCookies({"domain":".wx.qq.com","expiry":1476978767,"httpOnly":false,"name":"mm_lang","path":"/","secure":false,"value":"zh_CN"})
SILL PuppetWebBrowser dead() checking ...
SILL PuppetWebBrowser addCookies({"domain":".wx.qq.com","expiry":1476978208,"httpOnly":false,"name":"wxloadtime","path":"/","secure":false,"value":"1476935007_expired"})
SILL PuppetWebBrowser dead() checking ...
SILL PuppetWebBrowser addCookies({"domain":".wx.qq.com","expiry":1476978774,"httpOnly":false,"name":"wxpluginkey","path":"/","secure":false,"value":"1476922141"})
SILL PuppetWebBrowser dead() checking ...
SILL PuppetWebBrowser addCookies({"domain":".qq.com","expiry":2147385600,"httpOnly":false,"name":"pgv_pvi","path":"/","secure":false,"value":"8638175360"})
SILL PuppetWebBrowser dead() checking ...
SILL PuppetWebBrowser addCookies({"domain":".wx.qq.com","expiry":1792241469,"httpOnly":false,"name":"webwxuvid","path":"/","secure":false,"value":"389a7ed41c7b9fa88205a69eff706fa79d6108aedcaa14e11b47fb41e71ac4b4db1f040ee0bea303a02e026e595106c6"})
VERB PuppetWebBrowser loaded session(9 cookies) from TestFun.wechaty.json
VERB PuppetWebBrowser open(https://wx.qq.com)
VERB PuppetWebBrowser currentState(open)
VERB PuppetWeb initBrowser() done
VERB PuppetWeb initBridge()
VERB PuppetWebBridge new Bridge({puppet: PuppetWeb, port: 19520})
VERB PuppetWebBridge init()
VERB PuppetWebBridge inject()
SILL PuppetWebBrowser Browser.execute("injectioReturnValue = /* * * Wechaty - Wechat for Bot, and human who talk to ... ")
SILL PuppetWebBrowser dead() checking ...
SILL PuppetWebBridge inject() eval(Wechaty) return code[200] message[WechatyBro Inject Succ] port[19520]
SILL PuppetWebBrowser Browser.execute("return typeof WechatyBro === "undefined"")
SILL PuppetWebBrowser dead() checking ...
SILL PuppetWebBrowser Browser.execute(" const callback = arguments[arguments.length - 1] const isAsync = (typeof ... ")
SILL PuppetWebBrowser dead() checking ...
SILL PuppetWebBridge inject() Wechaty.init() return code[200] message[WechatyBro Init Succ on port: 19520] port[19520]
SILL PuppetWebBrowser Browser.execute("return typeof WechatyBro === "undefined"")
SILL PuppetWebBrowser dead() checking ...
SILL PuppetWebBrowser Browser.execute(" const callback = arguments[arguments.length - 1] const isAsync = (typeof ... ")
SILL PuppetWebBrowser dead() checking ...
SILL PuppetWebBridge inject() ding success
VERB PuppetWeb initBridge() done
SILL PuppetWebWatchdog onFeed: 120000, HEARTBEAT:[inited]
SILL PuppetWebWatchdog clearWatchDogTimer() nothing to clear
SILL PuppetWebWatchdog setWatchDogTimer(120000, HEARTBEAT:[inited])
SILL PuppetWebWatchdog monitorScan(HEARTBEAT)
SILL PuppetWebWatchdog autoSaveSession()
VERB PuppetWeb init() done
VERB Puppet currentState(live)
VERB PuppetWebWatchdog watchDogReset() timeout 120000
INFO Bot error: Error: watchdog reset after 120 seconds, last feed:[HEARTBEAT:[inited]]
VERB PuppetWebEvent onBrowserDead(watchdog reset after 120 seconds, last feed:[HEARTBEAT:[inited]])
SILL PuppetWebWatchdog onFeed: 180000, HEARTBEAT:[onBrowserDead() set a timeout of 180 seconds to prevent unknown state change]
SILL PuppetWebWatchdog clearWatchDogTimer() [0] seconds left
SILL PuppetWebWatchdog setWatchDogTimer(180000, HEARTBEAT:[onBrowserDead() set a timeout of 180 seconds to prevent unknown state change])
SILL PuppetWebWatchdog monitorScan(HEARTBEAT)
SILL PuppetWebWatchdog autoSaveSession()
VERB PuppetWebBrowser quit()
VERB PuppetWebBrowser currentState(closing)
SILL PuppetWebBrowser quit() driver.close()-ed
SILL PuppetWebBrowser quit() driver.quit()-ed
SILL PuppetWebBrowser quit() this.driver = null
SILL PuppetWebBrowser clean() retryPromise: attempt 1 time for timeout 45000
SILL PuppetWebBrowser getBrowserPids()
SILL PuppetWebBrowser getBrowserPids() child: {"PPID":"35916","PID":"35921","STAT":"S ","COMM":"node"}
SILL PuppetWebBrowser getBrowserPids() child: {"PPID":"35921","PID":"35922","STAT":"S ","COMM":"/Users/lijiarui/git/wechaty/node_modules/chromedriver/lib/chromedriver/chromedriver"}
SILL PuppetWebBrowser getBrowserPids() child: {"PPID":"35916","PID":"35955","STAT":"R ","COMM":"ps"}
VERB PuppetWebBrowser clean() retryPromise() resolved
SILL PuppetWebBrowser quit() co() end
VERB PuppetWebBrowser currentState(close)
VERB PuppetWebEvent onBrowserDead() browser quit-ed
VERB PuppetWeb initBrowser()
VERB PuppetWebBrowser constructor() with head(chrome) sessionFile(TestFun.wechaty.json)
VERB PuppetWebBrowser targetState(close)
VERB PuppetWebBrowser currentState(close)
VERB PuppetWebBrowser targetState(open)
VERB PuppetWebBrowser currentState(opening)
VERB PuppetWebBrowser initDriver(head: chrome)
VERB PuppetWebBrowser getChromeDriver()
VERB PuppetWebBrowser open(https://wx.qq.com/zh_CN/htmledition/v2/images/webwxgeticon.jpg)
VERB PuppetWebBrowser loadSession(TestFun.wechaty.json)
SILL PuppetWebBrowser dead() checking ...
SILL PuppetWebBrowser dead() checking ...
SILL PuppetWebBrowser dead() checking ...
SILL PuppetWebBrowser addCookies({"domain":".wx.qq.com","expiry":1476978774,"httpOnly":false,"name":"wxsid","path":"/","secure":false,"value":"qU4jyjKBH2Pa71mk"})
SILL PuppetWebBrowser dead() checking ...
SILL PuppetWebBrowser addCookies({"domain":".wx.qq.com","expiry":1477194774,"httpOnly":false,"name":"wxuin","path":"/","secure":false,"value":"891575575"})
SILL PuppetWebBrowser dead() checking ...
SILL PuppetWebBrowser addCookies({"domain":".qq.com","expiry":1476978774,"httpOnly":false,"name":"webwx_data_ticket","path":"/","secure":false,"value":"gSfKwh0Gs2ED0s4aVpH5gPsm"})
SILL PuppetWebBrowser dead() checking ...
SILL PuppetWebBrowser addCookies({"domain":".qq.com","httpOnly":false,"name":"pgv_si","path":"/","secure":false,"value":"s4124510208"})
SILL PuppetWebBrowser dead() checking ...
SILL PuppetWebBrowser addCookies({"domain":".wx.qq.com","expiry":1476978767,"httpOnly":false,"name":"mm_lang","path":"/","secure":false,"value":"zh_CN"})
SILL PuppetWebBrowser dead() checking ...
SILL PuppetWebBrowser addCookies({"domain":".wx.qq.com","expiry":1476978208,"httpOnly":false,"name":"wxloadtime","path":"/","secure":false,"value":"1476935007_expired"})
SILL PuppetWebBrowser dead() checking ...
SILL PuppetWebBrowser addCookies({"domain":".wx.qq.com","expiry":1476978774,"httpOnly":false,"name":"wxpluginkey","path":"/","secure":false,"value":"1476922141"})
SILL PuppetWebBrowser dead() checking ...
SILL PuppetWebBrowser addCookies({"domain":".qq.com","expiry":2147385600,"httpOnly":false,"name":"pgv_pvi","path":"/","secure":false,"value":"8638175360"})
SILL PuppetWebBrowser dead() checking ...
SILL PuppetWebBrowser addCookies({"domain":".wx.qq.com","expiry":1792241469,"httpOnly":false,"name":"webwxuvid","path":"/","secure":false,"value":"389a7ed41c7b9fa88205a69eff706fa79d6108aedcaa14e11b47fb41e71ac4b4db1f040ee0bea303a02e026e595106c6"})
VERB PuppetWebBrowser loaded session(9 cookies) from TestFun.wechaty.json
VERB PuppetWebBrowser open(https://wx.qq.com)
VERB PuppetWebBrowser currentState(open)
VERB PuppetWebEvent onBrowserDead() new browser inited
VERB PuppetWeb initBridge()
VERB PuppetWebBridge new Bridge({puppet: PuppetWeb, port: 19520})
VERB PuppetWebBridge init()
VERB PuppetWebBridge inject()
SILL PuppetWebBrowser Browser.execute("injectioReturnValue = /
* * * Wechaty - Wechat for Bot, and human who talk to ... ")
SILL PuppetWebBrowser dead() checking ...
SILL PuppetWebBridge inject() eval(Wechaty) return code[200] message[WechatyBro Inject Succ] port[19520]
SILL PuppetWebBrowser Browser.execute("return typeof WechatyBro === "undefined"")
SILL PuppetWebBrowser dead() checking ...
SILL PuppetWebBrowser Browser.execute(" const callback = arguments[arguments.length - 1] const isAsync = (typeof ... ")
SILL PuppetWebBrowser dead() checking ...
SILL PuppetWebBridge inject() Wechaty.init() return code[200] message[WechatyBro Init Succ on port: 19520] port[19520]
SILL PuppetWebBrowser Browser.execute("return typeof WechatyBro === "undefined"")
SILL PuppetWebBrowser dead() checking ...
SILL PuppetWebBrowser Browser.execute(" const callback = arguments[arguments.length - 1] const isAsync = (typeof ... ")
SILL PuppetWebBrowser dead() checking ...
SILL PuppetWebBridge inject() ding success
VERB PuppetWebEvent onBrowserDead() bridge re-inited
SILL PuppetWebBrowser Browser.execute("return typeof WechatyBro === "undefined"")
SILL PuppetWebBrowser dead() checking ...
SILL PuppetWebBrowser Browser.execute(" const callback = arguments[arguments.length - 1] const isAsync = (typeof ... ")
SILL PuppetWebBrowser dead() checking ...
VERB PuppetWebEvent onBrowserDead() ding() works well after reset
VERB PuppetWebEvent onBrowserDead() new browser borned
SILL PuppetWebWatchdog onFeed: 60000, POISON:[onBrowserDead() new browser borned]
SILL PuppetWebWatchdog clearWatchDogTimer() [151] seconds left
SILL PuppetWebWatchdog setWatchDogTimer(60000, POISON:[onBrowserDead() new browser borned])
SILL PuppetWebWatchdog monitorScan(POISON)
SILL PuppetWebWatchdog autoSaveSession()
SILL PuppetWebWatchdog clearWatchDogTimer() [60] seconds left

@huan
Copy link
Member

huan commented Oct 20, 2016

this one is better. more logs like this would be helpful.

@huan
Copy link
Member

huan commented Oct 20, 2016

can not re-produce this error by run npm run demo two times.

please submit more log next time u meet this problem.

and if u could provide a way to re-produce this behavior, that will be super helpful.

@huan
Copy link
Member

huan commented Oct 21, 2016

please feel free to re-open this issue if you can provide Steps to reproduce the behavior. thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants