mamoe / mirai

高效率 QQ 机器人支持库
https://mirai.mamoe.net
GNU Affero General Public License v3.0
14.48k stars 2.54k forks source link

在 GroupImpl 时遇到了意料之中的问题. #1977

Open xiaoyv404 opened 2 years ago

xiaoyv404 commented 2 years ago

问题描述

ContextualBugReportException(message=在 GroupImpl 时遇到了意料之中的问题. 请完整复制此日志提交给 mirai: https://github.com/mamoe/mirai/issues/new/choose   并告知此时 Bot 是否为群管理员或群主, 和是否刚刚加入或离开这个群 调试信息: groupId: 1017185082
groupUin: 1017185082
membersCount: 750
botId: 2079373402
owner: 847142713, cause=null)
ContextualBugReportException(message=在 GroupImpl 时遇到了意料之中的问题. 请完整复制此日志提交给 mirai: https://github.com/mamoe/mirai/issues/new/choose   并告知此时 Bot 是否为群管理员或群主, 和是否刚刚加入或离开这个群 调试信息: groupId: 1017185082
groupUin: 1017185082
membersCount: 750
botId: 2079373402
owner: 847142713, cause=null)
        at net.mamoe.mirai.internal.message.ContextualBugReportExceptionKt.contextualBugReportException(contextualBugReportException.kt:26)
        at net.mamoe.mirai.internal.message.ContextualBugReportExceptionKt.contextualBugReportException$default(contextualBugReportException.kt:20)
        at net.mamoe.mirai.internal.contact.GroupImplKt.GroupImpl(GroupImpl.kt:96)
        at net.mamoe.mirai.internal.network.components.ContactUpdaterImpl.addGroupToBot(ContactUpdater.kt:212)
        at net.mamoe.mirai.internal.network.components.ContactUpdaterImpl.access$addGroupToBot(ContactUpdater.kt:74)
        at net.mamoe.mirai.internal.network.components.ContactUpdaterImpl$addGroupToBot$1.invokeSuspend(ContactUpdater.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:571)
        at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.executeTask(CoroutineScheduler.kt:750)
        at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.runWorker(CoroutineScheduler.kt:678)
        at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.run(CoroutineScheduler.kt:665)

复现

当我启动mcl时,在 Login successful. 后控制台提示我前来发送 Issue

mirai-core 版本

v2.11.0-M2.2

bot-protocol

ANDROID_PHONE

其他组件版本

No response

系统日志

No response

网络日志

No response

补充信息

Bot并不是管理员或群主,也没有刚刚离开或加入这个群

CauchyDOOM commented 2 years ago
ContextualBugReportException(message=在 GroupImpl 时遇到了意料之中的问题. 请完整复制此日志提交给 mirai: https://github.com/mamoe/mirai/issues/new/choose    并告知此时 Bot 是否为群管理员或群主, 和是否刚刚加入或离开这个群 调试信息: groupId: 855211009
groupUin: 855211009
membersCount: 0
botId: 2914377162
owner: null, cause=null)
        at net.mamoe.mirai.internal.message.ContextualBugReportExceptionKt.contextualBugReportException(contextualBugReportException.kt:26)
        at net.mamoe.mirai.internal.message.ContextualBugReportExceptionKt.contextualBugReportException$default(contextualBugReportException.kt:20)
        at net.mamoe.mirai.internal.contact.GroupImplKt.GroupImpl(GroupImpl.kt:94)
        at net.mamoe.mirai.internal.network.components.ContactUpdaterImpl.addGroupToBot(ContactUpdater.kt:214)
        at net.mamoe.mirai.internal.network.components.ContactUpdaterImpl.access$addGroupToBot(ContactUpdater.kt:72)
        at net.mamoe.mirai.internal.network.components.ContactUpdaterImpl$addGroupToBot$1.invokeSuspend(ContactUpdater.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:749)
        at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.runWorker(CoroutineScheduler.kt:677)
        at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.run(CoroutineScheduler.kt:664)

同样的问题 v2.11.1 ANDROID_PAD Bot并不是管理员或群主,也没有刚刚离开或加入这个群

xszqxszq commented 2 years ago
2022-08-02 08:40:05 E/Group: ContextualBugReportException(message=在 GroupImpl 时遇到了意料之中的问题. 请完整复制此日志提交给 mirai: https://github.com/mamoe/mirai/issues/new/choose   并告知此时 Bot 是否为群管理员或群主, 和是否刚刚加入或离开这个群 调试信息: groupId: 46*******
groupUin: 3957594935
membersCount: 0
botId: 23********
owner: null, cause=null)
ContextualBugReportException(message=在 GroupImpl 时遇到了意料之中的问题. 请完整复制此日志提交给 mirai: https://github.com/mamoe/mirai/issues/new/choose   并告知此时 Bot 是否为群管理员或群主, 和是否刚刚加入或离开这个群 调试信息: groupId: 46*******
groupUin: 3957594935
membersCount: 0
botId: 23********
owner: null, cause=null)
    at net.mamoe.mirai.internal.message.ContextualBugReportExceptionKt.contextualBugReportException(contextualBugReportException.kt:26)
    at net.mamoe.mirai.internal.message.ContextualBugReportExceptionKt.contextualBugReportException$default(contextualBugReportException.kt:20)
    at net.mamoe.mirai.internal.contact.GroupImplKt.GroupImpl(GroupImpl.kt:101)
    at net.mamoe.mirai.internal.network.components.ContactUpdaterImpl.addGroupToBot(ContactUpdater.kt:214)
    at net.mamoe.mirai.internal.network.components.ContactUpdaterImpl.access$addGroupToBot(ContactUpdater.kt:72)
    at net.mamoe.mirai.internal.network.components.ContactUpdaterImpl$addGroupToBot$1.invokeSuspend(ContactUpdater.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:749)
    at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.runWorker(CoroutineScheduler.kt:677)
    at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.run(CoroutineScheduler.kt:664)

2022-08-02 08:40:05 V/Bot.2319455189: Event: BotOnlineEvent(bot=Bot(23********))
2022-08-02 08:40:05 I/Bot.2319455189: Bot login successful.

在RunTerminal.kt登了两个号,另一个号没有问题 v2.12.0,ANDROID_PHONE,Bot并不是管理员或群主,也没有刚刚离开或加入这个群,群是16年的冷了很久了,实际群人数16