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

cannot find member for OnlineMessageSourceFromGroupImpl #2277

Closed
MrY-Cat opened this issue Oct 15, 2022 · 12 comments · Fixed by #2513
Closed

cannot find member for OnlineMessageSourceFromGroupImpl #2277

MrY-Cat opened this issue Oct 15, 2022 · 12 comments · Fixed by #2513
Labels
s:core 子系统: mirai-core t:bug 类型: bug

Comments

@MrY-Cat
Copy link
Contributor

MrY-Cat commented Oct 15, 2022

问题描述

事情是这样:某位群员16:12发送了一句广告,随后多次发送,机器人有记录消息后随机复读消息的功能,在16:29踢出那位群员后,16:36机器人随机到了那位群员的消息,但sendMessage时失败(找不到消息source的成员)。
image
image

按理说他虽然被踢了但是他之前发的消息应该是存在的呀,莫非说群员被踢了,他的消息就不能复读了

复现

本地缓存存储一位群成员的消息,在群成员被踢后向该群发送该消息。

mirai-core 版本

2.13.0-RC

bot-protocol

ANDROID_PAD

其他组件版本

No response

系统日志

2022-10-15 16:36:00 E/Bot.2305339556: java.lang.IllegalStateException: Exception while broadcasting event 'GroupMessageEvent'
java.lang.IllegalStateException: Exception while broadcasting event 'GroupMessageEvent'
	at net.mamoe.mirai.internal.network.components.EventDispatcherImpl.broadcast$suspendImpl(EventDispatcher.kt:104)
	at net.mamoe.mirai.internal.network.components.EventDispatcherImpl.broadcast(EventDispatcher.kt)
	at net.mamoe.mirai.internal.network.components.EventDispatcherImpl$broadcastAsync$job$1.invokeSuspend(EventDispatcher.kt:113)
	at net.mamoe.mirai.internal.network.components.EventDispatcherImpl$broadcastAsync$job$1.invoke(EventDispatcher.kt)
	at net.mamoe.mirai.internal.network.components.EventDispatcherImpl$broadcastAsync$job$1.invoke(EventDispatcher.kt)
	at kotlinx.coroutines.intrinsics.UndispatchedKt.startCoroutineUndispatched(Undispatched.kt:55)
	at kotlinx.coroutines.CoroutineStart.invoke(CoroutineStart.kt:112)
	at kotlinx.coroutines.AbstractCoroutine.start(AbstractCoroutine.kt:126)
	at kotlinx.coroutines.BuildersKt__Builders_commonKt.launch(Builders.common.kt:56)
	at kotlinx.coroutines.BuildersKt.launch(Unknown Source)
	at net.mamoe.mirai.internal.network.components.EventDispatcherImpl.broadcastAsync-kKe4JaQ(EventDispatcher.kt:110)
	at net.mamoe.mirai.internal.network.components.EventDispatcher.broadcastAsync-kKe4JaQ$default(EventDispatcher.kt:35)
	at net.mamoe.mirai.internal.network.components.EventBroadcasterPacketHandler.impl(PacketHandler.kt:87)
	at net.mamoe.mirai.internal.network.components.EventBroadcasterPacketHandler.handlePacket(PacketHandler.kt:73)
	at net.mamoe.mirai.internal.network.components.PacketHandlerChain.handlePacket(PacketHandler.kt:42)
	at net.mamoe.mirai.internal.network.handler.NetworkHandlerSupport$collectReceived$3.invokeSuspend(NetworkHandlerSupport.kt:108)
	at net.mamoe.mirai.internal.network.handler.NetworkHandlerSupport$collectReceived$3.invoke(NetworkHandlerSupport.kt)
	at net.mamoe.mirai.internal.network.handler.NetworkHandlerSupport$collectReceived$3.invoke(NetworkHandlerSupport.kt)
	at kotlinx.coroutines.intrinsics.UndispatchedKt.startCoroutineUndispatched(Undispatched.kt:55)
	at kotlinx.coroutines.CoroutineStart.invoke(CoroutineStart.kt:112)
	at kotlinx.coroutines.AbstractCoroutine.start(AbstractCoroutine.kt:126)
	at kotlinx.coroutines.BuildersKt__Builders_commonKt.launch(Builders.common.kt:56)
	at kotlinx.coroutines.BuildersKt.launch(Unknown Source)
	at kotlinx.coroutines.BuildersKt__Builders_commonKt.launch$default(Builders.common.kt:47)
	at kotlinx.coroutines.BuildersKt.launch$default(Unknown Source)
	at net.mamoe.mirai.internal.network.handler.NetworkHandlerSupport.collectReceived$mirai_core(NetworkHandlerSupport.kt:106)
	at net.mamoe.mirai.internal.network.handler.CommonNetworkHandler$PacketDecodePipeline.processBody(CommonNetworkHandler.kt:160)
	at net.mamoe.mirai.internal.network.handler.CommonNetworkHandler$PacketDecodePipeline.access$processBody(CommonNetworkHandler.kt:102)
	at net.mamoe.mirai.internal.network.handler.CommonNetworkHandler$PacketDecodePipeline$1$3$1.invokeSuspend(CommonNetworkHandler.kt:126)
	at net.mamoe.mirai.internal.network.handler.CommonNetworkHandler$PacketDecodePipeline$1$3$1.invoke(CommonNetworkHandler.kt)
	at net.mamoe.mirai.internal.network.handler.CommonNetworkHandler$PacketDecodePipeline$1$3$1.invoke(CommonNetworkHandler.kt)
	at kotlinx.coroutines.intrinsics.UndispatchedKt.startCoroutineUndispatched(Undispatched.kt:55)
	at kotlinx.coroutines.CoroutineStart.invoke(CoroutineStart.kt:112)
	at kotlinx.coroutines.AbstractCoroutine.start(AbstractCoroutine.kt:126)
	at kotlinx.coroutines.BuildersKt__Builders_commonKt.launch(Builders.common.kt:56)
	at kotlinx.coroutines.BuildersKt.launch(Unknown Source)
	at kotlinx.coroutines.BuildersKt__Builders_commonKt.launch$default(Builders.common.kt:47)
	at kotlinx.coroutines.BuildersKt.launch$default(Unknown Source)
	at net.mamoe.mirai.internal.network.handler.CommonNetworkHandler$PacketDecodePipeline$1.invokeSuspend(CommonNetworkHandler.kt:126)
	at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33)
	at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:106)
	at io.netty.util.concurrent.AbstractEventExecutor.safeExecute$$$capture(AbstractEventExecutor.java:164)
	at io.netty.util.concurrent.AbstractEventExecutor.safeExecute(AbstractEventExecutor.java)
	at io.netty.util.concurrent.SingleThreadEventExecutor.runAllTasks(SingleThreadEventExecutor.java:472)
	at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:500)
	at io.netty.util.concurrent.SingleThreadEventExecutor$4.run(SingleThreadEventExecutor.java:989)
	at io.netty.util.internal.ThreadExecutorMap$2.run(ThreadExecutorMap.java:74)
	at io.netty.util.concurrent.FastThreadLocalRunnable.run(FastThreadLocalRunnable.java:30)
	at java.base/java.lang.Thread.run(Thread.java:829)
Caused by: java.lang.IllegalStateException: cannot find member for OnlineMessageSourceFromGroupImpl. msg=[Msg#1438235654 {
            contentHead=ContentHead#64049741 {
                    divSeq=0x00006C5E(27742)
                    pkgNum=0x00000001(1)
            }
            msgBody=MsgBody#1836746531 {
                    richText=RichText#1060593443 {
                            attr=Attr#1370697595 {
                                    charSet=0x00000086(134)
                                    fontName=微软雅黑
                                    random=0x87C80AAA(-2016933206)
                                    size=0x0000000A(10)
                                    time=0x634A6B6E(1665821550)
                            }
                            elems=[Elem#308610430 {
                                    text=Text#436593629 {
                                            attr6Buf=00 01 00 00 00 0C 00 65 9D 73 09 00 00
                                            str=@大米来啦プラスPLUS
                                    }
                            }, Elem#308610430 {
                                    text=Text#436593629 {
                                            str=你伽我一下
                                    }
                            }, Elem#308610430 {
                                    generalFlags=GeneralFlags#1029416556 {
                                            pbReserve=08 04 20 CB 50 78 80 80 04 C8 01 00 F0 01 00 F8 01 00 90 02 00 98 03 00 A0 03 00 B0 03 00 C0 03 00 D0 03 00 E8 03 00 8A 04 02 10 02 90 04 80 C1 80 80 06 B8 04 00 C0 04 00 CA 04 02 10 00 F8 04 8C 80 08 88 05 00
                                    }
                            }, Elem#308610430 {
                                    elemFlags2=ElemFlags2#839459072 {
                                            insts=[]
                                            msgRptCnt=0x00000001(1)
                                    }
                            }, Elem#308610430 {
                                    extraInfo=ExtraInfo#1037725708 {
                                            groupMask=0x00000003(3)
                                            level=0x00000001(1)
                                            nick=南栀
                                    }
                            }]
                    }
            }
            msgHead=MsgHead#1870528232 {
                    fromAppid=0x00000001(1)
                    fromInstid=0x00000001(1)
                    fromUin=0x000000006A303D7C(1781546364)
                    groupInfo=GroupInfo#663823529 {
                            groupCard=南栀
                            groupCardType=0x00000002(2)
                            groupCode=0x000000003D3E39E5(1027488229)
                            groupInfoSeq=0x00000000000170C6(94406)
                            groupLevel=0x00000001(1)
                            groupName=E5 A4 8D E8 AF BB E5 96 B5 E6 98 9F E7 90 83 E5 AE 98 E6 96 B9 E7 BE A4
                            groupType=0x00000001(1)
                    }
                    isSrcMsg=false
                    msgSeq=0x000510AC(331948)
                    msgTime=0x634A6B82(1665821570)
                    msgType=0x00000052(82)
                    msgUid=0x0100000087C80AAA(72057596315962026)
                    toUin=0x000000008968B0A4(2305339556)
            }
    }]
	at net.mamoe.mirai.internal.message.source.OnlineMessageSourceFromGroupImpl$sender$2.invoke(incomingSourceImpl.kt:225)
	at net.mamoe.mirai.internal.message.source.OnlineMessageSourceFromGroupImpl$sender$2.invoke(incomingSourceImpl.kt:218)
	at kotlin.SynchronizedLazyImpl.getValue(LazyJVM.kt:74)
	at net.mamoe.mirai.internal.message.source.OnlineMessageSourceFromGroupImpl.getSender(incomingSourceImpl.kt:218)
	at net.mamoe.mirai.internal.message.source.OnlineMessageSourceFromGroupImpl.getSender(incomingSourceImpl.kt:186)
	at net.mamoe.mirai.message.data.OnlineMessageSource$Incoming.getFromId(MessageSource.kt:559)
	at net.mamoe.mirai.message.data.OnlineMessageSource$Incoming$FromGroup.toString(MessageSource.kt:615)
	at net.mamoe.mirai.internal.utils.TypeKt.estimateLength(type.kt:46)
	at net.mamoe.mirai.internal.utils.TypeKt.estimateLength(type.kt:35)
	at net.mamoe.mirai.internal.message.protocol.outgoing.OutgoingMessagePipelineContext.verifyLength(OutgoingMessagePipeline.kt:94)
	at net.mamoe.mirai.internal.message.protocol.impl.LongMessageProtocol.convertToLongMessageIfNeeded(LongMessageProtocol.kt:72)
	at net.mamoe.mirai.internal.message.protocol.impl.LongMessageProtocol.access$convertToLongMessageIfNeeded(LongMessageProtocol.kt:31)
	at net.mamoe.mirai.internal.message.protocol.impl.LongMessageProtocol$collectProcessorsImpl$1.process(LongMessageProtocol.kt:35)
	at net.mamoe.mirai.internal.message.protocol.outgoing.OutgoingMessageProcessorAdapter.process(OutgoingMessagePipelineProcessor.kt:26)
	at net.mamoe.mirai.internal.message.protocol.outgoing.OutgoingMessageProcessorAdapter.process(OutgoingMessagePipelineProcessor.kt:20)
	at net.mamoe.mirai.internal.pipeline.AbstractProcessorPipeline.process$suspendImpl(ProcessorPipeline.kt:256)
	at net.mamoe.mirai.internal.pipeline.AbstractProcessorPipeline.process(ProcessorPipeline.kt)
	at net.mamoe.mirai.internal.message.protocol.MessageProtocolFacadeImpl.preprocessAndSendOutgoingImpl(MessageProtocolFacade.kt:340)
	at net.mamoe.mirai.internal.message.protocol.MessageProtocolFacadeImpl.preprocessAndSendOutgoing(MessageProtocolFacade.kt:325)
	at net.mamoe.mirai.internal.message.protocol.MessageProtocolFacade$INSTANCE.preprocessAndSendOutgoing(MessageProtocolFacade.kt)
	at net.mamoe.mirai.internal.contact.AbstractUserKt.sendMessageImpl(AbstractUser.kt:263)
	at net.mamoe.mirai.internal.contact.CommonGroupImpl.sendMessage$suspendImpl(GroupImpl.kt:203)
	at net.mamoe.mirai.internal.contact.CommonGroupImpl.sendMessage(GroupImpl.kt)
	at org.mirai.cat.plugin.PluginMain$onEnable$3.invokeSuspend(PluginMain.kt:2513)
	at org.mirai.cat.plugin.PluginMain$onEnable$3.invoke(PluginMain.kt)
	at org.mirai.cat.plugin.PluginMain$onEnable$3.invoke(PluginMain.kt)
	at net.mamoe.mirai.event.EventChannel$subscribeAlways$1.invokeSuspend(EventChannel.kt:506)
	at net.mamoe.mirai.event.EventChannel$subscribeAlways$1.invoke(EventChannel.kt)
	at net.mamoe.mirai.event.EventChannel$subscribeAlways$1.invoke(EventChannel.kt)
	at net.mamoe.mirai.internal.event.SafeListener$onEvent$2.invokeSuspend(SafeListener.kt:58)
	at net.mamoe.mirai.internal.event.SafeListener$onEvent$2.invoke(SafeListener.kt)
	at net.mamoe.mirai.internal.event.SafeListener$onEvent$2.invoke(SafeListener.kt)
	at kotlinx.coroutines.intrinsics.UndispatchedKt.startUndispatchedOrReturn(Undispatched.kt:89)
	at kotlinx.coroutines.BuildersKt__Builders_commonKt.withContext(Builders.common.kt:169)
	at kotlinx.coroutines.BuildersKt.withContext(Unknown Source)
	at net.mamoe.mirai.internal.event.SafeListener.onEvent(SafeListener.kt:58)
	at net.mamoe.mirai.internal.event.EventListeners.process(EventListeners.kt:120)
	at net.mamoe.mirai.internal.event.EventListeners.callListeners$mirai_core(EventListeners.kt:68)
	at net.mamoe.mirai.internal.event.EventChannelImpl.callListeners(EventChannelImpl.kt:85)
	at net.mamoe.mirai.internal.event.EventChannelImpl.broadcastEventImpl(EventChannelImpl.kt:75)
	at net.mamoe.mirai.internal.network.components.EventDispatcherImpl.broadcast$suspendImpl(EventDispatcher.kt:99)
	... 48 more

网络日志

No response

补充信息

有群友说可以去 PR 个 MemberExited(狗头

@Him188
Copy link
Member

Him188 commented Oct 15, 2022

发插件代码

@Him188 Him188 added the z:wait-for-reply 状态: 等待回复 label Oct 15, 2022
@MrY-Cat
Copy link
Contributor Author

MrY-Cat commented Oct 15, 2022

发插件代码

没有代码呀,我都没生成插件,源码跑的

@Keyezi
Copy link

Keyezi commented Oct 15, 2022

发插件代码

没有代码呀,我都没生成插件,源码跑的

1 similar comment
@Nekoer
Copy link
Contributor

Nekoer commented Oct 15, 2022

发插件代码

没有代码呀,我都没生成插件,源码跑的

@Him188
Copy link
Member

Him188 commented Oct 15, 2022

发源码

@MrY-Cat
Copy link
Contributor Author

MrY-Cat commented Oct 15, 2022

                    //3.5.引用艾特回复(引用艾特/引用含有复读喵)
                    if(message.any { (it is QuoteReply) && it.source.fromId == robotID } && (message.any { it == At(robotID) } || msgRemoveAt.contains("复读喵")))
                    {
                        var msgReply:MessageChain = buildMessageChain { }//构建一个message
                        val randStart:Int//随机数起点
                        val randEnd:Int  //随机数终点(不包括)
                        var randCount = 0   //条件不符时重复随机次数
                        if(groupMessageRecord[groupLocate].messageTotalCount>messageRecordSize)
                        {//消息超过messageRecordSize条时,使用最早的randomRereadCount条随机
                            randStart = groupMessageRecord[groupLocate].messageTotalCount
                            randEnd = groupMessageRecord[groupLocate].messageTotalCount+randomRereadCount
                        }
                        else
                        {//消息未超过messageRecordSize条时,从已有的消息中随机
                            randStart = 0
                            randEnd = groupMessageRecord[groupLocate].messageTotalCount
                        }
                        var randLocate = (randStart until randEnd).random()%messageRecordSize//随机一条
                        while(randCount<10)
                        {//最多随机10次
                            if(!groupMessageRecord[groupLocate].messageInfo[randLocate].any { (it is QuoteReply) && it.source.fromId == robotID })
                            {//直到随机到的消息不是引用回复复读喵
                                msgReply = groupMessageRecord[groupLocate].messageInfo[randLocate]
                                break
                            }
                            randLocate = (randStart until randEnd).random()%messageRecordSize
                            randCount++
                        }
                        if(msgReply == buildMessageChain { }) msgReply += PlainText("想和本喵说什么呀,请开始你的表演~")
                        msgReply = msgReply.filter { it != At(robotID) }.toMessageChain()  //去掉消息中艾特复读喵的部分
                        if(!msgReply.isContentBlank()) group.sendMessage(msgReply)//回复-----异常发生处---------
                        return@subscribeAlways
                    }

@MrY-Cat
Copy link
Contributor Author

MrY-Cat commented Oct 15, 2022

那个 groupMessageRecord[groupLocate] 就是一个存了那个群最近的message

@Him188 Him188 added s:core 子系统: mirai-core and removed z:wait-for-reply 状态: 等待回复 labels Oct 17, 2022
@MrY-Cat MrY-Cat changed the title 复读被踢的群成员的消息时发送异常 发送被踢的群成员的消息时发生异常 Nov 2, 2022
@MrY-Cat
Copy link
Contributor Author

MrY-Cat commented Dec 2, 2022

最近又多次发生这个异常

@MrY-Cat MrY-Cat changed the title 发送被踢的群成员的消息时发生异常 cannot find member for OnlineMessageSourceFromGroupImpl Dec 2, 2022
@MrY-Cat
Copy link
Contributor Author

MrY-Cat commented Dec 2, 2022

java.lang.IllegalStateException: cannot find member for OnlineMessageSourceFromGroupImpl. msg=[net.mamoe.mirai.internal.network.protocol.data.proto.MsgComm$Msg@59d294ee]
at net.mamoe.mirai.internal.message.source.OnlineMessageSourceFromGroupImpl$sender$2.invoke(incomingSourceImpl.kt:225)
at net.mamoe.mirai.internal.message.source.OnlineMessageSourceFromGroupImpl$sender$2.invoke(incomingSourceImpl.kt:218)
at kotlin.SynchronizedLazyImpl.getValue(LazyJVM.kt:74)
at net.mamoe.mirai.internal.message.source.OnlineMessageSourceFromGroupImpl.getSender(incomingSourceImpl.kt:218)
at net.mamoe.mirai.internal.message.source.OnlineMessageSourceFromGroupImpl.getSender(incomingSourceImpl.kt:186)
at net.mamoe.mirai.message.data.OnlineMessageSource$Incoming.getFromId(MessageSource.kt:559)
at net.mamoe.mirai.message.data.OnlineMessageSource$Incoming$FromGroup.toString(MessageSource.kt:615)
at net.mamoe.mirai.internal.utils.TypeKt.estimateLength(type.kt:46)
at net.mamoe.mirai.internal.utils.TypeKt.estimateLength(type.kt:35)
at net.mamoe.mirai.internal.message.protocol.outgoing.OutgoingMessagePipelineContext.verifyLength(OutgoingMessagePipeline.kt:94)
at net.mamoe.mirai.internal.message.protocol.impl.LongMessageProtocol.convertToLongMessageIfNeeded(LongMessageProtocol.kt:72)
at net.mamoe.mirai.internal.message.protocol.impl.LongMessageProtocol.access$convertToLongMessageIfNeeded(LongMessageProtocol.kt:31)
at net.mamoe.mirai.internal.message.protocol.impl.LongMessageProtocol$collectProcessorsImpl$1.process(LongMessageProtocol.kt:35)
at net.mamoe.mirai.internal.message.protocol.outgoing.OutgoingMessageProcessorAdapter.process(OutgoingMessagePipelineProcessor.kt:26)
at net.mamoe.mirai.internal.message.protocol.outgoing.OutgoingMessageProcessorAdapter.process(OutgoingMessagePipelineProcessor.kt:20)
at net.mamoe.mirai.internal.pipeline.AbstractProcessorPipeline.process$suspendImpl(ProcessorPipeline.kt:258)
at net.mamoe.mirai.internal.pipeline.AbstractProcessorPipeline.process(ProcessorPipeline.kt)
at net.mamoe.mirai.internal.message.protocol.MessageProtocolFacadeImpl.preprocessAndSendOutgoingImpl(MessageProtocolFacade.kt:341)
at net.mamoe.mirai.internal.message.protocol.MessageProtocolFacadeImpl.preprocessAndSendOutgoing(MessageProtocolFacade.kt:326)
at net.mamoe.mirai.internal.message.protocol.MessageProtocolFacade$INSTANCE.preprocessAndSendOutgoing(MessageProtocolFacade.kt)
at net.mamoe.mirai.internal.contact.AbstractUserKt.sendMessageImpl(AbstractUser.kt:264)
at net.mamoe.mirai.internal.contact.CommonGroupImpl.sendMessage$suspendImpl(GroupImpl.kt:192)
at net.mamoe.mirai.internal.contact.CommonGroupImpl.sendMessage(GroupImpl.kt)
at org.mirai.cat.plugin.PluginMain$onEnable$3.invokeSuspend(PluginMain.kt:2516)

@MrY-Cat
Copy link
Contributor Author

MrY-Cat commented Dec 2, 2022

java.lang.IllegalStateException: cannot find member for OnlineMessageSourceFromGroupImpl. msg=[net.mamoe.mirai.internal.network.protocol.data.proto.MsgComm$Msg@100ecc0c]
at net.mamoe.mirai.internal.message.source.OnlineMessageSourceFromGroupImpl$sender$2.invoke(incomingSourceImpl.kt:225)
at net.mamoe.mirai.internal.message.source.OnlineMessageSourceFromGroupImpl$sender$2.invoke(incomingSourceImpl.kt:218)
at kotlin.SynchronizedLazyImpl.getValue(LazyJVM.kt:74)
at net.mamoe.mirai.internal.message.source.OnlineMessageSourceFromGroupImpl.getSender(incomingSourceImpl.kt:218)
at net.mamoe.mirai.internal.message.source.OnlineMessageSourceFromGroupImpl.getSender(incomingSourceImpl.kt:186)
at net.mamoe.mirai.message.data.OnlineMessageSource$Incoming.getFromId(MessageSource.kt:559)
at net.mamoe.mirai.message.data.OnlineMessageSource$Incoming$FromGroup.toString(MessageSource.kt:615)
at net.mamoe.mirai.internal.utils.TypeKt.estimateLength(type.kt:46)
at net.mamoe.mirai.internal.utils.TypeKt.estimateLength(type.kt:35)
at net.mamoe.mirai.internal.message.protocol.outgoing.OutgoingMessagePipelineContext.verifyLength(OutgoingMessagePipeline.kt:94)
at net.mamoe.mirai.internal.message.protocol.impl.LongMessageProtocol.convertToLongMessageIfNeeded(LongMessageProtocol.kt:72)
at net.mamoe.mirai.internal.message.protocol.impl.LongMessageProtocol.access$convertToLongMessageIfNeeded(LongMessageProtocol.kt:31)
at net.mamoe.mirai.internal.message.protocol.impl.LongMessageProtocol$collectProcessorsImpl$1.process(LongMessageProtocol.kt:35)
at net.mamoe.mirai.internal.message.protocol.outgoing.OutgoingMessageProcessorAdapter.process(OutgoingMessagePipelineProcessor.kt:26)
at net.mamoe.mirai.internal.message.protocol.outgoing.OutgoingMessageProcessorAdapter.process(OutgoingMessagePipelineProcessor.kt:20)
at net.mamoe.mirai.internal.pipeline.AbstractProcessorPipeline.process$suspendImpl(ProcessorPipeline.kt:258)
at net.mamoe.mirai.internal.pipeline.AbstractProcessorPipeline.process(ProcessorPipeline.kt)
at net.mamoe.mirai.internal.message.protocol.MessageProtocolFacadeImpl.preprocessAndSendOutgoingImpl(MessageProtocolFacade.kt:341)
at net.mamoe.mirai.internal.message.protocol.MessageProtocolFacadeImpl.preprocessAndSendOutgoing(MessageProtocolFacade.kt:326)
at net.mamoe.mirai.internal.message.protocol.MessageProtocolFacade$INSTANCE.preprocessAndSendOutgoing(MessageProtocolFacade.kt)
at net.mamoe.mirai.internal.contact.AbstractUserKt.sendMessageImpl(AbstractUser.kt:264)
at net.mamoe.mirai.internal.contact.CommonGroupImpl.sendMessage$suspendImpl(GroupImpl.kt:192)
at net.mamoe.mirai.internal.contact.CommonGroupImpl.sendMessage(GroupImpl.kt)
at org.mirai.cat.plugin.PluginMain$onEnable$3.invokeSuspend(PluginMain.kt:2476)

@MrY-Cat
Copy link
Contributor Author

MrY-Cat commented Dec 2, 2022

java.lang.IllegalStateException: cannot find member for OnlineMessageSourceFromGroupImpl. msg=[net.mamoe.mirai.internal.network.protocol.data.proto.MsgComm$Msg@5befc691]
at net.mamoe.mirai.internal.message.source.OnlineMessageSourceFromGroupImpl$sender$2.invoke(incomingSourceImpl.kt:225)
at net.mamoe.mirai.internal.message.source.OnlineMessageSourceFromGroupImpl$sender$2.invoke(incomingSourceImpl.kt:218)
at kotlin.SynchronizedLazyImpl.getValue(LazyJVM.kt:74)
at net.mamoe.mirai.internal.message.source.OnlineMessageSourceFromGroupImpl.getSender(incomingSourceImpl.kt:218)
at net.mamoe.mirai.internal.message.source.OnlineMessageSourceFromGroupImpl.getSender(incomingSourceImpl.kt:186)
at net.mamoe.mirai.message.data.OnlineMessageSource$Incoming.getFromId(MessageSource.kt:559)
at net.mamoe.mirai.message.data.OnlineMessageSource$Incoming$FromGroup.toString(MessageSource.kt:615)
at net.mamoe.mirai.internal.utils.TypeKt.estimateLength(type.kt:46)
at net.mamoe.mirai.internal.utils.TypeKt.estimateLength(type.kt:35)
at net.mamoe.mirai.internal.message.protocol.outgoing.OutgoingMessagePipelineContext.verifyLength(OutgoingMessagePipeline.kt:94)
at net.mamoe.mirai.internal.message.protocol.impl.LongMessageProtocol.convertToLongMessageIfNeeded(LongMessageProtocol.kt:72)
at net.mamoe.mirai.internal.message.protocol.impl.LongMessageProtocol.access$convertToLongMessageIfNeeded(LongMessageProtocol.kt:31)
at net.mamoe.mirai.internal.message.protocol.impl.LongMessageProtocol$collectProcessorsImpl$1.process(LongMessageProtocol.kt:35)
at net.mamoe.mirai.internal.message.protocol.outgoing.OutgoingMessageProcessorAdapter.process(OutgoingMessagePipelineProcessor.kt:26)
at net.mamoe.mirai.internal.message.protocol.outgoing.OutgoingMessageProcessorAdapter.process(OutgoingMessagePipelineProcessor.kt:20)
at net.mamoe.mirai.internal.pipeline.AbstractProcessorPipeline.process$suspendImpl(ProcessorPipeline.kt:258)
at net.mamoe.mirai.internal.pipeline.AbstractProcessorPipeline.process(ProcessorPipeline.kt)
at net.mamoe.mirai.internal.message.protocol.MessageProtocolFacadeImpl.preprocessAndSendOutgoingImpl(MessageProtocolFacade.kt:341)
at net.mamoe.mirai.internal.message.protocol.MessageProtocolFacadeImpl.preprocessAndSendOutgoing(MessageProtocolFacade.kt:326)
at net.mamoe.mirai.internal.message.protocol.MessageProtocolFacade$INSTANCE.preprocessAndSendOutgoing(MessageProtocolFacade.kt)
at net.mamoe.mirai.internal.contact.AbstractUserKt.sendMessageImpl(AbstractUser.kt:264)
at net.mamoe.mirai.internal.contact.CommonGroupImpl.sendMessage$suspendImpl(GroupImpl.kt:192)
at net.mamoe.mirai.internal.contact.CommonGroupImpl.sendMessage(GroupImpl.kt)
at org.mirai.cat.plugin.PluginMain$onEnable$3.invokeSuspend(PluginMain.kt:2476)

@MrY-Cat
Copy link
Contributor Author

MrY-Cat commented Dec 2, 2022

PluginMain.kt的行数不一样是由于前面的代码变动,异常发生处还是原来那句if(!msgReply.isContentBlank()) group.sendMessage(msgReply),不过那里的代码过于老旧,但总之就是将一个群成员的消息存储起来,当这个群成员被踢后发送出来它的消息的时候会出异常

@Karlatemp Karlatemp linked a pull request Feb 18, 2023 that will close this issue
@Him188 Him188 added the t:bug 类型: bug label Jun 15, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
s:core 子系统: mirai-core t:bug 类型: bug
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants