WeiXinMPSDK icon indicating copy to clipboard operation
WeiXinMPSDK copied to clipboard

微信公众号自定义菜单查询接口返回值与SDK定义的模型不一致

Open funvh opened this issue 1 year ago • 23 comments

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

问题描述

微信公众号自定义菜单查询接口返回值与SDK定义的模型不一致,导致JSON反序列化时失败。 模型类:SelfMenuConfigResult

重现问题步骤(如果可以)
  1. ...
  2. ...
微信官方文档 URL

https://developers.weixin.qq.com/doc/offiaccount/Custom_Menus/Querying_Custom_Menus.html

微信官方文档快照(直接复制关键内容到下方)
发现问题的模块
  • [ ] Senparc.Weixin 版本:
  • [x ] Senparc.Weixin.MP 版本:v16.18.7
  • [ ] Senparc.Weixin.MP.MVC 版本:
  • [ ] Senparc.Weixin.Open 版本: ~- [ ] Senparc.Weixin.QY 版本:~
  • [ ] Senparc.Weixin.Work 版本:
  • [ ] Senparc.Weixin.WxOpen 版本:
  • [ ] Senparc.Weixin.Cache.Redis 版本:
  • [ ] Senparc.Weixin.Cache.Memcached 版本:
  • [ ] Senparc.Weixin.Tenpay 版本:
  • [ ] Senparc.WebSocket 版本:
  • [ ] 其他模块:
模块对应的 .net 版本
  • [ ] .net 3.5
  • [ ] .net 4.0
  • [ ] .net 4.5+
  • [ ] .net standard 2.0 / 2.1
  • [ ] .net core 1.x
  • [ ] .net core 2.x
  • [ ] .net core 3.x
  • [x] .net 6.x
开发环境
  • [ ] Visual Studio 2019
  • [x] Visual Studio 2022
  • [ ] Visual Studio Code
  • [ ] 其他:
缓存环境
  • [x] 服务器内存缓存(默认)
  • [ ] Redis 版本:
  • [ ] Memcached 版本:
  • [ ] 其他:
系统环境
  • [x] Windows,版本:
  • [ ] Linux,版本:
  • [ ] Mac,版本:
  • [ ] 其他:
联系方式

Email:[email protected]

(也可将问题地址及联系方式发送到 [email protected]

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

funvh avatar Mar 31 '23 08:03 funvh

@funvh @SenparcHai @JaneConan 正在处理

JaneConan avatar Apr 11 '23 01:04 JaneConan

@funvh 您好,您方便提供一下,通过自定义菜单查询接口,返回得到的json么?我们想用您的菜单,做为测试用例,您如果有敏感信息请帮忙改成xxx就好,谢谢

JaneConan avatar Apr 11 '23 03:04 JaneConan

@funvh 这是我们拿到的json,请您看看和您的一样么 5aa4397a62aac2c5923bffead0c3fda

JaneConan avatar Apr 11 '23 03:04 JaneConan

@funvh 这是我们拿到的json,请您看看和您的一样么 5aa4397a62aac2c5923bffead0c3fda

是这个接口:get_current_selfmenu_info

funvh avatar Apr 11 '23 04:04 funvh

image

@funvh 您看一下,这块儿,您帮忙指以下哪里有问题呢。或者是您方便留一个联系方式,我们再交流么

JaneConan avatar Apr 11 '23 06:04 JaneConan

Snipaste_2023-04-12_11-10-08

funvh avatar Apr 12 '23 03:04 funvh

Snipaste_2023-04-12_11-15-05 这里的子对象不能和menu/get接口一样用同一个模型类,得拆分开来。

funvh avatar Apr 12 '23 03:04 funvh

Snipaste_2023-04-12_11-20-49 我是用的这个api,您看一下这个api的返回值模型类和微信官方文档的返回值是不是不一致

funvh avatar Apr 12 '23 03:04 funvh

好的 我们了解了,我试一试~

Snipaste_2023-04-12_11-20-49 我是用的这个api,您看一下这个api的返回值模型类和微信官方文档的返回值是不是不一致

JaneConan avatar Apr 12 '23 03:04 JaneConan

@funvh #2814 您看看我这边调整了模型的封装

JaneConan avatar Apr 12 '23 06:04 JaneConan

是这样子的发自我的 iPhone在 2023年4月12日,13:24,ConanYao @.***> 写道:

@funvh 您调试的时候是报的这样子的异常么

—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you were mentioned.Message ID: @.***>

funvh avatar Apr 12 '23 06:04 funvh

是这样子的发自我的 iPhone在 2023年4月12日,13:24,ConanYao @.> 写道: @funvh 您调试的时候是报的这样子的异常么 —Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you were mentioned.Message ID: @.>

您看 #2814 这次PR看一下新的模型~ 确认一下

JaneConan avatar Apr 13 '23 03:04 JaneConan

@funvh 您升级到苏总最新发布的v16.18.10.7版本了么,您有再次试过,问题解决了么?请帮忙反馈一下该issue,谢谢

JaneConan avatar Apr 23 '23 03:04 JaneConan

还是没有解决在 2023年4月23日,11:46,ConanYao @.***> 写道: @funvh 您升级到苏总最新发布的v16.18.10.7版本了么,您有再次试过,问题解决了么?请帮忙反馈一下该issue,谢谢

—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you were mentioned.Message ID: @.***>

funvh avatar Apr 23 '23 10:04 funvh

没有看到这个版本16.18.10.7在 @.*** 写道:还是没有解决在 2023年4月23日,11:46,ConanYao @.***> 写道: @funvh 您升级到苏总最新发布的v16.18.10.7版本了么,您有再次试过,问题解决了么?请帮忙反馈一下该issue,谢谢

—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you were mentioned.Message ID: @.***>

funvh avatar Apr 23 '23 10:04 funvh

@funvh 好的,看起来苏总还没更新至nuget~ 您再稍等一两天哈~ image

JaneConan avatar Apr 24 '23 01:04 JaneConan

@funvh 新版本正在一起发布,抱歉之前的应该是 Nuget Key过期没有自动发布成功。

JeffreySu avatar May 20 '23 07:05 JeffreySu

已经在此版本中一起发布:https://www.nuget.org/packages/Senparc.Weixin.MP/16.18.11

JeffreySu avatar May 20 '23 07:05 JeffreySu

@funvh 您好,最近您这边有验证这个问题,解决了吗~ 我们这边nuget应该更新好了~

JaneConan avatar Jun 08 '23 10:06 JaneConan

@JaneConan 这里提到的是get_current_selfmenu_info接口,而修复的时候(https://github.com/JeffreySu/WeiXinMPSDK/pull/2814)把 menu/get 接口的实体改掉了。导致 menu/get 接口不好用。

get_current_selfmenu_info接口文档: https://developers.weixin.qq.com/doc/offiaccount/Custom_Menus/Querying_Custom_Menus.html

menu/get接口文档: https://developers.weixin.qq.com/doc/offiaccount/Custom_Menus/Getting_Custom_Menu_Configurations.html

请核实。

peny911 avatar Jun 11 '23 16:06 peny911

@JaneConan 这里提到的是get_current_selfmenu_info接口,而修复的时候(https://github.com/JeffreySu/WeiXinMPSDK/pull/2814)把%E6%8A%8A) menu/get 接口的实体改掉了。导致 menu/get 接口不好用。

get_current_selfmenu_info接口文档: https://developers.weixin.qq.com/doc/offiaccount/Custom_Menus/Querying_Custom_Menus.html

menu/get接口文档: https://developers.weixin.qq.com/doc/offiaccount/Custom_Menus/Getting_Custom_Menu_Configurations.html

请核实。

好的 感谢反馈,确实是异常部分多加了一个判空导致了异常,我们修复一下,请您再帮忙看看

JaneConan avatar Jun 13 '23 02:06 JaneConan

@JaneConan 这里提到的是get_current_selfmenu_info接口,而修复的时候(https://github.com/JeffreySu/WeiXinMPSDK/pull/2814)把%E6%8A%8A) menu/get 接口的实体改掉了。导致 menu/get 接口不好用。

get_current_selfmenu_info接口文档: https://developers.weixin.qq.com/doc/offiaccount/Custom_Menus/Querying_Custom_Menus.html

menu/get接口文档: https://developers.weixin.qq.com/doc/offiaccount/Custom_Menus/Getting_Custom_Menu_Configurations.html

请核实。

@peny911 麻烦确认一下 https://github.com/JaneConan/WeiXinMPSDK/commit/715a9eca59068793f7ed04d71e64465339e610d3 的提交是否已经解决这个问题?您还有另外一个 issue(https://github.com/JeffreySu/WeiXinMPSDK/issues/2843)是否指向的是同一个问题?

JeffreySu avatar Oct 26 '23 16:10 JeffreySu

@funvh @peny911 请您们再看看我们的最新提交 #2940 看看能否修正这个自定义菜单的问题

JaneConan avatar Oct 29 '23 13:10 JaneConan

@funvh @peny911 您们好,请问这个issue您们还有问题么,我们v16.20.2版本有修复了这个问题

JaneConan avatar Mar 25 '24 03:03 JaneConan

哈喽,不好意思哈,我现在没在对接微信了,之前用的源代码直接改的发自我的 iPhone在 2024年3月25日,11:18,ConanYao @.***> 写道: @funvh @peny911 您们好,请问这个issue您们还有问题么,我们v16.20.2版本有修复了这个问题

—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you were mentioned.Message ID: @.***>

funvh avatar Mar 25 '24 04:03 funvh

哈喽,不好意思哈,我现在没在对接微信了,之前用的源代码直接改的发自我的 iPhone在 2024年3月25日,11:18,ConanYao @.> 写道: @funvh @peny911 您们好,请问这个issue您们还有问题么,我们v16.20.2版本有修复了这个问题 —Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you were mentioned.Message ID: @.>

@funvh 非常感谢,那这个 issue 关闭啦 🤝

JeffreySu avatar Apr 03 '24 06:04 JeffreySu