NapNeko / NapCatQQ

现代化的基于 NTQQ 的 Bot 协议端实现
https://napcat.napneko.icu
Other
2.67k stars 196 forks source link

[BUG] reverseWs模式发送oneBot11的信息格式,返回不支持的api #252

Closed yanXiaoi closed 3 months ago

yanXiaoi commented 3 months ago

系统版本

Windows 11 专业版 21H2 22000.2538

QQNT 版本

9.9.12-25493

NapCat 版本

V2.0.19

OneBot 客户端

Websocket

发生了什么?

使用 reverseWs 连接: 配置如下: {"musicSignUrl":"","enableLocalFile2Url":true,"heartInterval":30000,"debug":true,"messagePostFormat":"string","http":{"port":3000,"enablePost":false,"enable":false,"host":"","enableHeart":false,"secret":"","postUrls":[]},"reverseWs":{"urls":["ws://127.0.0.1:15803"],"enable":true},"reportSelfMessage":false,"ws":{"port":3001,"enable":false,"host":""},"GroupLocalTime":{"RecordList":[],"Record":false},"token":""}

napcat日志: 2024-08-14 15:23:30 [DEBUG] AI(3226746400) | [OneBot] [WebSocket Client] 收到正向Websocket消息 {"action":"send_private_msg","echo":2,"params":{"access_token":"aabbcc","aoto_escape":true,"message":"AI 已上线!","user_id":xxxxxxxxx}}

返回数据:{"echo":2,"message":"不支持的api send_private_msg","wording":"不支持的api send_private_msg","status":"failed","retcode":1404}

send_msg 也不行,之前的非侵入式的版本是可以的

如何复现

配置{"musicSignUrl":"","enableLocalFile2Url":true,"heartInterval":30000,"debug":true,"messagePostFormat":"string","http":{"port":3000,"enablePost":false,"enable":false,"host":"","enableHeart":false,"secret":"","postUrls":[]},"reverseWs":{"urls":["ws://127.0.0.1:15803"],"enable":true},"reportSelfMessage":false,"ws":{"port":3001,"enable":false,"host":""},"GroupLocalTime":{"RecordList":[],"Record":false},"token":""}

期望的结果?

发送信息,返回正常结果

NapCat 运行日志

2024-08-14 15:22:55 [DEBUG] AI(xxxxxxx) | [OneBot] [WebSocket Client] 收到正向Websocket消息 {"action":"get_login_info","echo":0} 
2024-08-14 15:23:30 [DEBUG] AI(xxxxxxx) | [OneBot] [WebSocket Client] 收到正向Websocket消息 {"action":"get_login_info","echo":1} 
2024-08-14 15:23:30 [DEBUG] AI(xxxxxxx) | [OneBot] [WebSocket Client] 收到正向Websocket消息 {"action":"send_private_msg","echo":2,"params":{"access_token":"aabbcc","aoto_escape":true,"message":"AI 已上线!","user_id":xxxxxxx}}

OneBot 客户端运行日志

15:23:30 scheduling-1 ERROR - 发送消息失败!
java.lang.RuntimeException: {"echo":2,"message":"不支持的api send_private_msg","wording":"不支持的api send_private_msg","status":"failed","retcode":1404}
MliKiowa commented 3 months ago

可以来群里调试吗

MliKiowa commented 3 months ago

提高QQ版本对了

yanXiaoi commented 3 months ago

官网下载最新QQ后恢复正常