simple-robot / simpler-robot

Simple Robot,一个bot风格的Kotlin多平台事件调度框架,异步高效、Java友好!/ A Bot-style Kotlin Multiplatform event scheduling framework, asynchronous and high-performance, java-friendly! 🐱😼😻😸
https://simbot.forte.love
GNU Lesser General Public License v3.0
519 stars 44 forks source link

dev6 与核心库 dev18 版本共同使用时,接收频道 at 消息异常 #786

Closed Ant00000ny closed 8 months ago

Ant00000ny commented 8 months ago

版本号

love.forte.simbot:simbot-core-spring-boot-starter:4.0.0-dev18 & love.forte.simbot.component:simbot-component-qq-guild-core:4.0.0-dev6

附加版本

No response

涉及的编程语言

Kotlin

项目构建工具

Gradle

涉及的组件库

QQ频道

问题描述

dev6 与核心库 dev18 版本共同使用时,接收频道 at 消息异常

核心库版本回退到 love.forte.simbot:simbot-core-spring-boot-starter:4.0.0-dev16 没有出现问题

Exception in thread "DefaultDispatcher-worker-5" java.lang.NoSuchMethodError: 'love.forte.simbot.message.Messages love.forte.simbot.message.MessagesKt.emptyMessages()'
    at love.forte.simbot.component.qguild.message.MessageParsers.parse$default(SendingMessageParser.kt:233)
    at love.forte.simbot.component.qguild.internal.message.QGMessageContentImpl$parseContext$2.invoke(QGReceiveMessageContentImpl.kt:35)
    at love.forte.simbot.component.qguild.internal.message.QGMessageContentImpl$parseContext$2.invoke(QGReceiveMessageContentImpl.kt:35)
    at kotlin.SafePublicationLazyImpl.getValue(LazyJVM.kt:107)
    at love.forte.simbot.component.qguild.internal.message.QGMessageContentImpl.getParseContext(QGReceiveMessageContentImpl.kt:35)
    at love.forte.simbot.component.qguild.internal.message.QGMessageContentImpl.access$getParseContext(QGReceiveMessageContentImpl.kt:31)
    at love.forte.simbot.component.qguild.internal.message.QGMessageContentImpl$plainText$2.invoke(QGReceiveMessageContentImpl.kt:40)
    at love.forte.simbot.component.qguild.internal.message.QGMessageContentImpl$plainText$2.invoke(QGReceiveMessageContentImpl.kt:39)
    at kotlin.SafePublicationLazyImpl.getValue(LazyJVM.kt:107)
    at love.forte.simbot.component.qguild.internal.message.QGMessageContentImpl.getPlainText(QGReceiveMessageContentImpl.kt:39)
    at love.forte.simbot.core.event.impl.EventListenerContextImpl.<init>(SimpleEventDispatcherImpl.kt:403)
    at love.forte.simbot.core.event.impl.SimpleEventDispatcherImpl.dispatchInFlowWithoutCoroutineContext(SimpleEventDispatcherImpl.kt:381)
    at love.forte.simbot.core.event.impl.SimpleEventDispatcherImpl.access$dispatchInFlowWithoutCoroutineContext(SimpleEventDispatcherImpl.kt:263)
    at love.forte.simbot.core.event.impl.SimpleEventDispatcherImpl$eventFlow$1.invokeSuspend(SimpleEventDispatcherImpl.kt:335)
    at love.forte.simbot.core.event.impl.SimpleEventDispatcherImpl$eventFlow$1.invoke(SimpleEventDispatcherImpl.kt)
    at love.forte.simbot.core.event.impl.SimpleEventDispatcherImpl$eventFlow$1.invoke(SimpleEventDispatcherImpl.kt)
    at kotlinx.coroutines.flow.SafeFlow.collectSafely(Builders.kt:61)
    at kotlinx.coroutines.flow.AbstractFlow.collect(Flow.kt:230)
    at kotlinx.coroutines.flow.FlowKt__TransformKt$onEach$$inlined$unsafeTransform$1.collect(SafeCollector.common.kt:114)
    at kotlinx.coroutines.flow.FlowKt__CollectKt.collect(Collect.kt:30)
    at kotlinx.coroutines.flow.FlowKt.collect(Unknown Source)
    at love.forte.simbot.component.qguild.internal.bot.QGEventProcessKt$registerEventProcessor$1$invoke$$inlined$pushEvent$10.invokeSuspend(QGEventProcess.kt:190)
    at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33)
    at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:108)
    at kotlinx.coroutines.scheduling.CoroutineScheduler.runSafely(CoroutineScheduler.kt:584)
    at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.executeTask(CoroutineScheduler.kt:793)
    at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.runWorker(CoroutineScheduler.kt:697)
    at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.run(CoroutineScheduler.kt:684)
    Suppressed: kotlinx.coroutines.internal.DiagnosticCoroutineContextException: [CoroutineName(QGBot.102094552), StandaloneCoroutine{Cancelling}@55b61ffc, Dispatchers.Default]

复现方式

https://github.com/Antony404/RyoBot/tree/8b0bc06e7cd49a480cda156a53403ff243e75ed3

相关日志

No response

其他补充

No response

ForteScarlet commented 8 months ago

此任务 完成后(也就是频道组件dev8发布完成后)可尝试使用 simbot 核心库 dev18 + qq频道组件 dev8 的版本组合。 issue 暂做关闭,如果仍然存在问题可重新开启此 issue