Skip to content

[Bug]接入微信公众平台时无法使用客服消息功能进行异步消息回复 #7566

@tuzkileon

Description

@tuzkileon

What happened / 发生了什么

接入微信公众平台时,bot编辑里面的“是否换用主动发送接口”勾选时无效且报错,日志如下:
[Core] [CRIT] [v4.23.0] [weixin_official_account.weixin_offacc_adapter:513]: 用户消息未找到缓冲状态,无法处理消息

如不勾选此选项则使用微信公众平台默认的同步回复模式,必须在5秒内完成回复,超时后公众号消息窗口关闭,无法接收到回复

Reproduce / 如何复现?

接入微信公众平台后,在bot编辑界面勾选“是否换用主动发送接口”

AstrBot version, deployment method (e.g., Windows Docker Desktop deployment), provider used, and messaging platform used. / AstrBot 版本、部署方式(如 Windows Docker Desktop 部署)、使用的提供商、使用的消息平台适配器

4.23.0,Debian13系统shell部署,微信公众平台适配器

OS

Linux

Logs / 报错日志

[2026-04-15 09:06:42.094] [Core] [INFO] [weixin_official_account.weixin_offacc_adapter:151]: 解析成功: TextMessage({'ToUserName': 'gh_f40e5ca3c4c0', 'FromUserName': 'otgsk0lVwunIuSFx5N9eaChte8Es', 'CreateTime': '1776215201', 'MsgType': 'text', 'Content': '你好', 'MsgId': '25429287492206114'})
[2026-04-15 09:06:42.094] [Core] [INFO] [weixin_official_account.weixin_offacc_adapter:507]: abm: {'timestamp': 1776215201, 'group': None, 'message_str': '你好', 'self_id': 'gh_f40e5ca3c4c0', 'message': [Plain(type=<ComponentType.Plain: 'Plain'>, text='你好')], 'type': <MessageType.FRIEND_MESSAGE: 'FriendMessage'>, 'sender': MessageMember(user_id='otgsk0lVwunIuSFx5N9eaChte8Es', nickname='otgsk0lVwunIuSFx5N9eaChte8Es'), 'message_id': '25429287492206114', 'session_id': 'otgsk0lVwunIuSFx5N9eaChte8Es', 'raw_message': {'message': TextMessage({'ToUserName': 'gh_f40e5ca3c4c0', 'FromUserName': 'otgsk0lVwunIuSFx5N9eaChte8Es', 'CreateTime': '1776215201', 'MsgType': 'text', 'Content': '你好', 'MsgId': '25429287492206114'}), 'future': None, 'active_send_mode': True}}
[2026-04-15 09:06:42.095] [Core] [CRIT] [v4.23.0] [weixin_official_account.weixin_offacc_adapter:513]: 用户消息未找到缓冲状态,无法处理消息: user=otgsk0lVwunIuSFx5N9eaChte8Es message_id=25429287492206114
[2026-04-15 09:07:08.768] [Core] [INFO] [weixin_official_account.weixin_offacc_adapter:381]: callback 处理消息超时: message_id=25429284795327676
[2026-04-15 09:13:23.766] [Core] [INFO] [weixin_official_account.weixin_offacc_adapter:151]: 解析成功: TextMessage({'ToUserName': 'gh_f40e5ca3c4c0', 'FromUserName': 'otgsk0lVwunIuSFx5N9eaChte8Es', 'CreateTime': '1776215602', 'MsgType': 'text', 'Content': '你好', 'MsgId': '25429293931941492'})
[2026-04-15 09:13:23.767] [Core] [INFO] [weixin_official_account.weixin_offacc_adapter:507]: abm: {'timestamp': 1776215602, 'group': None, 'message_str': '你好', 'self_id': 'gh_f40e5ca3c4c0', 'message': [Plain(type=<ComponentType.Plain: 'Plain'>, text='你好')], 'type': <MessageType.FRIEND_MESSAGE: 'FriendMessage'>, 'sender': MessageMember(user_id='otgsk0lVwunIuSFx5N9eaChte8Es', nickname='otgsk0lVwunIuSFx5N9eaChte8Es'), 'message_id': '25429293931941492', 'session_id': 'otgsk0lVwunIuSFx5N9eaChte8Es', 'raw_message': {'message': TextMessage({'ToUserName': 'gh_f40e5ca3c4c0', 'FromUserName': 'otgsk0lVwunIuSFx5N9eaChte8Es', 'CreateTime': '1776215602', 'MsgType': 'text', 'Content': '你好', 'MsgId': '25429293931941492'}), 'future': None, 'active_send_mode': True}}
[2026-04-15 09:13:23.767] [Core] [CRIT] [v4.23.0] [weixin_official_account.weixin_offacc_adapter:513]: 用户消息未找到缓冲状态,无法处理消息: user=otgsk0lVwunIuSFx5N9eaChte8Es message_id=25429293931941492

Are you willing to submit a PR? / 你愿意提交 PR 吗?

  • Yes!

Code of Conduct

Metadata

Metadata

Assignees

No one assigned

    Labels

    area:platformThe bug / feature is about IM platform adapter, such as QQ, Lark, Telegram, WebChat and so on.bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions