wechaty / puppet-wechat

Wechaty Puppet Provider for WeChat
https://www.npmjs.com/package/wechaty-puppet-wechat
Apache License 2.0
408 stars 68 forks source link

PuppetWeChatBridge start() exception: TimeoutError: Navigation timeout of 30000 ms exceeded #135

Open fangjiyuan opened 3 years ago

fangjiyuan commented 3 years ago

Important:Please file the issue follow the template, or we won't be able to help you to solve the problem.

1. Versions

What is your wechaty version?

Answer: Starting Docker Container for Wechaty v0.60.10 with Node.js v12.22.1

Which puppet are you using for wechaty? (puppeteer/padlocal/service...)

wechaty-puppet-wechat

What is your node version? (run node --version)

Node.js v12.22.1

What os are you using

CentOS 7.9.2009

2. Describe the bug

用docker运行wechaty启动wechaty-puppet-wechat服务时,puppeteer超时。 我用的docker启动命令为:

docker pull wechaty/wechaty:latest

export WECHATY_LOG="verbose" export WECHATY_PUPPET="wechaty-puppet-wechat" export WECHATY_PUPPET_SERVER_PORT="8080" export WECHATY_TOKEN="python-wechaty-{uuid}"

docker run -ti \ --name wechaty_puppet_service_token_gateway \ --rm \ -e WECHATY_LOG \ -e WECHATY_PUPPET \ -e WECHATY_PUPPET_SERVER_PORT \ -e WECHATY_TOKEN \ -p "$WECHATY_PUPPET_SERVER_PORT:$WECHATY_PUPPET_SERVER_PORT" \ wechaty/wechaty:latest

6. Full Output Logs

16:15:45 VERB PuppetWeChatBridge initBrowser() with options={"args":["--audio-output-channels=0","--disable-default-apps","--disable-translate","--disable-gpu","--disable-setuid-sandbox","--disable-sync","--hide-scrollbars","--mute-audio","--no-sandbox"],"headless":true} 16:15:45 VERB PuppetWeChatBridge initBrowser() version: HeadlessChrome/90.0.4403.0 16:15:45 VERB PuppetWeChatBridge start() initBrowser() done 16:15:45 VERB PuppetWeChatBridge initPage() 16:15:45 VERB MemoryCard get(PUPPET_WECHAT) 16:15:45 VERB PuppetWeChatBridge cookieDomain(undefined) 16:15:45 VERB PuppetWeChatBridge initPage() before page.goto(url) 16:16:15 ERR PuppetWeChatBridge start() exception: TimeoutError: Navigation timeout of 30000 ms exceeded 16:16:15 VERB StateSwitch off(true) <- (false) 16:16:15 ERR PuppetWeChat initBridge() exception: Navigation timeout of 30000 ms exceeded 16:16:15 VERB PuppetWeChatBridge stop() 16:16:15 VERB StateSwitch off(pending) <- (true) 16:16:15 WARN PuppetWeChatBridge stop() page.close() exception: Error: Protocol error: Connection closed. Most likely the page has been closed. 16:16:15 VERB StateSwitch off(true) <- (pending) 16:16:15 ERR PuppetWeChat start() exception: TimeoutError: Navigation timeout of 30000 ms exceeded 16:16:15 VERB PuppetWeChat stop() 16:16:15 VERB StateSwitch off(pending) <- (false) 16:16:15 VERB PuppetWeChat stop() make watchdog sleep before do stop 16:16:15 VERB PuppetWeChatBridge stop() 16:16:15 VERB StateSwitch off(pending) <- (true) 16:16:15 WARN PuppetWeChatBridge stop() page.close() exception: Error: Protocol error: Connection closed. Most likely the page has been closed. 16:16:15 VERB StateSwitch off(true) <- (pending) 16:16:15 VERB StateSwitch off(true) <- (pending) 16:16:15 ERR PuppetServiceImpl grpcError() start() rejection: Navigation timeout of 30000 ms exceeded

Set env WECHATY_LOG=silly in order to set log level to silly, then we can get the full log (If you dosen't set log env, log level is info as default, we cannot get the full log)