wechaty / wechaty-puppet-padpro

Apache License 2.0
238 stars 63 forks source link

无法获得微信企业用户信息 #144

Open qiqizjl opened 5 years ago

qiqizjl 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. 复现的步骤 (或者解决的步骤)

当企业微信用户发消息,或者有人在企业微信群里发送任何消息。就会报错 image 跟踪了下代码 fa发现根据id去grpc获得用户的时候,返回了一堆空 image

4. 期待程序运行的结果

企业微信用户不影响用户

5. 程序实际运行的结果

image

6. 完整的日志信息:

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

20:33:23 VERB Message static load(1700653768) 20:33:23 SILL Accessory #4 constructor() 20:33:23 VERB Message constructor(1700653768) for class Message 20:33:23 VERB Message ready() 20:33:23 VERB Puppet messagePayload(1700653768) 20:33:23 SILL Puppet messagePayloadCache(1700653768) cache MISS 20:33:23 SILL Puppet messagePayload(1700653768) cache SET 20:33:23 SILL Contact ready() @ Puppet#0()/PuppetPadpro#0 20:33:23 SILL Puppet contactPayload(25984985403650201@openim) cache MISS 20:33:23 VERB Contact ready() this.puppet.contactPayload(Contact) exception: no raw payload 2019-06-18 20:33:23,265 ERROR 81904 nodejs.unhandledRejectionError: no raw payload at PadproManager. (/Users/sean/Documents/node-work/wecaht/node_modules/wechaty-puppet-padpro/src/manager/padpro-manager.ts:1061:6) at Generator.next () at fulfilled (/Users/sean/Documents/node-work/wecaht/node_modules/wechaty-puppet-padpro/dist/src/manager/padpro-manager.js:4:58) name: "unhandledRejectionError" pid: 81904 hostname: SeanWang-MacBook-Pro-15.local 20:33:23 ERR Config ########################### 20:33:23 ERR Config unhandledRejection: unhandledRejectionError: no raw payload [object Promise] 20:33:23 ERR Config ########################### 20:33:23 ERR Config process.on(unhandledRejection) promise.catch(no raw payload) Config { Error: no raw payload at PadproManager. (/Users/sean/Documents/node-work/wecaht/node_modules/wechaty-puppet-padpro/src/manager/padpro-manager.ts:1061:6) at Generator.next () at fulfilled (/Users/sean/Documents/node-work/wecaht/node_modules/wechaty-puppet-padpro/dist/src/manager/padpro-manager.js:4:58) name: 'unhandledRejectionError' } (node:81904) PromiseRejectionHandledWarning: Promise rejection was handled asynchronously (rejection id: 2)

7. 其他信息

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

[bug]

windmemory commented 5 years ago

We've tested this scenario and found the root cause for the error, @su-chang is working on a fix for this issue.