juzibot / wechaty-puppet-macpro

One puppet based on Mac WeChat for Wechaty.
Apache License 2.0
38 stars 10 forks source link

扫码后,没有登录 #30

Closed woshidamaomao closed 4 years ago

woshidamaomao commented 4 years ago

1. Versions

2. Describe the bug

使用新注册的微信,扫码后,确认登录后,无反应,on("login"), on("message")的回调均未触发,手机微信没有显示“已登录”

3. To Reproduce

The script file. ` const { Wechaty } = require('wechaty'); const { PuppetMacpro } = require('wechaty-puppet-macpro'); const { generate } = require('qrcode-terminal');

const token = '*****不让看不让看';

const puppet = new PuppetMacpro({ token, })

const bot = new Wechaty({ puppet });

bot.on('scan', (qrcode, status) => { require('qrcode-terminal').generate(qrcode, { small: true }); const qrcodeImageUrl = [ 'https://api.qrserver.com/v1/create-qr-code/?data=', encodeURIComponent(qrcode), ].join(''); console.log('StarterBot', '%s(%s) - %s', status, qrcodeImageUrl) })

bot.on('message', msg => { console.log(msg : ${msg}) })

bot.start().then(res => { console.log("res", res) }).catch(err => { console.log('starterr', err); })

bot.on('login', function onLogin(user) { console.log("用户登录:", user); });

bot.on('logout', function onLogout(user) { console.log("用户退出回调:", user); });

bot.on('error', function errorLog(error) { console.log("on-error", error); });

`

4. Expected behavior

期望扫码后,可以正常登录,并且可以在on("message")里收到别人发的消息。

5. Actual behavior

实际上并没有任何反应,只有登录回调触发了,登录回调的res 打印出来是个undefind

6. Full Output Logs

image

[bug]

su-chang commented 4 years ago

Thanks for ur issue, let's try it again.

woshidamaomao commented 4 years ago

Thanks for ur issue, let's try it again.

请问该项目,还在维护吗?使用测试token,执行bot.login() 后 ,scan 二维码的回调没有被调用。

su-chang commented 4 years ago

请将 macpro 更新到最新版本,然后再试一下,如果仍有问题,欢迎反馈。

woshidamaomao commented 4 years ago

请将 macpro 更新到最新版本,然后再试一下,如果仍有问题,欢迎反馈。

我使用的是 + wechaty-puppet-macpro@0.1.26

woshidamaomao commented 4 years ago

报错信息 ERR GRPC_GATEWAY Error: 14 UNAVAILABLE: failed to connect to all addresse

su-chang commented 4 years ago

报错信息 ERR GRPC_GATEWAY Error: 14 UNAVAILABLE: failed to connect to all addresse

请描述当前状态,且提供详细信息,以便于我们来定位问题。

woshidamaomao commented 4 years ago

报错信息 ERR GRPC_GATEWAY Error: 14 UNAVAILABLE: failed to connect to all addresse

请描述当前状态,且提供详细信息,以便于我们来定位问题。

版本信息
描述

image

su-chang commented 4 years ago

能否成功获取到二维码?如果不能,可能是本地网络环境导致的。