AstrBot icon indicating copy to clipboard operation
AstrBot copied to clipboard

[Bug] 升级到新版WeChatPadPro后无法获取授权码

Open Zhenyi-Wang opened this issue 1 year ago • 6 comments

发生了什么

Image Image

860版本改了接口的返回格式,多了一层authKeys

如何复现?

升级WeChatPadPro,重新获取授权码

AstrBot 版本、部署方式(如 Windows Docker Desktop 部署)、使用的提供商、使用的消息平台适配器

已定位问题,将提交PR

操作系统

Linux

报错日志

astrbot  |  [16:00:39] [Core] [INFO] [core.core_lifecycle:166]: AstrBot 启动完成。 
astrbot  | [2025-07-06 16:00:39 +0800] [1] [INFO] Running on http://0.0.0.0:6185 (CTRL + C to quit)
astrbot  |  [16:00:42] [Core] [ERRO] [wechatpadpro.wechatpadpro_adapter:236]: 生成授权码成功但未找到授权码: {'Code': 200, 'Data': {'authKeys': ['54f999d6-909e-496b-921c-116c21833d2f']}, 'Text': '授权码生成成功'} 
astrbot  |  [16:00:42] [Core] [INFO] [wechatpadpro.wechatpadpro_adapter:108]: WeChatPadPro 设备已离线,开始扫码登录。 
astrbot  |  [16:00:42] [Core] [ERRO] [wechatpadpro.wechatpadpro_adapter:287]: 获取登录二维码时发生错误: Invalid variable type: value should be str, int or float, got None of type <class 'NoneType'> 
astrbot  |  [16:00:42] [Core] [ERRO] [wechatpadpro.wechatpadpro_adapter:114]: 无法获取登录二维码。 

你愿意提交 PR 吗?

  • [x] 是的,我愿意提交 PR!

Code of Conduct

  • [x] 我已阅读并同意遵守该项目的 行为准则。

Zhenyi-Wang avatar Jul 06 '25 08:07 Zhenyi-Wang

我也有这样的问题,有什么办法能登陆吗,能在wechatpadpro上登陆吗

HanLiQL avatar Jul 07 '25 05:07 HanLiQL

我也有这样的问题,有什么办法能登陆吗,能在wechatpadpro上登陆吗

我提了PR,等AstrBot官方合并之后升级就可以了 或者临时降级WeChatPadPro,不知道行不行 急的话可以看下具体代码的改动,先自己调一下 https://github.com/AstrBotDevs/AstrBot/pull/2043 主要原因是旧接口返回{"Data":["xxxxxx"]}变成了{"Data":{"authKey":["xxxxxx"]}}

Zhenyi-Wang avatar Jul 07 '25 06:07 Zhenyi-Wang

这PR合并一般要多久阿,我是不是把你PR里的python代码改在docker里对应位置里就行了。

HanLiQL avatar Jul 07 '25 06:07 HanLiQL

额,看官方速度了。。不知道你的部署方式,你可以先试试

Zhenyi-Wang avatar Jul 07 '25 06:07 Zhenyi-Wang

已经在Q群提醒作者了,哈哈哈哈哈耐心等等吧铁子们

robinzc2008 avatar Jul 07 '25 11:07 robinzc2008

已经合并 #2041,马上会发布下一个 release v3.5.19,预计今天内

感谢 @Zhenyi-Wang

Soulter avatar Jul 07 '25 14:07 Soulter