wechaty / wechaty-puppet-padpro

Apache License 2.0
238 stars 64 forks source link

扫码登录后提示sendShort receive unknown package,登录不上微信 #201

Closed hzqij closed 5 years ago

hzqij commented 5 years ago

重要:请不要删除模板自行填写,所有不按照模板填写的issue,我们将不会处理。

0. 发 Issue 指南

  1. 请运行下面的命令,看问题是否可以被解决:

    rm -rf package-lock.json
    rm -rf node_modules
    npm install
  2. 请在 FAQ 清单 看是否已有解决办法。

  3. 请先在issue 中搜关键信息,确认你要发的内容和之前的issue 不重复。

1. 提供你的包版本信息

2. Bug 描述

手机扫码后无法登录

3. 复现的步骤 (或者解决的步骤)

就是运行的wechaty-getting-started/examples/third-party/puppet-padpro,代码如下:

const { Wechaty } = require('wechaty') const { PuppetPadpro } = require('wechaty-puppet-padpro')

// Please change the token below to the one that you are given. const WECHATY_PUPPET_PADPRO_TOKEN = 'puppet_padpro_34mchfh5x9lp2y06'

const puppet = new PuppetPadpro({ token: WECHATY_PUPPET_PADPRO_TOKEN, })

const bot = new Wechaty({ puppet, })

// 运行 wechaty bot .on('scan', (qrcode, status) => { console.log(Scan QR Code to login: ${status} https://api.qrserver.com/v1/create-qr-code/?data=${encodeURIComponent(qrcode)}) }) .on('login', user => { console.log(User ${user} login.) }) .on('message', message => { console.log(Message: ${message}) }) .start()

4. 期待程序运行的结果

能够成功登录

5. 程序实际运行的结果

提示错误:sendShort receive unknown package: [90] 5a06fffffff3000000000000000000008b0100000000 Z�����]

6. 完整的日志信息:

通过WECHATY_LOG=silly设定环境变量,将设置log 等级为 silly,获取最详细的日志信息(默认log 等级为 info) 请提供完整的日志信息(不要只提供部分的日志截图,请复制粘贴日志内容!)

```shell 16:38:15 SILL Config WECHATY_LOG set level to silly 16:38:15 INFO Config registering process.on("unhandledRejection") for development/debug 16:38:15 VERB Config constructor() 16:38:15 VERB Puppet constructor({"timeout":240,"token":"puppet_padpro_34mchfh5x9lp2y06"}) #0 16:38:15 VERB StateSwitch constructor(name=PuppetPadpro) 16:38:15 VERB MemoryCard constructor(undefined) 16:38:15 VERB MemoryCard getStorage() for storage type: N/A 16:38:15 VERB MemoryCard load() from storage: N/A 16:38:15 VERB MemoryCard load() no storage 16:38:15 VERB Puppet constructor() watchdog timeout set to 240 seconds 16:38:15 VERB HotImport callerResolve(., /root/wechaty-getting-started/examples/third-party/puppet-padpro/node_modules/wechaty-puppet/dist/src/puppet.js) 16:38:15 SILL HotImport callerResolve() callsites() file=/root/wechaty-getting-started/examples/third-party/puppet-padpro/node_modules/hot-import/dist/src/hot-import.js, type=Object 16:38:15 SILL HotImport callerResolve() callsites() file=/root/wechaty-getting-started/examples/third-party/puppet-padpro/node_modules/wechaty-puppet/dist/src/puppet.js, type=null 16:38:15 SILL HotImport callerResolve() callsites() file=/root/wechaty-getting-started/examples/third-party/puppet-padpro/node_modules/wechaty-puppet-padpro/dist/src/puppet-padpro.js, type=null 16:38:15 SILL HotImport callerResolve() callerFile=/root/wechaty-getting-started/examples/third-party/puppet-padpro/node_modules/wechaty-puppet-padpro/dist/src/puppet-padpro.js 16:38:15 VERB Puppet constructor() childClassPath=/root/wechaty-getting-started/examples/third-party/puppet-padpro/node_modules/wechaty-puppet-padpro/dist/src 16:38:15 SILL Accessory #0 constructor() 16:38:15 VERB Wechaty contructor() 16:38:15 VERB StateSwitch constructor(name=Wechaty) 16:38:15 VERB StateSwitch constructor(name=WechatyReady) 16:38:15 VERB Wechaty on(scan, function) registered 16:38:15 VERB Wechaty onFunction(scan) 16:38:15 VERB Wechaty on(login, function) registered 16:38:15 VERB Wechaty onFunction(login) 16:38:15 VERB Wechaty on(message, function) registered 16:38:15 VERB Wechaty onFunction(message) 16:38:15 SILL Wechaty version() form development environment is not availble: ENOENT: no such file or directory, stat '/root/wechaty-getting-started/examples/third-party/puppet-padpro/node_modules/wechaty/dist/.git' 16:38:15 INFO Wechaty ()/PuppetPadpro#0> start() v0.26.1 is starting... 16:38:15 VERB Wechaty puppet: Puppet#0()/PuppetPadpro#0 16:38:15 VERB Wechaty profile: undefined 16:38:15 VERB Wechaty id: ck025ixt70000hrq4gz7u1u9h 16:38:15 SILL StateSwitch on() is false 16:38:15 SILL StateSwitch off() is true 16:38:15 VERB StateSwitch off(true) <- (true) 16:38:15 SILL StateSwitch on() is false 16:38:15 VERB StateSwitch on(pending) <- (false) 16:38:15 VERB MemoryCard constructor(undefined) 16:38:15 VERB MemoryCard getStorage() for storage type: N/A 16:38:15 VERB MemoryCard load() from storage: N/A 16:38:15 VERB MemoryCard load() no storage 16:38:15 VERB Puppet constructor() memory.load() done 16:38:15 VERB Wechaty initPuppet() Puppet#0()/PuppetPadpro#0 16:38:15 VERB MemoryCard multiplex(puppet) 16:38:15 VERB MemoryCard static multiplex(MemoryCard<>, puppet) 16:38:15 VERB MemoryCard constructor({"multiplex":{"name":"puppet","parent":{"payload":{},"multiplexNameList":[]}}}) 16:38:15 VERB PuppetManager resolve({puppet: Puppet#0()/PuppetPadpro#0, puppetOptions: undefined}) 16:38:15 VERB PuppetManager resolveInstance(Puppet#0()/PuppetPadpro#0) 16:38:15 VERB Puppet setMemory() 16:38:15 VERB Wechaty initPuppetEventBridge(Puppet#0()/PuppetPadpro#0) 16:38:15 VERB Wechaty initPuppetEventBridge() puppet.on(friendship) registered 16:38:15 VERB Wechaty initPuppetEventBridge() puppet.on(login) registered 16:38:15 VERB Wechaty initPuppetEventBridge() puppet.on(logout) registered 16:38:15 VERB Wechaty initPuppetEventBridge() puppet.on(message) registered 16:38:15 VERB Wechaty initPuppetEventBridge() puppet.on(room-invite) registered 16:38:15 VERB Wechaty initPuppetEventBridge() puppet.on(room-join) registered 16:38:15 VERB Wechaty initPuppetEventBridge() puppet.on(room-leave) registered 16:38:15 VERB Wechaty initPuppetEventBridge() puppet.on(room-topic) registered 16:38:15 VERB Wechaty initPuppetEventBridge() puppet.on(scan) registered 16:38:15 VERB Wechaty initPuppetEventBridge() puppet.on(dong) registered 16:38:15 VERB Wechaty initPuppetEventBridge() puppet.on(error) registered 16:38:15 VERB Wechaty initPuppetEventBridge() puppet.on(ready) registered 16:38:15 VERB Wechaty initPuppetEventBridge() puppet.on(reset) registered 16:38:15 VERB Wechaty initPuppetEventBridge() puppet.on(watchdog) registered 16:38:15 VERB Wechaty initAccessory(Puppet#0()/PuppetPadpro#0) 16:38:15 SILL Accessory static set wechaty = "Wechaty#ck025ixt70000hrq4gz7u1u9h()/PuppetPadpro#0>()" 16:38:15 SILL Accessory static set wechaty = "Wechaty#ck025ixt70000hrq4gz7u1u9h()/PuppetPadpro#0>()" 16:38:15 SILL Accessory static set wechaty = "Wechaty#ck025ixt70000hrq4gz7u1u9h()/PuppetPadpro#0>()" 16:38:15 SILL Accessory static set wechaty = "Wechaty#ck025ixt70000hrq4gz7u1u9h()/PuppetPadpro#0>()" 16:38:15 SILL Accessory static set wechaty = "Wechaty#ck025ixt70000hrq4gz7u1u9h()/PuppetPadpro#0>()" 16:38:15 SILL Accessory static set wechaty = "Wechaty#ck025ixt70000hrq4gz7u1u9h()/PuppetPadpro#0>()" 16:38:15 SILL Accessory static set puppet = "Puppet#0()/PuppetPadpro#0" 16:38:15 SILL Accessory static set puppet = "Puppet#0()/PuppetPadpro#0" 16:38:15 SILL Accessory static set puppet = "Puppet#0()/PuppetPadpro#0" 16:38:15 SILL Accessory static set puppet = "Puppet#0()/PuppetPadpro#0" 16:38:15 SILL Accessory static set puppet = "Puppet#0()/PuppetPadpro#0" 16:38:15 SILL Accessory static set puppet = "Puppet#0()/PuppetPadpro#0" 16:38:15 SILL Accessory set puppet = "Puppet#0()/PuppetPadpro#0" 16:38:15 SILL StateSwitch on() is false 16:38:15 SILL StateSwitch on() is false 16:38:15 VERB StateSwitch on(pending) <- (false) 16:38:15 INFO WechatGateway init(puppet_padpro_34mchfh5x9lp2y06, padpro.botorange.com:6666, undefined) 16:38:15 SILL StateSwitch off() is false 16:38:16 SILL StateSwitch on() is pending 16:38:16 VERB StateSwitch on(true) <- (pending) 16:38:16 VERB Wechaty on(heartbeat, function) registered 16:38:16 VERB Wechaty onFunction(heartbeat) 16:38:16 SILL StateSwitch on() is pending 16:38:16 VERB StateSwitch on(true) <- (pending) 16:38:16 INFO WechatGateway initLongSocket() connected to wechat long host server: long.weixin.qq.com. 16:38:16 SILL Wechaty memoryCheck() free: 536 MB, require: 4 MB Scan QR Code to login: 0 https://api.qrserver.com/v1/create-qr-code/?data=http%3A%2F%2Fweixin.qq.com%2Fx%2FQYaxASLc3fHR_ixzE3le 16:38:47 SILL Wechaty memoryCheck() free: 512 MB, require: 4 MB 16:39:17 SILL Wechaty memoryCheck() free: 548 MB, require: 4 MB 16:39:47 SILL Wechaty memoryCheck() free: 547 MB, require: 4 MB Scan QR Code to login: 1 https://api.qrserver.com/v1/create-qr-code/?data=http%3A%2F%2Fweixin.qq.com%2Fx%2FQYaxASLc3fHR_ixzE3le Scan QR Code to login: 2 https://api.qrserver.com/v1/create-qr-code/?data=http%3A%2F%2Fweixin.qq.com%2Fx%2FQYaxASLc3fHR_ixzE3le 16:40:02 INFO PadproGrpc GrpcQRCodeLogin(wxid_wvcqbzp6lm3o21, extdevnewpwd_CiNBNk9POHBNOXZhZ1ZXcFZJWXFId0UtNWpAcXJ0aWNrZXRfMBJAU2xYR2gzYk5QeE9wR3B5S0E5bkt4UG92M2J2djBZQnROX0tEVl9Kc21DWFc3YmRjRlFaTXAwRlN1OTFwS1RTMRoYZ1NmcTZHUFpQUHNEUTgzaU1KSzdmd1pj) 16:40:03 INFO WechatGateway initLongSocket() connected to wechat long host server: 163.177.81.141. 16:40:03 INFO CacheManager init() 16:40:03 WARN sendShort receive unknown package: [90] 5a06fffffff3000000000000000000008b0100000000 Z�����] 16:40:03 ERR WechatGateway Error happened when call api: GrpcNewInit, params: undefined undefined 16:40:03 WARN Error happened when calling GrpcNewInit: TypeError: Cannot read property 'forEach' of null at PadproManager. (/root/wechaty-getting-started/examples/third-party/puppet-padpro/node_modules/wechaty-puppet-padpro/dist/src/manager/padpro-manager.js:379:22) at Generator.next () at /root/wechaty-getting-started/examples/third-party/puppet-padpro/node_modules/wechaty-puppet-padpro/dist/src/manager/padpro-manager.js:7:71 at new Promise () at __awaiter (/root/wechaty-getting-started/examples/third-party/puppet-padpro/node_modules/wechaty-puppet-padpro/dist/src/manager/padpro-manager.js:3:12) at PadproManager.processMessages (/root/wechaty-getting-started/examples/third-party/puppet-padpro/node_modules/wechaty-puppet-padpro/dist/src/manager/padpro-manager.js:378:16) at PadproManager. (/root/wechaty-getting-started/examples/third-party/puppet-padpro/node_modules/wechaty-puppet-padpro/dist/src/manager/padpro-manager.js:119:28) at Generator.next () at fulfilled (/root/wechaty-getting-started/examples/third-party/puppet-padpro/node_modules/wechaty-puppet-padpro/dist/src/manager/padpro-manager.js:4:58) at process._tickCallback (internal/process/next_tick.js:68:7) ```

7. 其他信息

有相关bug 的背景信息,可以在这里说明

[bug]