[Bug]设置回调失败
发生了什么
Exception: 设置回调失败: {'ret': 500, 'msg': 'http://192.168.1.18:11451/astrbot-gewechat/callback push msg err'}
如何复现?
更新面板后出现了
AstrBot 版本、部署方式(如 Windows Docker Desktop 部署)、使用的提供商、使用的消息平台适配器
WebUI 版本: v3.4.39,Windows 启动器
操作系统
Windows
报错日志
[20:06:49] [Core] [INFO] [gewechat.client:347]: APPID: wx_PZvGUhxnJei9J0dtijc2c 已在线 [2025-03-23 20:06:49 +0800] [41328] [INFO] Running on http://0.0.0.0:11451 (CTRL + C to quit) [20:06:49] [Core] [INFO] [gewechat.client:289]: 设置回调,请等待... [2025-03-23 20:06:52 +0800] [41328] [INFO] 127.0.0.1:7154 GET /chat 1.1 200 756 3999 [2025-03-23 20:06:52 +0800] [41328] [INFO] 127.0.0.1:7160 GET /api/live-log 1.1 101 - 0 [2025-03-23 20:06:52 +0800] [41328] [INFO] 127.0.0.1:7161 GET /api/stat/start-time 1.1 200 64 1000 [2025-03-23 20:06:52 +0800] [41328] [INFO] 127.0.0.1:7162 GET /api/stat/version 1.1 200 59 999 [2025-03-23 20:06:52 +0800] [41328] [INFO] 127.0.0.1:7163 GET /api/update/check 1.1 200 92 999 [2025-03-23 20:06:52 +0800] [41328] [INFO] 127.0.0.1:7164 GET /api/chat/status 1.1 200 78 1999 [2025-03-23 20:06:52 +0800] [41328] [INFO] 127.0.0.1:7161 GET /api/chat/conversations 1.1 200 502 1999 [2025-03-23 20:06:54 +0800] [41328] [INFO] 127.0.0.1:7155 GET /api/update/check 1.1 200 205 1843378 [2025-03-23 20:07:02 +0800] [41328] [INFO] 127.0.0.1:7168 GET /api/plugin/get 1.1 200 100858 3998 [2025-03-23 20:07:02 +0800] [41328] [INFO] 127.0.0.1:7154 GET /api/chat/listen 1.1 - - 9650753 [2025-03-23 20:07:02 +0800] [41328] [INFO] 127.0.0.1:7154 GET /api/chat/listen 1.1 200 - 9651754 [2025-03-23 20:07:06 +0800] [41328] [INFO] 127.0.0.1:7169 GET /api/plugin/market_list 1.1 200 41685 4740348 [2025-03-23 20:07:13 +0800] [41328] [INFO] 192.168.1.18:7172 GET /ws 1.1 101 - 996 [20:07:13] [Core] [INFO] [aiocqhttp.aiocqhttp_platform_adapter:76]: aiocqhttp(OneBot v11) 适配器已连接。 [20:07:22] [Core] [INFO] [gewechat.client:298]: 设置回调结果: {'ret': 500, 'msg': 'http://192.168.1.18:11451/astrbot-gewechat/callback push msg err'} Exception in thread Thread-1 (run): Traceback (most recent call last): File "C:\Users\LRL\AppData\Local\Programs\Python\Python311\Lib\threading.py", line 1045, in _bootstrap_inner self.run() File "C:\Users\LRL\AppData\Local\Programs\Python\Python311\Lib\threading.py", line 982, in run self._target(*self._args, **self._kwargs) File "C:\Users\LRL\AppData\Local\Programs\Python\Python311\Lib\asyncio\runners.py", line 190, in run return runner.run(main) ^^^^^^^^^^^^^^^^ File "C:\Users\LRL\AppData\Local\Programs\Python\Python311\Lib\asyncio\runners.py", line 118, in run return self._loop.run_until_complete(task) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\LRL\AppData\Local\Programs\Python\Python311\Lib\asyncio\base_events.py", line 654, in run_until_complete return future.result() ^^^^^^^^^^^^^^^ File "E:\AstrBotLauncher-0.1.5.5\AstrBot\astrbot\core\platform\sources\gewechat\client.py", line 300, in _set_callback_url raise Exception(f"设置回调失败: {json_blob}") Exception: 设置回调失败: {'ret': 500, 'msg': 'http://192.168.1.18:11451/astrbot-gewechat/callback push msg err'}
你愿意提交 PR 吗?
- [x] 是的,我愿意提交 PR!
Code of Conduct
- [x] 我已阅读并同意遵守该项目的 行为准则。
请问之前的版本有这个问题嘛?
请问之前的版本有这个问题嘛?
之前没遇到过,我在想是不是 port 回调地址端口的问题
我在更改AstrBot 里面的设置后点击保存 自动重启,然后到回调页面时就会有这种现象,每次port 回调地址端口 更换成新的后就没有回调的问题了,然后我再次尝试重启时 就又会有回调问题,我需要再次换个port 回调地址端口 才能用 [23:41:01] [Core] [INFO] [gewechat.client:289]: 设置回调,请等待... [2025-03-24 23:41:01 +0800] [28248] [INFO] 127.0.0.1:7409 GET /api/stat/start-time 1.1 200 64 1007 [2025-03-24 23:41:01 +0800] [28248] [INFO] 127.0.0.1:7414 GET /api/stat/start-time 1.1 200 64 0 [2025-03-24 23:41:01 +0800] [28248] [INFO] 127.0.0.1:7414 GET /config 1.1 304 - 999 [2025-03-24 23:41:01 +0800] [28248] [INFO] 127.0.0.1:7414 GET /config 1.1 304 - 994 [2025-03-24 23:41:01 +0800] [28248] [INFO] 127.0.0.1:7418 GET /api/live-log 1.1 101 - 0 [2025-03-24 23:41:02 +0800] [28248] [INFO] 127.0.0.1:7409 GET /api/stat/start-time 1.1 200 64 316901 [2025-03-24 23:41:02 +0800] [28248] [INFO] 127.0.0.1:7408 GET /api/stat/version 1.1 200 59 2993 [2025-03-24 23:41:02 +0800] [28248] [INFO] 127.0.0.1:7419 GET /api/update/check 1.1 200 92 0 [2025-03-24 23:41:02 +0800] [28248] [INFO] 127.0.0.1:7420 GET /api/config/get 1.1 200 44197 1002 [2025-03-24 23:41:02 +0800] [28248] [INFO] 127.0.0.1:7414 GET /api/update/check 1.1 200 205 1019768 [2025-03-24 23:41:25 +0800] [28248] [INFO] 192.168.1.18:7428 GET /ws 1.1 101 - 999 [23:41:25] [Core] [INFO] [aiocqhttp.aiocqhttp_platform_adapter:76]: aiocqhttp(OneBot v11) 适配器已连接。 [23:41:34] [Core] [INFO] [gewechat.client:298]: 设置回调结果: {'ret': 500, 'msg': 'http://192.168.1.18:11457/astrbot-gewechat/callback push msg err'} Exception in thread Thread-1 (run): Traceback (most recent call last): File "C:\Users\LRL\AppData\Local\Programs\Python\Python311\Lib\threading.py", line 1045, in _bootstrap_inner self.run() File "C:\Users\LRL\AppData\Local\Programs\Python\Python311\Lib\threading.py", line 982, in run self._target(*self._args, **self._kwargs) File "C:\Users\LRL\AppData\Local\Programs\Python\Python311\Lib\asyncio\runners.py", line 190, in run return runner.run(main) ^^^^^^^^^^^^^^^^ File "C:\Users\LRL\AppData\Local\Programs\Python\Python311\Lib\asyncio\runners.py", line 118, in run return self._loop.run_until_complete(task) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\LRL\AppData\Local\Programs\Python\Python311\Lib\asyncio\base_events.py", line 654, in run_until_complete return future.result() ^^^^^^^^^^^^^^^ File "E:\AstrBotLauncher-0.1.5.5\AstrBot\astrbot\core\platform\sources\gewechat\client.py", line 300, in _set_callback_url raise Exception(f"设置回调失败: {json_blob}") Exception: 设置回调失败: {'ret': 500, 'msg': 'http://192.168.1.18:11457/astrbot-gewechat/callback push msg err'}
port 回调地址端口 更换成新的后就没有回调的问题了 [23:46:26] [Core] [INFO] [gewechat.client:289]: 设置回调,请等待... [2025-03-24 23:46:27 +0800] [28248] [INFO] 127.0.0.1:7765 GET /api/stat/start-time 1.1 200 64 999 [2025-03-24 23:46:27 +0800] [28248] [INFO] 127.0.0.1:7765 GET /platforms 1.1 304 - 1140 [2025-03-24 23:46:27 +0800] [28248] [INFO] 127.0.0.1:7772 GET /api/live-log 1.1 101 - 0 [2025-03-24 23:46:28 +0800] [28248] [INFO] 127.0.0.1:7770 GET /api/stat/start-time 1.1 200 64 0 [2025-03-24 23:46:28 +0800] [28248] [INFO] 127.0.0.1:7773 GET /api/stat/version 1.1 200 59 1381 [2025-03-24 23:46:28 +0800] [28248] [INFO] 127.0.0.1:7774 GET /api/update/check 1.1 200 92 1381 [2025-03-24 23:46:28 +0800] [28248] [INFO] 127.0.0.1:7775 GET /api/config/get 1.1 200 44197 2614 [2025-03-24 23:46:28 +0800] [28248] [INFO] 127.0.0.1:7765 GET /api/update/check 1.1 200 205 890233 [2025-03-24 23:46:29 +0800] [28248] [INFO] 192.168.1.18:7778 POST /astrbot-gewechat/callback 1.1 200 20 526 [23:46:29] [Core] [INFO] [gewechat.client:298]: 设置回调结果: {'ret': 200, 'msg': '操作成功'} [23:46:29] [Core] [INFO] [gewechat.client:301]: 将在 http://192.168.1.18:11458/astrbot-gewechat/callback 上接收 gewechat 下发的消息。如果一直没收到消息请先尝试重启 AstrBot。如果仍没收到请到管理面板聊天页输入 /gewe_logout 重新登录。
找到你容器astrbot的网络,不要用公网IP地址 astrbot_astrbot_network | 172.18.0.3 | 172.18.0.1