Important:Please file the issue follow the template, or we won't help you to solve the problem.
0. Report Issue Guide
Please run the following command and check whether the problem has been fixed:
Please search in the issue first, and make sure your problem had not been reported before
1. Versions
What is your wechaty version?
Answer: 0.29.33
What is your wechaty-puppet-macpro version?
Answer: 0.3.3
What is your node version? (run node --version)
Answer: 10.16.0
What os are you using
Answer: windows/linux 都试过
2. Describe the bug
如果我用 wechaty@next v0.29.33 和wechaty-puppet-macpro@next v0.3.3,并执行node ./index.js, 就一直报错“INFO start grpc gateway failed for reason: Error: Try to connect to server timeout., retry start in 5 seconds.”.
const { Wechaty } = require('wechaty');
const { PuppetMacpro } = require('wechaty-puppet-macpro');
const { generate } = require('qrcode-terminal');
const token = 'puppet_macpro_c76*********';
const name = 'your-bot-name'
process.env.BROLOG_LEVEL = 'silly';
console.log("process.env", process.env)
const puppet = new PuppetMacpro({
token
})
const bot = new Wechaty({
puppet,
name // login without scan qrcode at next time, it will generate xxxx.memory-card.json and save login data.
})
bot.on('scan', (qrcode) => {
generate(qrcode, {
small: true
})
}).on('login', (user) => {
console.log(`login user : ${user}`)
}).on('message', msg => {
console.log(`msg : ${msg}`)
}).start()
执行node ./index.js
4. Expected behavior
期望执行.start() 后出现登录二维码
5. Actual behavior
实际上.start()执行后,一直在报错,报错内容如下:
16:54:43 INFO Wechaty <Puppet#0<PuppetMacpro>()>(your-bot-name) start() v0.29.33 is starting...
16:54:48 INFO start grpc gateway failed for reason: Error: Try to connect to server timeout., retry start in 5 seconds.
16:54:58 INFO start grpc gateway failed for reason: Error: Try to connect to server timeout., retry start in 5 seconds.
16:55:03 INFO start grpc gateway failed for reason: Error: Failed to connect to server, state changed to 1, retry start in 5 seconds.
16:55:13 INFO start grpc gateway failed for reason: Error: Try to connect to server timeout., retry start in 5 seconds.
6. Full Output Logs
加上 BROLOG_LEVEL = 'silly' 之后的报错如如下所示:
17:49:20 SILL PUPPET_MACPRO start()
brolog.js:190
17:49:20 SILL StateSwitch <PuppetMacpro> on() is pending
brolog.js:190
17:49:20 VERB StateSwitch <PuppetMacpro> on(pending) <- (pending)
brolog.js:190
17:49:20 SILL GRPC_GATEWAY notify(getLoginUserInfo, undefined)
brolog.js:190
17:49:25 INFO start grpc gateway failed for reason: Error: Try to connect to server timeout., retry start in 5 seconds.
brolog.js:183
17:49:30 SILL PUPPET_MACPRO start()
brolog.js:190
17:49:30 SILL StateSwitch <PuppetMacpro> on() is pending
brolog.js:190
17:49:30 VERB StateSwitch <PuppetMacpro> on(pending) <- (pending)
brolog.js:190
17:49:30 SILL GRPC_GATEWAY notify(getLoginUserInfo, undefined)
brolog.js:190
17:49:35 INFO start grpc gateway failed for reason: Error: Failed to connect to server, state changed to 1, retry start in 5 seconds.
brolog.js:183
17:49:40 SILL PUPPET_MACPRO start()
brolog.js:190
17:49:40 SILL StateSwitch <PuppetMacpro> on() is pending
brolog.js:190
17:49:40 VERB StateSwitch <PuppetMacpro> on(pending) <- (pending)
brolog.js:
0. Report Issue Guide
Please run the following command and check whether the problem has been fixed:
Please search in the issue first, and make sure your problem had not been reported before
1. Versions
What is your wechaty version? Answer: 0.29.33
What is your wechaty-puppet-macpro version? Answer: 0.3.3
What is your node version? (run
node --version
) Answer: 10.16.0What os are you using Answer: windows/linux 都试过
2. Describe the bug
如果我用 wechaty@next v0.29.33 和wechaty-puppet-macpro@next v0.3.3,并执行
node ./index.js
, 就一直报错“INFO start grpc gateway failed for reason: Error: Try to connect to server timeout., retry start in 5 seconds.”.当我换成 wechaty@latest v0.28.3 和 wechaty-puppet-macpro@latest v0.2.6,并删除node_modules 重新安装,再次执行()>(testsetset) start() v0.28.3 is starting...”
node ./index.js
时,不报错了,但是卡着不动最后一段log为“INFO Wechaty <Puppet#03. To Reproduce
node ./index.js
4. Expected behavior
期望执行.start() 后出现登录二维码
5. Actual behavior
实际上.start()执行后,一直在报错,报错内容如下:
6. Full Output Logs
加上 BROLOG_LEVEL = 'silly' 之后的报错如如下所示:
7. Additional context
请问,使用哪个wechaty和wechaty-puppet-macprod的版本可以正常使用,且已经修复每天晚上自动掉线的问题?