[2026-03-24 05:02:47.594] [Core] [ERRO] [v4.22.0] [weixin_oc.weixin_oc_adapter:902]: weixin_oc(weixin_main): run failed:
Traceback (most recent call last):
File "/Users/jack/.local/share/uv/tools/astrbot/lib/python3.13/site-packages/aiohttp/client_reqrep.py", line 539, in start
message, payload = await protocol.read() # type: ignore[union-attr]
^^^^^^^^^^^^^^^^^^^^^
File "/Users/jack/.local/share/uv/tools/astrbot/lib/python3.13/site-packages/aiohttp/streams.py", line 703, in read
await self._waiter
asyncio.exceptions.CancelledError
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/Users/jack/.local/share/uv/tools/astrbot/lib/python3.13/site-packages/astrbot/core/platform/sources/weixin_oc/weixin_oc_adapter.py", line 898, in run
await self._poll_inbound_updates()
File "/Users/jack/.local/share/uv/tools/astrbot/lib/python3.13/site-packages/astrbot/core/platform/sources/weixin_oc/weixin_oc_adapter.py", line 737, in _poll_inbound_updates
data = await self.client.request_json(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
...<10 lines>...
)
^
File "/Users/jack/.local/share/uv/tools/astrbot/lib/python3.13/site-packages/astrbot/core/platform/sources/weixin_oc/weixin_oc_client.py", line 215, in request_json
async with self._http_session.request(
~~~~~~~~~~~~~~~~~~~~~~~~~~^
method,
^^^^^^^
...<4 lines>...
timeout=timeout,
^^^^^^^^^^^^^^^^
) as resp:
^
File "/Users/jack/.local/share/uv/tools/astrbot/lib/python3.13/site-packages/aiohttp/client.py", line 1510, in __aenter__
self._resp: _RetType = await self._coro
^^^^^^^^^^^^^^^^
File "/Users/jack/.local/share/uv/tools/astrbot/lib/python3.13/site-packages/aiohttp/client.py", line 779, in _request
resp = await handler(req)
^^^^^^^^^^^^^^^^^^
File "/Users/jack/.local/share/uv/tools/astrbot/lib/python3.13/site-packages/aiohttp/client.py", line 757, in _connect_and_send_request
await resp.start(conn)
File "/Users/jack/.local/share/uv/tools/astrbot/lib/python3.13/site-packages/aiohttp/client_reqrep.py", line 534, in start
with self._timer:
^^^^^^^^^^^
File "/Users/jack/.local/share/uv/tools/astrbot/lib/python3.13/site-packages/aiohttp/helpers.py", line 713, in __exit__
raise asyncio.TimeoutError from exc_val
TimeoutError
### Are you willing to submit a PR? / 你愿意提交 PR 吗?
- [x] Yes!
### Code of Conduct
- [x] I have read and agree to abide by the project's [Code of Conduct](https://docs.github.com/zh/site-policy/github-terms/github-community-code-of-conduct)。
What happened / 发生了什么
我这边在使用
weixin_oc(个人微信)时,发现一个长轮询超时问题。现象是:个人微信登录成功后,AstrBot 会正常进入入站消息轮询;但运行一段时间后,
ilink/bot/getupdates这条长轮询请求会偶发TimeoutError。当前这个异常会一路冒泡到run(),然后直接出现:weixin_oc(...): run failed一旦出现这条报错,对应的
weixin_oc适配器就不再继续轮询消息了,通常只能靠重启进程或重新拉起适配器恢复。这个问题发生在“登录成功后的入站消息轮询阶段”,不是二维码登录轮询阶段。
我期望的行为是:
实际行为是:
getupdates超时后直接run failedReproduce / 如何复现?
v4.22.0配置并启用weixin_ocgetupdates长轮询持续工作TimeoutErrorweixin_oc(...): run failed我本地的相关配置如下:
weixin_oc_qr_poll_interval = 1weixin_oc_long_poll_timeout_ms = 35000weixin_oc_api_timeout_ms = 15000AstrBot version, deployment method (e.g., Windows Docker Desktop deployment), provider used, and messaging platform used. / AstrBot 版本、部署方式(如 Windows Docker Desktop 部署)、使用的提供商、使用的消息平台适配器
v4.22.0astrbot run启动,并通过launchd常驻3.13.12openai_local/gpt-5.4weixin_oc补充一下:这个问题看起来和 provider 本身没关系,报错栈是在
weixin_oc的平台轮询路径里触发的。OS
macOS
Logs / 报错日志