Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

企业微信接入抛出异常 RequestMessage转换出错!可能是MsgType和InfoType都不存在! #2932

Open
2 of 15 tasks
hpf869144532 opened this issue Oct 23, 2023 · 5 comments

Comments

@hpf869144532
Copy link

hpf869144532 commented Oct 23, 2023

此版块专为反馈 bug 及提交需求服务,不负责解答开发问题,请勿发表开发问题,
如果您需要这方面的帮助,请移步问答社区https://weixin.senparc.com/QA

问题描述

接入企业微信,事件通知为 时,抛出异常
RequestMessage转换出错!可能是MsgType和InfoType都不存在!

报错信息如下:
[16:20:07 INF] Message: RequestMessage转换出错!可能是MsgType和InfoType都不存在!,
XML:
SuiteId></SuiteId
AuthCorpId></AuthCorpId
InfoType></InfoType
TimeStamp>1698049207</TimeStamp
ChatIdx![CDATA[wrhwJvCgAAi9y050rUbbIrOmPBqhJLAg]]></ChatIChangeType

JoinScene>0</JoinScene
MemChangeCnt>1</xmI
StackTrace:at Senparc.Weixin.Work.RequestMessageFaciory.GetRequestEntity[TMC](TMC messageContext,XDocument doc)at Senparc.Weixin.Work.MessageHandlers.WorkMessageHandlerInit(XDocument postDataDocument,IEncryptPostModel postModel)at WxOpen.Web.Controllers.WorkController.callback(PostModepostModel) in /data/jenkins/workspace/live-weixin/WxOpen.WebControllers/WorkController.cs:line 116

重现问题步骤(如果可以)
  1. ...
  2. ...
微信官方文档 URL
微信官方文档快照(直接复制关键内容到下方)
发现问题的模块
  • Senparc.Weixin 版本:
  • Senparc.Weixin.MP 版本:
  • Senparc.Weixin.MP.MVC 版本:
  • Senparc.Weixin.Open 版本:
    - [ ] Senparc.Weixin.QY 版本:
  • Senparc.Weixin.Work 版本:3.16.4
  • Senparc.Weixin.WxOpen 版本:3.16.4
  • Senparc.Weixin.Cache.Redis 版本:0.8.13
  • Senparc.Weixin.Cache.Memcached 版本:
  • Senparc.Weixin.Tenpay 版本:
  • Senparc.WebSocket 版本:
  • 其他模块:
模块对应的 .net 版本
  • .net 7.0
开发环境
  • Visual Studio 2022
缓存环境
  • 服务器内存缓存(默认)
  • Redis 版本:
系统环境
  • Linux,版本:
联系方式

Email:

(也可将问题地址及联系方式发送到 zsu@senparc.com

发布问题后,请保持对 issue 的关注,有时会有需要进一步沟通的信息,很长时间内没有得到答复的 issue 将被关闭。

@JeffreySu JeffreySu added this to TODO in Senparc.Weixin via automation Oct 24, 2023
@JeffreySu JeffreySu added the task label Oct 24, 2023
@JeffreySu
Copy link
Owner

@hpf869144532 是否能提供解密后的完整的XML?谢谢!

@hpf869144532
Copy link
Author

hpf869144532 commented Oct 27, 2023

<xml>
  <SuiteId><![CDATA[ww9d5e6d50a1e3150c]]></SuiteId>
  <AuthCorpId><![CDATA[ww6ad38ae64107ee02]]></AuthCorpId>
  <InfoType><![CDATA[change_external_chat]]></InfoType>
  <TimeStamp>1698411811</TimeStamp>
  <ChatId><![CDATA[wrhwJvCgAA3sOUmi-G6s1fCjJNeYaAjA]]></ChatId>
  <ChangeType><![CDATA[update]]></ChangeType>
  <UpdateDetail><![CDATA[del_member]]></UpdateDetail>
  <QuitScene>0</QuitScene>
  <MemChangeCnt>1</MemChangeCnt>
</xml>

@JeffreySu
Copy link
Owner

确实缺少 change_external_chat 类型,已经列入计划。

@hpf869144532
Copy link
Author

目前这几个消息事件类型:RequestMessage转换异常!InfoType类型存在的情况下无法处理的情况
image

企业微信文档https://developer.work.weixin.qq.com/document/path/92277#%E4%BC%81%E4%B8%9A%E5%AE%A2%E6%88%B7%E6%A0%87%E7%AD%BE%E5%88%9B%E5%BB%BA%E4%BA%8B%E4%BB%B6

image

@JaneConan
Copy link
Contributor

@hpf869144532 您好,我们看到在 v3.18.1版本 已经修复了您的这个问题,请问您,目前又再次测试过么,谢谢

image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Development

No branches or pull requests

3 participants