You can ignore the next line becasue it is using for CodeSandbox
*/
require('./.code-sandbox.js')
function onScan (qrcode, status) {
if (status === ScanStatus.Waiting || status === ScanStatus.Timeout) {
require('qrcode-terminal').generate(qrcode, { small: true }) // show qrcode on console
Give a clear and concise description of what you expected to happen.
i can login it but tip 微信登录确认、二维码已失效、请重新扫码登录
5. Actual behavior
If applicable, add screenshots to help explain your problem. But do not paste log screenshots here.
微信登录确认、二维码已失效、请重新扫码登录
6. Full Output Logs
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)
We need full log instead of log screenshot or log fragments!
Show Logs
```shell
$ WECHATY_LOG=silly node yourbot.js
Question: Paste your FULL(DO NOT ONLY PROVIDE FRAGMENTS) log messages
Answer:
```
0. Report Issue Guide
Please run the following command and check whether the problem has been fixed:
Please search in FAQ List first, and make sure your problem has not been solved before.
Please search in the issue first, and make sure your problem had not been reported before
1. Versions
node --version
) Answer: v12.18.02. Describe the bug
Give a clear and concise description of what the bug is. `11:13:49 VERB Puppet setMemory() 11:13:49 VERB Wechaty initPuppetEventBridge(Puppet#0())
11:13:49 VERB Wechaty initPuppetEventBridge() puppet.on(friendship) (listenerCount:0) registering...
11:13:49 VERB Wechaty initPuppetEventBridge() puppet.on(login) (listenerCount:0) registering...
11:13:49 VERB Wechaty initPuppetEventBridge() puppet.on(logout) (listenerCount:0) registering...
11:13:49 VERB Wechaty initPuppetEventBridge() puppet.on(message) (listenerCount:0) registering...
11:13:49 VERB Wechaty initPuppetEventBridge() puppet.on(room-invite) (listenerCount:0) registering...
11:13:49 VERB Wechaty initPuppetEventBridge() puppet.on(room-join) (listenerCount:0) registering...
11:13:49 VERB Wechaty initPuppetEventBridge() puppet.on(room-leave) (listenerCount:0) registering...
11:13:49 VERB Wechaty initPuppetEventBridge() puppet.on(room-topic) (listenerCount:0) registering...
11:13:49 VERB Wechaty initPuppetEventBridge() puppet.on(scan) (listenerCount:0) registering...
11:13:49 VERB Wechaty initPuppetEventBridge() puppet.on(dirty) (listenerCount:0) registering...
11:13:49 VERB Wechaty initPuppetEventBridge() puppet.on(dong) (listenerCount:0) registering...
11:13:49 VERB Wechaty initPuppetEventBridge() puppet.on(error) (listenerCount:0) registering...
11:13:49 VERB Wechaty initPuppetEventBridge() puppet.on(heartbeat) (listenerCount:0) registering...
11:13:49 VERB Wechaty initPuppetEventBridge() puppet.on(ready) (listenerCount:0) registering...
11:13:49 VERB Wechaty initPuppetEventBridge() puppet.on(reset) (listenerCount:0) registering...
11:13:49 VERB Wechaty wechatifyUserModules(Puppet#0())
11:13:49 VERB PuppetHostie start()
11:13:49 VERB StateSwitch on(pending) <- (false)
11:13:49 VERB PuppetHostie startGrpcClient()
11:13:49 VERB PuppetHostie discoverHostieIp(puppet_donut_xxxxx)(notice i hide the token)
11:13:50 VERB PuppetHostie startGrpcStream()
11:13:50 VERB PuppetHostie onGrpcStreamEvent({type:EVENT_TYPE_SCAN(22), payload:"{"qrcode":"http://weixin.qq.com/x/g_pFzcVXMadAzWBKA9hg","status":2}"})
▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
█ ▄▄▄▄▄ █ ██▀▀▄██▄ ▄▀ █ ▄▄▄▄▄ █
█ █ █ █ ▀█ █ █▄▄ ▀▀█ █ █ █
█ █▄▄▄█ █▀ █▄▄ ▄ ▀▄▀██ █▄▄▄█ █
█▄▄▄▄▄▄▄█▄█ ▀▄█▄▀ ▀ ▀ █▄▄▄▄▄▄▄█
█ ▄██ ▄▀██▄█▄▄▀█▀▀██ █▀ ▀ █
█▄▀▄▀██▄▄ ▄█▀▄▀ ▄▀ █ ▀█▀▀██▀ █
█▄▄ █ ▄ █▀▀▄▀ ▀▀▀▄██▄█▀▀▀▀█ ▀█
█▀▄ █▀▄▀█ █ ▄█▀ ▀ █▀ ▀█ ▀█▄▀ █
█▀█▄▀▀█▄██▀▀█▄█▄▀▀█▀█▄ ▀ ▀▄█ ▀█
████ ▄▄ ▄ █▀█▀ █▀▄▀▄▄ ▀▀▄▄▀ █
█▄▄█▄▄█▄█▀ ▄▄▀█▀▄▀ █ ▄▄▄ ▄██ █
█ ▄▄▄▄▄ █▀ █ ▄██ ▀█ █▄█ ▄█▄█
█ █ █ █▄▀██▄▀▀▄ ▄▀ ▄ ▄▄▄█▀█ █
█ █▄▄▄█ █▀▄ █▀▄ ▄▄▀▀▄ ▀▀██ ▄ █
█▄▄▄▄▄▄▄█▄▄▄▄▄▄▄█▄██▄▄▄█▄▄▄█▄██
11:13:50 VERB StateSwitch on(true) <- (pending)
11:13:50 VERB Wechaty on(heartbeat, listener) registering... listenerCount: 0
11:13:50 VERB StateSwitch on(true) <- (pending)
`
3. To Reproduce
This part is very important: if you can not provide any reproduce steps, then the problem will be very hard to be recognized.
Steps to reproduce the behavior:
/**
function onScan (qrcode, status) { if (status === ScanStatus.Waiting || status === ScanStatus.Timeout) { require('qrcode-terminal').generate(qrcode, { small: true }) // show qrcode on console
} else { log.info('StarterBot', 'onScan: %s(%s)', ScanStatus[status], status) } }
function onLogin (user) { log.info('StarterBot', '%s login', user) }
function onLogout (user) { log.info('StarterBot', '%s logout', user) }
async function onMessage (msg) { log.info('StarterBot', msg.toString())
if (msg.text() === 'ding') { await msg.say('dong') } } const token = 'puppet_donut_xxxx'// hide real token
const bot = new Wechaty({ puppet: 'wechaty-puppet-donut', puppetOptions: { token, } });
bot.on('scan', onScan) bot.on('login', onLogin) bot.on('logout', onLogout) bot.on('message', onMessage)
bot.start() .then(() => log.info('StarterBot', 'Starter Bot Started.')) .catch(e => log.error('StarterBot', e)) ` 4.npm run start
4. Expected behavior
Give a clear and concise description of what you expected to happen. i can login it but tip 微信登录确认、二维码已失效、请重新扫码登录
5. Actual behavior
If applicable, add screenshots to help explain your problem. But do not paste log screenshots here. 微信登录确认、二维码已失效、请重新扫码登录
6. Full Output Logs
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)We need full log instead of log screenshot or log fragments!
Show Logs
```shell $ WECHATY_LOG=silly node yourbot.js Question: Paste your FULL(DO NOT ONLY PROVIDE FRAGMENTS) log messages Answer: ```7. Additional context
Add any other context about the problem here.
[bug]