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

Can't run wechaty with error log #61

Closed
lijiarui opened this issue Oct 25, 2016 · 3 comments
Closed

Can't run wechaty with error log #61

lijiarui opened this issue Oct 25, 2016 · 3 comments

Comments

@lijiarui
Copy link
Member

Please run npm run doctor and paste the output here

Wechaty Doctor

  1. Wechaty version: #git[93d1728 doc]
  2. Darwin x64 version 15.6.0 memory 146/4096 MB
  3. Docker: false

Expected behavior

run wechaty

Actual behavior

can't run wechaty on my mac, but can run wechaty on digital ocean
the error log as follows:

VERB Wechaty contructor()
VERB Wechaty on(scan, function)
VERB Wechaty on(logout, function)
VERB Wechaty on(error, function)
VERB Wechaty on(login, 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[93d1728 doc] initializing...
VERB Wechaty puppet: web
VERB Wechaty head: chrome
VERB Wechaty profile: demo.wechaty.json
VERB Wechaty uuid: 53108ef9-2d2e-4326-ae18-e28bd9792e7e
VERB Puppet targetState(dead)
VERB Puppet currentState(dead)
VERB PuppetWeb init() with head:chrome, profile:demo.wechaty.json
VERB Puppet targetState(live)
VERB Puppet currentState(birthing)
VERB UtilLib getPort(18788)
VERB UtilLib getPort(18788) return: 18853
VERB PuppetWeb init() getPort 18853
VERB PuppetWeb initServer()
VERB PuppetWebServer init() on port 18853
VERB PuppetWebServer createHttpsServer() listen on port 18853
VERB PuppetWebServer init()-ed
VERB PuppetWeb initServer() done
VERB PuppetWeb initBrowser()
VERB PuppetWebBrowser constructor() with head(chrome) sessionFile(demo.wechaty.json)
VERB PuppetWebBrowser targetState(close)
VERB PuppetWebBrowser currentState(close)
VERB PuppetWebBrowserCookie constructor(Browser, demo.wechaty.json)
VERB PuppetWebBrowser targetState(open)
VERB PuppetWebBrowser currentState(opening)
VERB PuppetWebBrowser initDriver() for head: chrome
VERB PuppetWebBrowser getChromeDriver()
VERB PuppetWebBrowser driver(Driver)
VERB PuppetWebBrowser open(https://wx.qq.com/zh_CN/htmledition/v2/images/webwxgeticon.jpg)
VERB PuppetWebBrowserCookie loadSession() from demo.wechaty.json
SILL PuppetWebBrowserCookie addCookies({"domain":".wx.qq.com","expiry":1477418987,"httpOnly":false,"name":"wxloadtime","path":"/","secure":false,"value":"1477375787"})
SILL PuppetWebBrowserCookie addCookies({"domain":".wx.qq.com","expiry":1477418987,"httpOnly":false,"name":"wxsid","path":"/","secure":false,"value":"4FGtPc3H2t6Zjaec"})
SILL PuppetWebBrowserCookie addCookies({"domain":".wx.qq.com","expiry":1477418987,"httpOnly":false,"name":"wxuin","path":"/","secure":false,"value":"891575575"})
SILL PuppetWebBrowserCookie addCookies({"domain":".qq.com","expiry":2147385600,"httpOnly":false,"name":"pgv_pvi","path":"/","secure":false,"value":"9225103360"})
SILL PuppetWebBrowserCookie addCookies({"domain":".wx.qq.com","expiry":1792239143,"httpOnly":false,"name":"webwxuvid","path":"/","secure":false,"value":"389a7ed41c7b9fa88205a69eff706fa7c493c8e056775cee761d67f1da927bab366cceb7b7c6a060c8dde76b81c36c0f"})
SILL PuppetWebBrowserCookie addCookies({"domain":".qq.com","expiry":1477418987,"httpOnly":false,"name":"webwx_data_ticket","path":"/","secure":false,"value":"gSfhB0Zxd6tRcLz0OwotwKIP"})
SILL PuppetWebBrowserCookie addCookies({"domain":".wx.qq.com","expiry":1477418987,"httpOnly":false,"name":"mm_lang","path":"/","secure":false,"value":"zh_CN"})
SILL PuppetWebBrowserCookie addCookies({"domain":".qq.com","httpOnly":false,"name":"pgv_si","path":"/","secure":false,"value":"s3690461184"})
VERB PuppetWebBrowserCookie loaded session(8 cookies) from demo.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: 18853})
VERB PuppetWebBridge init()
VERB PuppetWebBridge inject()
SILL PuppetWebBrowser Browser.execute("injectioReturnValue = /** * * Wechaty - Wechat for Bot, and human who talk to ... ")
SILL PuppetWebBridge inject() eval(Wechaty) return code[200] message[WechatyBro Inject Succ] port[18853]
SILL PuppetWebBrowser Browser.execute("return typeof WechatyBro === "undefined"")
SILL PuppetWebBrowser Browser.execute(" const callback = arguments[arguments.length - 1] const isAsync = (typeof ... ")
SILL PuppetWebBridge inject() Wechaty.init() return code[200] message[WechatyBro Init Succ on port: 18853] port[18853]
SILL PuppetWebBrowser Browser.execute("return typeof WechatyBro === "undefined"")
SILL PuppetWebBrowser Browser.execute(" const callback = arguments[arguments.length - 1] const isAsync = (typeof ... ")
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()
SILL PuppetWebWatchdog memoryCheck() free: 602 MB, require: 64 MB
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()
SILL PuppetWebWatchdog memoryCheck() free: 297 MB, require: 64 MB
VERB PuppetWebBrowser quit()
VERB PuppetWebBrowser currentState(closing)
SILL PuppetWebBrowser quit() driver.close()-ed
SILL PuppetWebBrowser quit() driver.quit()-ed
VERB PuppetWebBrowser driver(null)
SILL PuppetWebBrowser quit() this.driver = null
SILL PuppetWebBrowser clean() retryPromise: attempt 1 time for timeout 45000
SILL PuppetWebBrowser getBrowserPids()
SILL PuppetWebBrowser getBrowserPids() child: {"PPID":"38740","PID":"38745","STAT":"S ","COMM":"node"}
SILL PuppetWebBrowser getBrowserPids() child: {"PPID":"38745","PID":"38746","STAT":"S ","COMM":"/Users/lijiarui/git/wechaty/node_modules/chromedriver/lib/chromedriver/chromedriver"}
SILL PuppetWebBrowser getBrowserPids() child: {"PPID":"38740","PID":"38771","STAT":"R ","COMM":"ps"}
VERB PuppetWebBrowser clean() retryPromise() resolved
VERB PuppetWebBrowser currentState(close)
VERB PuppetWebEvent onBrowserDead() browser quit-ed

Steps to reproduce the behavior (and fixes, if any)

@lijiarui lijiarui changed the title can't run wechaty with error log Can't run wechaty with error log Oct 25, 2016
@huan
Copy link
Member

huan commented Oct 25, 2016

could you run it 3 times, and confirm whether this problem will occour every time?

because an issue has a meaning only when it can be reproduced.

@lijiarui
Copy link
Member Author

I had run it more than 10 times, I had tired deleted session .json file, change the network, close several programs to free memory, and restart my laptop...
All failed when I was at the company...

I felt so sad, so I go back home . When I just run it, it works!

I hope you can find the reason if you have time, thanks!

@huan
Copy link
Member

huan commented Oct 25, 2016

you must provide the simplest code that can reproduce the problem in order to diagnose it.

if the problem you mentioned is not reproduce-able, then I can not be helpful. sorry.

will close this issue. please feel free to re-open it if you can provide the code to reproduce the problem.

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