MrXiaoM / Overflow

替换 mirai 实现为 Onebot 以进行无缝迁移
https://mirai.mrxiaom.top
GNU Affero General Public License v3.0
346 stars 24 forks source link

解除全员禁言会直接导致overflow死机 #100

Open PandaLinker opened 2 months ago

PandaLinker commented 2 months ago

问题描述

解除全员禁言会得到member0导致overflow直接死机

复现

解除全员禁言

Overflow 版本

d6669df和7eee8b5均复现

其他组件版本

natcap2.5.4

系统日志

2024-09-18 07:29:59 W/Onebot: 请求失败: [get_group_member_info] 请求失败: app=NapCat.Onebot v2.5.4, message=Error: Uin2Uid Error 0不存在
    at GetGroupMemberInfo._handle (file:///opt/QQ/resources/app/app_launcher/napcat/napcat.mjs:36585:21)
    at async GetGroupMemberInfo.websocketHandle (file:///opt/QQ/resources/app/app_launcher/napcat/napcat.mjs:35942:23)
    at async OB11PassiveWebSocketAdapter.handleMessage (file:///opt/QQ/resources/app/app_launcher/napcat/napcat.mjs:13385:21), retJson={"status":"failed","retcode":1200,"data":null,"message":"Error: Uin2Uid Error 0不存在\n    at GetGroupMemberInfo._handle (file:///opt/QQ/resources/app/app_launcher/napcat/napcat.mjs:36585:21)\n    at async GetGroupMemberInfo.websocketHandle (file:///opt/QQ/resources/app/app_launcher/napcat/napcat.mjs:35942:23)\n    at async OB11PassiveWebSocketAdapter.handleMessage (file:///opt/QQ/resources/app/app_launcher/napcat/napcat.mjs:13385:21)","wording":"Error: Uin2Uid Error 0不存在\n    at GetGroupMemberInfo._handle (file:///opt/QQ/resources/app/app_launcher/napcat/napcat.mjs:36585:21)\n    at async GetGroupMemberInfo.websocketHandle (file:///opt/QQ/resources/app/app_launcher/napcat/napcat.mjs:35942:23)\n    at async OB11PassiveWebSocketAdapter.handleMessage (file:///opt/QQ/resources/app/app_launcher/napcat/napcat.mjs:13385:21)","echo":148}。如果你认为这是 Overflow 的问题,请带上 logs/onebot 中的日志来反馈。
2024-09-18 07:29:59 W/stderr: Exception in thread "DefaultDispatcher-worker-2" java.lang.IllegalStateException: 无法找到群 ******** 的成员 0
2024-09-18 07:29:59 W/stderr:   at top.mrxiaom.overflow.internal.listener.GroupBanNoticeListener.onMessage(group.kt:245)
2024-09-18 07:29:59 W/stderr:   at top.mrxiaom.overflow.internal.listener.GroupBanNoticeListener$onMessage$1.invokeSuspend(group.kt)
2024-09-18 07:29:59 W/stderr:   at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33)
2024-09-18 07:29:59 W/stderr:   at kotlinx.coroutines.internal.ScopeCoroutine.afterResume(Scopes.kt:33)
2024-09-18 07:29:59 W/stderr:   at kotlinx.coroutines.AbstractCoroutine.resumeWith(AbstractCoroutine.kt:102)
2024-09-18 07:29:59 W/stderr:   at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:46)
2024-09-18 07:29:59 W/stderr:   at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:106)
2024-09-18 07:29:59 W/stderr:   at kotlinx.coroutines.scheduling.CoroutineScheduler.runSafely(CoroutineScheduler.kt:570)
2024-09-18 07:29:59 W/stderr:   at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.executeTask(CoroutineScheduler.kt:750)
2024-09-18 07:29:59 W/stderr:   at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.runWorker(CoroutineScheduler.kt:677)
2024-09-18 07:29:59 W/stderr:   at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.run(CoroutineScheduler.kt:664)
2024-09-18 07:29:59 W/stderr:   Suppressed: kotlinx.coroutines.DiagnosticCoroutineContextException: [CoroutineName(ConnectFactory), StandaloneCoroutine{Cancelling}@42d9aa93, Dispatchers.Default]

网络日志

2024-09-18 07:29:59 D/Onebot: [Send] --> {"action":"get_group_member_info","params":{"group_id":*******,"user_id":0,"no_cache":false},"echo":148}
2024-09-18 07:29:59 D/Onebot: [Recv] <-- {"status":"failed","retcode":1200,"data":null,"message":"Error: Uin2Uid Error 0不存在\n    at GetGroupMemberInfo._handle (file:///opt/QQ/resources/app/app_launcher/napcat/napcat.mjs:36585:21)\n    at async GetGroupMemberInfo.websocketHandle (file:///opt/QQ/resources/app/app_launcher/napcat/napcat.mjs:35942:23)\n    at async OB11PassiveWebSocketAdapter.handleMessage (file:///opt/QQ/resources/app/app_launcher/napcat/napcat.mjs:13385:21)","wording":"Error: Uin2Uid Error 0不存在\n    at GetGroupMemberInfo._handle (file:///opt/QQ/resources/app/app_launcher/napcat/napcat.mjs:36585:21)\n    at async GetGroupMemberInfo.websocketHandle (file:///opt/QQ/resources/app/app_launcher/napcat/napcat.mjs:35942:23)\n    at async OB11PassiveWebSocketAdapter.handleMessage (file:///opt/QQ/resources/app/app_launcher/napcat/napcat.mjs:13385:21)","echo":148}
2024-09-18 07:29:59 W/Onebot: 请求失败: [get_group_member_info] 请求失败: app=NapCat.Onebot v2.5.4, message=Error: Uin2Uid Error 0不存在
    at GetGroupMemberInfo._handle (file:///opt/QQ/resources/app/app_launcher/napcat/napcat.mjs:36585:21)
    at async GetGroupMemberInfo.websocketHandle (file:///opt/QQ/resources/app/app_launcher/napcat/napcat.mjs:35942:23)
    at async OB11PassiveWebSocketAdapter.handleMessage (file:///opt/QQ/resources/app/app_launcher/napcat/napcat.mjs:13385:21), retJson={"status":"failed","retcode":1200,"data":null,"message":"Error: Uin2Uid Error 0不存在\n    at GetGroupMemberInfo._handle (file:///opt/QQ/resources/app/app_launcher/napcat/napcat.mjs:36585:21)\n    at async GetGroupMemberInfo.websocketHandle (file:///opt/QQ/resources/app/app_launcher/napcat/napcat.mjs:35942:23)\n    at async OB11PassiveWebSocketAdapter.handleMessage (file:///opt/QQ/resources/app/app_launcher/napcat/napcat.mjs:13385:21)","wording":"Error: Uin2Uid Error 0不存在\n    at GetGroupMemberInfo._handle (file:///opt/QQ/resources/app/app_launcher/napcat/napcat.mjs:36585:21)\n    at async GetGroupMemberInfo.websocketHandle (file:///opt/QQ/resources/app/app_launcher/napcat/napcat.mjs:35942:23)\n    at async OB11PassiveWebSocketAdapter.handleMessage (file:///opt/QQ/resources/app/app_launcher/napcat/napcat.mjs:13385:21)","echo":148}。如果你认为这是 Overflow 的问题,请带上 logs/onebot 中的日志来反馈。
2024-09-18 07:29:59 V/Onebot: Stacktrace: 
cn.evolvefield.onebot.client.util.ActionFailedException: 请求失败: app=NapCat.Onebot v2.5.4, message=Error: Uin2Uid Error 0不存在
    at GetGroupMemberInfo._handle (file:///opt/QQ/resources/app/app_launcher/napcat/napcat.mjs:36585:21)
    at async GetGroupMemberInfo.websocketHandle (file:///opt/QQ/resources/app/app_launcher/napcat/napcat.mjs:35942:23)
    at async OB11PassiveWebSocketAdapter.handleMessage (file:///opt/QQ/resources/app/app_launcher/napcat/napcat.mjs:13385:21), retJson={"status":"failed","retcode":1200,"data":null,"message":"Error: Uin2Uid Error 0不存在\n    at GetGroupMemberInfo._handle (file:///opt/QQ/resources/app/app_launcher/napcat/napcat.mjs:36585:21)\n    at async GetGroupMemberInfo.websocketHandle (file:///opt/QQ/resources/app/app_launcher/napcat/napcat.mjs:35942:23)\n    at async OB11PassiveWebSocketAdapter.handleMessage (file:///opt/QQ/resources/app/app_launcher/napcat/napcat.mjs:13385:21)","wording":"Error: Uin2Uid Error 0不存在\n    at GetGroupMemberInfo._handle (file:///opt/QQ/resources/app/app_launcher/napcat/napcat.mjs:36585:21)\n    at async GetGroupMemberInfo.websocketHandle (file:///opt/QQ/resources/app/app_launcher/napcat/napcat.mjs:35942:23)\n    at async OB11PassiveWebSocketAdapter.handleMessage (file:///opt/QQ/resources/app/app_launcher/napcat/napcat.mjs:13385:21)","echo":148}
    at cn.evolvefield.onebot.client.util.ActionSendRequest.send(ActionSendRequest.kt:67)
    at cn.evolvefield.onebot.client.util.ActionSendRequest$send$1.invokeSuspend(ActionSendRequest.kt)
    at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33)
    at kotlinx.coroutines.internal.ScopeCoroutine.afterResume(Scopes.kt:33)
    at kotlinx.coroutines.AbstractCoroutine.resumeWith(AbstractCoroutine.kt:102)
    at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:46)
    at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:106)
    at kotlinx.coroutines.scheduling.CoroutineScheduler.runSafely(CoroutineScheduler.kt:570)
    at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.executeTask(CoroutineScheduler.kt:750)
    at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.runWorker(CoroutineScheduler.kt:677)
    at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.run(CoroutineScheduler.kt:664)

补充信息

No response

kagg886 commented 2 days ago

fixed by #110 仅保证发送失败后overflow可以继续处理链接(