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

启动后卡住问题 #566

Closed
jinliming2 opened this issue Jun 6, 2017 · 3 comments
Closed

启动后卡住问题 #566

jinliming2 opened this issue Jun 6, 2017 · 3 comments

Comments

@jinliming2
Copy link

16:10:03 SILL Brolog WECHATY_LOG set level to silly
16:10:03 VERB Config registering process.on("unhandledRejection")
16:10:06 SILL StateSwitch constructor(Wechaty, standby)
16:10:06 VERB Wechaty contructor()
16:10:06 VERB Wechaty addListener(error, function)
16:10:06 VERB Wechaty addListener(login, function)
16:10:06 VERB Wechaty addListener(logout, function)
16:10:06 VERB Wechaty addListener(scan, function)
16:10:06 VERB Wechaty addListener(message, function)
16:10:06 VERB Wechaty addListener(friend, function)
16:10:06 VERB Wechaty addListener(room-topic, function)
16:10:06 SILL Wechaty version() form development environment is not availble: ENOENT: no such file or directory, stat '/home/knownsec/Desktop/ks-bot/server/node_modules/wechaty/dist/.git'
16:10:06 INFO Wechaty v0.8.46 initializing...
16:10:06 VERB Wechaty puppet: web
16:10:06 VERB Wechaty head: chrome
16:10:06 VERB Wechaty profile: ks-bot.wechaty.json
16:10:06 VERB Wechaty uuid: 517660bb-9d9e-4c65-a66e-1ac0cbec4c23
16:10:06 SILL StateSwitch Wechaty:current() is standby
16:10:06 VERB StateSwitch Wechaty:target(ready) <- (standby)
16:10:06 VERB StateSwitch Wechaty:current(ready,false) <- (standby,true)
16:10:06 SILL StateSwitch constructor(Puppet, dead)
16:10:06 VERB Config puppetInstance(PuppetWeb)
16:10:06 VERB PuppetWeb init() with head:chrome, profile:ks-bot.wechaty.json
16:10:06 VERB StateSwitch Puppet:target(live) <- (dead)
16:10:06 VERB StateSwitch Puppet:current(live,false) <- (dead,true)
16:10:06 SILL UtilLib getPort(18788)
16:10:06 SILL UtilLib getPort(18788) return: 19120
16:10:06 VERB PuppetWeb init() getPort 19120
16:10:06 VERB PuppetWeb initServer()
16:10:06 SILL StateSwitch Puppet:target() is live
16:10:06 VERB PuppetWebServer init() on port 19120
16:10:06 VERB PuppetWebServer createHttpsServer() listen on port 19120
16:10:06 VERB PuppetWeb initServer() done
16:10:06 VERB PuppetWeb initBrowser()
16:10:06 SILL StateSwitch constructor(Browser, close)
16:10:06 VERB PuppetWebBrowser constructor() with head(chrome) sessionFile(ks-bot.wechaty.json)
16:10:06 VERB PuppetWebBrowserDriver constructor(chrome)
16:10:06 VERB PuppetWebBrowserCookie constructor(BrowserDriver, ks-bot.wechaty.json)
16:10:06 SILL StateSwitch Puppet:target() is live
16:10:06 VERB PuppetWebBrowser init()
16:10:06 SILL StateSwitch Browser:current() is close
16:10:06 VERB StateSwitch Browser:target(open) <- (close)
16:10:06 VERB StateSwitch Browser:current(open,false) <- (close,true)
16:10:06 VERB PuppetWebBrowserCookie hostname()
16:10:06 VERB PuppetWebBrowserCookie getCookiesFromFile() from ks-bot.wechaty.json
16:10:06 SILL PuppetWebBrowserCookie hostname() got wx.qq.com
16:10:06 VERB PuppetWebBrowserDriver init() for head: chrome
16:10:06 VERB PuppetWebBrowserDriver initChromeDriver()
16:10:06 VERB PuppetWebBrowserDriver initChromeDriver() new Builder()
16:10:06 VERB PuppetWebBrowserDriver initChromeDriver() new Builder() done
16:10:06 VERB PuppetWebBrowserDriver valid()
16:10:06 VERB PuppetWebBrowserDriver valid() getSession()
16:10:09 VERB PuppetWebBrowserDriver valid() getSession() then() done
16:10:09 VERB PuppetWebBrowserDriver valid() getSession() then() watchdog timer exist, will be cleared
16:10:09 VERB PuppetWebBrowserDriver watchdogTimer = null after set null
16:10:09 VERB PuppetWebBrowserDriver valid() driver.getSession() done()
16:10:09 VERB PuppetWebBrowserDriver valid() driver.executeScript() done
16:10:09 SILL PuppetWebBrowserDriver valid() driver ok
16:10:09 VERB PuppetWebBrowserDriver initChromeDriver() valid() done: true
16:10:09 SILL PuppetWebBrowserDriver initChromeDriver() success
16:10:09 VERB PuppetWebBrowser init() driver.init() done
16:10:09 VERB PuppetWebBrowser open(https://wx.qq.com/zh_CN/htmledition/v2/images/webwxgeticon.jpg)
16:10:09 SILL PuppetWebBrowser open() begin for ttl:1
16:10:10 SILL PuppetWebBrowser open() end for ttl:1
16:10:10 VERB PuppetWebBrowserCookie load() from ks-bot.wechaty.json
16:10:10 VERB PuppetWebBrowserCookie getCookiesFromFile() from ks-bot.wechaty.json
16:10:10 SILL PuppetWebBrowserCookie addCookies({"domain":".wx.qq.com","expiry":1496779620,"httpOnly":false,"name":"wxsid","path":"/","secure":false,"value":"ZuALHWM1lAdhTzsS"})
16:10:10 SILL PuppetWebBrowserCookie addCookies({"domain":".wx.qq.com","expiry":1496995620,"httpOnly":false,"name":"wxuin","path":"/","secure":false,"value":"1474412301"})
16:10:10 SILL PuppetWebBrowserCookie addCookies({"domain":".wx.qq.com","expiry":1496779620,"httpOnly":false,"name":"wxpluginkey","path":"/","secure":false,"value":"1496725201"})
16:10:10 SILL PuppetWebBrowserCookie addCookies({"domain":".wx.qq.com","httpOnly":false,"name":"webwx_auth_ticket","path":"/","secure":false,"value":"CIsBEMT3l/wDGoABkyJOr6uFvqXYwNz5jHU4Eo/0QAyUheiKJI5WqoUvuc/FGxpCtmc+WXF0jUkxJFQw5ArAVTmtOMyGOFqCz50UV79LDg3xZW7NFcaduKS2pgkdjn5DfFROtGtLpP8ujGwl2kTlCS4cvQVNbqxluE0w1uQORTJLyXRGgXJS8fLuo+A="})
16:10:10 SILL PuppetWebBrowserCookie addCookies({"domain":".qq.com","httpOnly":false,"name":"pgv_pvi","path":"/","secure":false,"value":"3468276736"})
16:10:10 SILL PuppetWebBrowserCookie addCookies({"domain":".qq.com","httpOnly":false,"name":"pgv_si","path":"/","secure":false,"value":"s6676473856"})
16:10:10 SILL PuppetWebBrowserCookie addCookies({"domain":".wx.qq.com","httpOnly":false,"name":"login_frequency","path":"/","secure":false,"value":"2"})
16:10:10 SILL PuppetWebBrowserCookie addCookies({"domain":".wx.qq.com","httpOnly":false,"name":"webwxuvid","path":"/","secure":false,"value":"332032b1907b735aab050f72afd4834ef1776c97e52e4b2434fa0102eaa641b723ac9b3621634abf3be1642560fb1763"})
16:10:10 SILL PuppetWebBrowserCookie addCookies({"domain":".wx.qq.com","httpOnly":false,"name":"last_wxuin","path":"/","secure":false,"value":"1474412301"})
16:10:10 SILL PuppetWebBrowserCookie addCookies({"domain":".wx.qq.com","httpOnly":false,"name":"wxloadtime","path":"/","secure":false,"value":"1496730470_expired"})
16:10:10 SILL PuppetWebBrowserCookie addCookies({"domain":".qq.com","expiry":1496779620,"httpOnly":false,"name":"webwx_data_ticket","path":"/","secure":false,"value":"gSfeWGq8jbbPf60l+xK8i3e1"})
16:10:10 SILL PuppetWebBrowserCookie addCookies({"domain":".wx.qq.com","expiry":1496779618,"httpOnly":false,"name":"mm_lang","path":"/","secure":false,"value":"en_US"})
16:10:10 VERB PuppetWebBrowserCookie loaded session(12 cookies) from ks-bot.wechaty.json
16:10:10 VERB PuppetWebBrowser open(https://wx.qq.com)
16:10:10 SILL PuppetWebBrowser open() begin for ttl:1
16:10:12 SILL PuppetWebBrowser open() end for ttl:1
16:10:12 SILL StateSwitch Browser:target() is open
16:10:12 VERB StateSwitch Browser:current(open,true) <- (open,false)
16:10:12 VERB PuppetWeb initBrowser() done
16:10:12 VERB PuppetWeb initBridge()
16:10:12 VERB PuppetWebBridge new Bridge({puppet: PuppetWeb, port: 19120})
16:10:12 SILL StateSwitch Puppet:target() is live
16:10:12 VERB PuppetWebBridge init()
16:10:12 VERB PuppetWebBridge inject()
16:10:12 VERB PuppetWebBridge getInjectio()
16:10:12 SILL PuppetWebBridge execute()
16:10:12 SILL PuppetWebBrowser Browser.execute("injectioReturnValue = /** * * Wechaty - Wechat for Bot, and human who talk to  ... ")
16:10:12 SILL StateSwitch Browser:target() is open
16:10:12 SILL StateSwitch Browser:current() is open
16:10:12 SILL PuppetWebBridge inject() eval(Wechaty) return code[200] message[WechatyBro Inject Done] port[19120]
16:10:12 VERB PuppetWebBridge proxyWechaty(init, )
16:10:12 SILL PuppetWebBridge execute()
16:10:12 SILL PuppetWebBrowser Browser.execute("return typeof WechatyBro === "undefined"")
16:10:12 SILL StateSwitch Browser:target() is open
16:10:12 SILL StateSwitch Browser:current() is open
16:10:13 SILL PuppetWebBridge execute()
16:10:13 SILL PuppetWebBrowser Browser.execute(" const callback = arguments[arguments.length - 1] const isAsync = (typeof  ... ")
16:10:13 SILL StateSwitch Browser:target() is open
16:10:13 SILL StateSwitch Browser:current() is open
16:10:13 SILL PuppetWebBridge inject() Wechaty.init() return code[200] message[WechatyBro Init Succ on port: 19120] port[19120]
16:10:13 VERB PuppetWebBridge ding(inject())
16:10:13 VERB PuppetWebBridge proxyWechaty(ding, inject())
16:10:13 SILL PuppetWebBridge execute()
16:10:13 SILL PuppetWebBrowser Browser.execute("return typeof WechatyBro === "undefined"")
16:10:13 SILL StateSwitch Browser:target() is open
16:10:13 SILL StateSwitch Browser:current() is open
16:10:13 SILL PuppetWebBridge execute()
16:10:13 SILL PuppetWebBrowser Browser.execute(" const callback = arguments[arguments.length - 1] const isAsync = (typeof  ... ")
16:10:13 SILL StateSwitch Browser:target() is open
16:10:13 SILL StateSwitch Browser:current() is open
16:10:13 SILL PuppetWebBridge inject() ding success
16:10:13 VERB PuppetWeb initBridge() done
16:10:13 VERB StateSwitch Puppet:current(live,true) <- (live,false)
16:10:13 SILL PuppetWebWatchdog onFeed: 120000, HEARTBEAT[inited]
16:10:13 SILL StateSwitch Puppet:target() is live
16:10:13 SILL StateSwitch Puppet:inprocess() is false
16:10:13 VERB PuppetWebWatchdog clearWatchDogTimer() nothing to clear
16:10:13 SILL PuppetWebWatchdog setWatchDogTimer(120000, HEARTBEAT:[inited])
16:10:13 SILL PuppetWebWatchdog monitorScan(HEARTBEAT)
16:10:13 SILL PuppetWebWatchdog autoSaveSession()
16:10:13 VERB PuppetWebWatchdog autoSaveSession() skiped as no this.userId
16:10:13 SILL PuppetWebWatchdog memoryCheck() free: 148 MB, require: 4 MB
16:10:13 VERB PuppetWeb init() done
16:10:13 VERB StateSwitch Wechaty:current(ready,true) <- (ready,false)

经常就卡在这一句StateSwitch上,就没有响应了,只能Ctrl+C后重启再试,或者过一段时间会自动重启。重启后也有一定几率卡在这。。。

严重时连续重启多次都卡在这。

弹出的浏览器页面已经加载完成了,可以正常操作。(但是地址栏的https是灰色,没有变红。如果wechaty启动成功,https会变红)

@huan
Copy link
Member

huan commented Jun 10, 2017

Need More Information

Sorry, you did not follow the ISSUE Template, and there's not enough information about your problem.

In order to help us to find the problem out, you should provide all the detail information about the issue. Please make sure you are following the ISSUE Template, answer all the question, and the more important: provide the steps to reproduce the problem.

@jinliming2
Copy link
Author

Provide Your Network Information

  1. Where is the location of your server? 成都
  2. Which cloud platform(AliYun/Qcloud/DigitalOcean/etc) are you using? 成都电信,自己的电脑,Ubuntu 17.04,Chromium(apt-get安装)

Run npm run doctor or wechaty run doctor(for docker user), paste output here

Expected behavior

预期应该在启动后,弹出浏览器窗口,并自动登录,然后地址栏的https标志变红,然后wechaty控制台输出登录成功(login事件输出的)。

Actual behavior

有正常过,但是也经常出现无法正常启动的情况。

在启动后,弹出浏览器窗口,并自动登录,然后地址栏的https不变红,wechaty控制台不输出登录成功。等待较长时间后(大概就是120s),wechaty自动重启,重试。

或是手动ctrl-c后重试。

重试多次有一定几率恢复正常。

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

启动方式没有什么区别,应该是几率事件,会持续一段时间不能正常使用。

Paste the full output logs here with WECHATY_LOG=silly set

内容上面贴过了

@huan
Copy link
Member

huan commented Aug 26, 2017

Sorry, I'll close this issue because I could not reproduce the problem without enough information.

I'd like to suggest you to:

  1. use docker to run wechaty, which is more stable.
  2. use chrome browser instead of chromium to see if there has any luck for you.

Have a good weekend!

@huan huan closed this as completed Aug 26, 2017
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