juzibot / donut-tester

40 stars 4 forks source link

微信登录确认、二维码已失效、请重新扫码登录 #64

Open smwsk opened 3 years ago

smwsk commented 3 years ago

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

0. Report Issue Guide

  1. Please run the following command and check whether the problem has been fixed:

    rm -rf package-lock.json
    rm -rf node_modules
    npm install
  2. Please search in FAQ List first, and make sure your problem has not been solved before.

  3. Please search in the issue first, and make sure your problem had not been reported before

1. Versions

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:

  1. git clone https://github.com/wechaty/wechaty-getting-started
  2. change examples/ding-dong-bot.js
  3. change content is `/**
    • Wechaty - WeChat Bot SDK for Personal Account, Powered by TypeScript, Docker, and 💖

/**

function onScan (qrcode, status) { if (status === ScanStatus.Waiting || status === ScanStatus.Timeout) { require('qrcode-terminal').generate(qrcode, { small: true }) // show qrcode on console

const qrcodeImageUrl = [
  'https://wechaty.js.org/qrcode/',
  encodeURIComponent(qrcode),
].join('')

log.info('StarterBot', 'onScan: %s(%s) - %s', ScanStatus[status], status, qrcodeImageUrl)

} 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]