Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug]: 使用QQ官方API,机器人运行一段时间后,可能会出现无法回复消息或掉线的问题。 #980

Open
tewhdn opened this issue Jan 20, 2025 · 3 comments
Assignees
Labels
bug? Bug或Bug修复相关 IM: qq-botpy QQ 官方 API 协议适配器相关 m: Platform 消息接收或发送的顶层操作模块

Comments

@tewhdn
Copy link

tewhdn commented Jan 20, 2025

消息平台适配器

qq-botpy(QQ官方API)

运行环境

v3.4.2.1、Ubuntu24、Python3.11、美国

异常情况

`使用QQ官方API搭建的QQ机器人存在断联和收不到消息问题,遇到这种情况后需要重载消息平台。
以下是部分日志
"time":"2025-01-20T11:29:49.571938561Z"}
{"log":"[2025-01-20 11:29:50 +0000] [1] [INFO] 183.197.189.168:17806 GET /api/v1/logs 1.1 200 76 1564\n","stream":"stdout","time":"2025-01-20T11:29:50.572524897Z"}
{"log":"[2025-01-20 11:29:51 +0000] [1] [INFO] 183.197.189.168:17806 GET /api/v1/logs 1.1 200 76 1814\n","stream":"stdout","time":"2025-01-20T11:29:51.685436976Z"}
{"log":"[2025-01-20 11:29:52 +0000] [1] [INFO] 183.197.189.168:17806 GET /api/v1/logs 1.1 200 76 1180\n","stream":"stdout","time":"2025-01-20T11:29:52.577610236Z"}
{"log":"[2025-01-20 11:29:53 +0000] [1] [INFO] 183.197.189.168:17806 GET /api/v1/logs 1.1 200 76 1514\n","stream":"stdout","time":"2025-01-20T11:29:53.570480936Z"}
{"log":"[2025-01-20 11:29:54 +0000] [1] [INFO] 183.197.189.168:17806 GET /api/v1/logs 1.1 200 76 1238\n","stream":"stdout","time":"2025-01-20T11:29:54.579218704Z"}
{"log":"[2025-01-20 11:29:55 +0000] [1] [INFO] 183.197.189.168:17806 GET /api/v1/logs 1.1 200 76 1501\n","stream":"stdout","time":"2025-01-20T11:29:55.562464705Z"}
{"log":"[2025-01-20 11:29:56 +0000] [1] [INFO] 183.197.189.168:17806 GET /api/v1/logs 1.1 200 76 1571\n","stream":"stdout","time":"2025-01-20T11:29:56.592898306Z"}
{"log":"[2025-01-20 11:29:58 +0000] [1] [INFO] 183.197.189.168:17806 GET /api/v1/logs 1.1 200 76 1606\n","stream":"stdout","time":"2025-01-20T11:29:58.093207467Z"}
{"log":"[2025-01-20 11:29:59 +0000] [1] [INFO] 183.197.189.168:17806 GET /api/v1/logs 1.1 200 76 1528\n","stream":"stdout","time":"2025-01-20T11:29:59.230950989Z"}
{"log":"[2025-01-20 11:29:59 +0000] [1] [INFO] 183.197.189.168:17806 GET /api/v1/logs 1.1 200 76 1488\n","stream":"stdout","time":"2025-01-20T11:29:59.561912808Z"}
{"log":"[2025-01-20 11:30:00 +0000] [1] [INFO] 183.197.189.168:17806 GET /api/v1/logs 1.1 200 76 1550\n","stream":"stdout","time":"2025-01-20T11:30:00.577165717Z"}
{"log":"[2025-01-20 11:30:01 +0000] [1] [INFO] 183.197.189.168:17806 GET /api/v1/logs 1.1 200 76 1545\n","stream":"stdout","time":"2025-01-20T11:30:01.590313223Z"}
{"log":"[2025-01-20 11:30:02 +0000] [1] [INFO] 183.197.189.168:17806 GET /api/v1/logs 1.1 200 76 1322\n","stream":"stdout","time":"2025-01-20T11:30:02.556046516Z"}
{"log":"[2025-01-20 11:30:03 +0000] [1] [INFO] 183.197.189.168:17806 GET /api/v1/logs 1.1 200 76 1393\n","stream":"stdout","time":"2025-01-20T11:30:03.578822926Z"}
{"log":"[2025-01-20 11:30:04 +0000] [1] [INFO] 183.197.189.168:17806 GET /api/v1/logs 1.1 200 76 1151\n","stream":"stdout","time":"2025-01-20T11:30:04.560598547Z"}
{"log":"[2025-01-20 11:30:06 +0000] [1] [INFO] 183.197.189.168:17806 GET /api/v1/logs 1.1 200 76 1144\n","stream":"stdout","time":"2025-01-20T11:30:06.58282463Z"}
{"log":"[2025-01-20 11:30:07 +0000] [1] [INFO] 183.197.189.168:17806 GET /api/v1/logs 1.1 200 76 1230\n","stream":"stdout","time":"2025-01-20T11:30:07.266527218Z"}
{"log":"[2025-01-20 11:30:07 +0000] [1] [INFO] 183.197.189.168:17806 GET /api/v1/logs 1.1 200 76 1126\n","stream":"stdout","time":"2025-01-20T11:30:07.566298203Z"}
{"log":"[2025-01-20 11:30:08 +0000] [1] [INFO] 183.197.189.168:17806 GET /api/v1/logs 1.1 200 76 1471\n","stream":"stdout","time":"2025-01-20T11:30:08.575334866Z"}
{"log":"[2025-01-20 11:30:09 +0000] [1] [INFO] 183.197.189.168:17806 GET /api/v1/logs 1.1 200 76 1168\n","stream":"stdout","time":"2025-01-20T11:30:09.58480339Z"}
{"log":"[2025-01-20 11:30:10 +0000] [1] [INFO] 183.197.189.168:17806 GET /api/v1/logs 1.1 200 76 1701\n","stream":"stdout","time":"2025-01-20T11:30:10.568621296Z"}
{"log":"[2025-01-20 11:30:11 +0000] [1] [INFO] 183.197.189.168:17806 GET /api/v1/logs 1.1 200 76 1577\n","stream":"stdout","time":"2025-01-20T11:30:11.580760882Z"}
{"log":"[2025-01-20 11:30:12 +0000] [1] [INFO] 183.197.189.168:17806 GET /api/v1/logs 1.1 200 76 2011\n","stream":"stdout","time":"2025-01-20T11:30:12.579100069Z"}
{"log":"[2025-01-20 11:30:13 +0000] [1] [INFO] 183.197.189.168:17806 GET /api/v1/logs 1.1 200 76 1525\n","stream":"stdout","time":"2025-01-20T11:30:13.571291878Z"}
{"log":"[2025-01-20 11:30:14 +0000] [1] [INFO] 183.197.189.168:17806 GET /api/v1/logs 1.1 200 76 1520\n","stream":"stdout","time":"2025-01-20T11:30:14.574713097Z"}
{"log":"[2025-01-20 11:30:15 +0000] [1] [INFO] 183.197.189.168:17806 GET /api/v1/logs 1.1 200 76 1550\n","stream":"stdout","time":"2025-01-20T11:30:15.578275063Z"}
{"log":"[2025-01-20 11:30:16 +0000] [1] [INFO] 183.197.189.168:17806 GET /api/v1/logs 1.1 200 76 1790\n","stream":"stdout","time":"2025-01-20T11:30:16.569499093Z"}
{"log":"[2025-01-20 11:30:17 +0000] [1] [INFO] 183.197.189.168:17806 GET /api/v1/logs 1.1 200 76 1676\n","stream":"stdout","time":"2025-01-20T11:30:17.567645104Z"}
{"log":"[2025-01-20 11:30:18 +0000] [1] [INFO] 183.197.189.168:17806 GET /api/v1/logs 1.1 200 76 1610\n","stream":"stdout","time":"2025-01-20T11:30:18.574771935Z"}
{"log":"[2025-01-20 11:30:19 +0000] [1] [INFO] 183.197.189.168:17806 GET /api/v1/logs 1.1 200 76 1491\n","stream":"stdout","time":"2025-01-20T11:30:19.566484668Z"}
{"log":"[2025-01-20 11:30:20 +0000] [1] [INFO] 183.197.189.168:17806 GET /api/v1/logs 1.1 200 76 1770\n","stream":"stdout","time":"2025-01-20T11:30:20.56765576Z"}
{"log":"[2025-01-20 11:30:21 +0000] [1] [INFO] 183.197.189.168:17806 GET /api/v1/logs 1.1 200 76 1565\n","stream":"stdout","time":"2025-01-20T11:30:21.578813222Z"}
{"log":"[2025-01-20 11:30:22 +0000] [1] [INFO] 183.197.189.168:17806 GET /api/v1/logs 1.1 200 76 1502\n","stream":"stdout","time":"2025-01-20T11:30:22.588253311Z"}
{"log":"[2025-01-20 11:30:23 +0000] [1] [INFO] 183.197.189.168:17806 GET /api/v1/logs 1.1 200 76 1346\n","stream":"stdout","time":"2025-01-20T11:30:23.570369109Z"}
{"log":"[2025-01-20 11:30:24 +0000] [1] [INFO] 183.197.189.168:17806 GET /api/v1/logs 1.1 200 76 1571\n","stream":"stdout","time":"2025-01-20T11:30:24.577491903Z"}
{"log":"[2025-01-20 11:30:25 +0000] [1] [INFO] 183.197.189.168:17806 GET /api/v1/logs 1.1 200 76 1402\n","stream":"stdout","time":"2025-01-20T11:30:25.56506446Z"}
{"log":"[2025-01-20 11:30:26 +0000] [1] [INFO] 183.197.189.168:17806 GET /api/v1/logs 1.1 200 76 1498\n","stream":"stdout","time":"2025-01-20T11:30:26.575290516Z"}
{"log":"[2025-01-20 11:30:27 +0000] [1] [INFO] 183.197.189.168:17806 GET /api/v1/logs 1.1 200 76 1918\n","stream":"stdout","time":"2025-01-20T11:30:27.574792124Z"}
{"log":"[2025-01-20 11:30:28 +0000] [1] [INFO] 183.197.189.168:17806 GET /api/v1/logs 1.1 200 76 1458\n","stream":"stdout","time":"2025-01-20T11:30:28.566429961Z"}
{"log":"[2025-01-20 11:30:29 +0000] [1] [INFO] 183.197.189.168:17806 GET /api/v1/logs 1.1 200 76 1766\n","stream":"stdout","time":"2025-01-20T11:30:29.561607819Z"}
{"log":"[2025-01-20 11:30:30 +0000] [1] [INFO] 183.197.189.168:17806 GET /api/v1/logs 1.1 200 76 1572\n","stream":"stdout","time":"2025-01-20T11:30:30.573765147Z"}
{"log":"[2025-01-20 11:30:31 +0000] [1] [INFO] 183.197.189.168:17806 GET /api/v1/logs 1.1 200 76 1252\n","stream":"stdout","time":"2025-01-20T11:30:31.568205997Z"}
{"log":"[2025-01-20 11:30:34 +0000] [1] [INFO] 183.197.189.168:17806 GET /api/v1/logs 1.1 200 76 1643\n","stream":"stdout","time":"2025-01-20T11:30:34.565599751Z"}

复现步骤

No response

启用的插件

No response

@tewhdn tewhdn added the bug? Bug或Bug修复相关 label Jan 20, 2025
@wangcham
Copy link
Collaborator

发一下langbot根目录里的data/logs/langbot-xxxx的详细日志信息

@doubleJazzCat
Copy link

没报错啥的, 16:29我改了一下!help的返回内容, 后面发消息就没回应了

[01-22 16:27:51.620] process.py (42) - [INFO] : 处理 group_xxxxxxxxxx 的请求(9): !help
[01-22 16:27:51.621] command.py (112) - [INFO] : 命令返回: LangBot...
[01-22 16:27:52.027] controller.py (189) - [ERROR] : 处理请求时出错 query_id=9 stage=SendResponseBackStage : 消息发送失败, 不允许发送url q.rkcn.top
[01-22 16:29:01.539] app.py (176) - [INFO] : 执行热重载 scope=platform
[01-22 16:29:01.540] manager.py (68) - [INFO] : 初始化平台适配器 0: qq-botpy
[01-22 16:29:01.541] qqbotpy.py (590) - [INFO] : 运行 QQ 官方适配器
[01-22 16:29:19.636] process.py (42) - [INFO] : 处理 group_xxxxxxxxxx 的请求(10): !help
[01-22 16:29:19.636] command.py (112) - [INFO] : 命令返回: LangBot运行中...
[01-22 18:07:57.379] app.py (176) - [INFO] : 执行热重载 scope=platform
[01-22 18:07:57.380] manager.py (68) - [INFO] : 初始化平台适配器 0: qq-botpy
[01-22 18:07:57.381] qqbotpy.py (590) - [INFO] : 运行 QQ 官方适配器

@wangcham
Copy link
Collaborator

目前有其他人也出现这样的问题,都是没有报错但是不返回信息。我们已经知道QQ官方正在将ws迁往webhook协议,所以最近正在重写,到时候会发一个新版本会解决。

@RockChinQ RockChinQ added m: Platform 消息接收或发送的顶层操作模块 IM: qq-botpy QQ 官方 API 协议适配器相关 labels Jan 22, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug? Bug或Bug修复相关 IM: qq-botpy QQ 官方 API 协议适配器相关 m: Platform 消息接收或发送的顶层操作模块
Projects
None yet
Development

No branches or pull requests

4 participants