gdpl2112 / MiraiCallApiPlugin

一个mirai 自定义调用API的插件
GNU General Public License v3.0
19 stars 2 forks source link

有个问题,不知道为什么需要发第二遍消息才能正常使用 #6

Open kogekiplay opened 1 year ago

kogekiplay commented 1 year ago

第一次报错的日志:

[0m2022-11-09 16:06:33 V/Bot.1782443084: [相亲相爱的数码人(398128418)] kogeki攻攻(981612327) -> 今天我是什么少女
[31m2022-11-09 16:06:33 E/Bot.1782443084: 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:103)
    at net.mamoe.mirai.internal.network.components.EventDispatcherImpl$broadcast$1.invokeSuspend(EventDispatcher.kt)
    at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33)
    at kotlinx.coroutines.UndispatchedCoroutine.afterResume(CoroutineContext.kt:202)
    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:104)
    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)
Caused by: java.lang.IllegalStateException: 未找到异常处理器. 请继承 SimpleListenerHost 中的 handleException 方法, 或在构造 SimpleListenerHost 时提供 CoroutineExceptionHandler
------------
Cannot find exception handler from coroutineContext. 
Please extend SimpleListenerHost.handleException or provide a CoroutineExceptionHandler to the constructor of SimpleListenerHost
    at net.mamoe.mirai.event.SimpleListenerHost.handleException(JvmMethodListeners.kt:192)
    at MiraiCallApiPlugin-v2.8.jar//io.github.gdpl2112.mirai.p1.CallApiPlugin$1.handleException(CallApiPlugin.java:46)
    at net.mamoe.mirai.event.SimpleListenerHost$special$$inlined$CoroutineExceptionHandler$1.handleException(CoroutineExceptionHandler.kt:111)
    at net.mamoe.mirai.internal.event.SafeListener.onEvent(SafeListener.kt:75)
    at net.mamoe.mirai.internal.event.SafeListener$onEvent$1.invokeSuspend(SafeListener.kt)
    ... 9 more
Caused by: net.mamoe.mirai.event.ExceptionInEventHandlerException: Exception in EventHandler
    at net.mamoe.mirai.internal.event.JvmMethodListenersInternalKt.registerEventHandler$callMethod$invokeWithErrorReport(JvmMethodListenersInternal.kt:147)
    at net.mamoe.mirai.internal.event.JvmMethodListenersInternalKt.access$registerEventHandler$callMethod$invokeWithErrorReport(JvmMethodListenersInternal.kt:1)
    at net.mamoe.mirai.internal.event.JvmMethodListenersInternalKt$registerEventHandler$callMethod$2.invokeSuspend(JvmMethodListenersInternal.kt:154)
    at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33)
    at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:106)
    at kotlinx.coroutines.internal.LimitedDispatcher.run(LimitedDispatcher.kt:42)
    at kotlinx.coroutines.scheduling.TaskImpl.run(Tasks.kt:95)
    ... 4 more
Caused by: java.lang.reflect.InvocationTargetException
    at jdk.internal.reflect.GeneratedMethodAccessor68.invoke(Unknown Source)
    at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
    at java.base/java.lang.reflect.Method.invoke(Unknown Source)
    at net.mamoe.mirai.internal.event.JvmMethodListenersInternalKt.registerEventHandler$callMethod$invokeWithErrorReport(JvmMethodListenersInternal.kt:140)
    ... 10 more
Caused by: java.lang.NoClassDefFoundError: Could not initialize class io.github.kloping.clasz.ClassUtils
    at lib-tts.jar//io.github.kloping.serialize.HMLObject.getFields(HMLObject.java:276)
    at lib-tts.jar//io.github.kloping.serialize.HMLObject.work(HMLObject.java:81)
    at lib-tts.jar//io.github.kloping.serialize.HMLObject.toHMLString(HMLObject.java:75)
    at MiraiCallApiPlugin-v2.8.jar//io.github.gdpl2112.mirai.p1.ManagerConf.apply(ManagerConf.java:64)
    at MiraiCallApiPlugin-v2.8.jar//io.github.gdpl2112.mirai.p1.ManagerConf.getStateByTouchAndIdDefault(ManagerConf.java:45)
    at MiraiCallApiPlugin-v2.8.jar//io.github.gdpl2112.mirai.p1.Worker.enable(Worker.java:113)
    at MiraiCallApiPlugin-v2.8.jar//io.github.gdpl2112.mirai.p1.Worker.call(Worker.java:95)
    at MiraiCallApiPlugin-v2.8.jar//io.github.gdpl2112.mirai.p1.CallApiPlugin$1.onMessage0(CallApiPlugin.java:74)
    at MiraiCallApiPlugin-v2.8.jar//io.github.gdpl2112.mirai.p1.CallApiPlugin$1.onMessage(CallApiPlugin.java:51)
    ... 14 more
kogekiplay commented 1 year ago

补充一下,插件是最新版,mirai 2.12.3

liulifox233 commented 1 year ago

相同的问题!我也是这样

StarDreamAndFeng commented 1 year ago

希望插件作者尽快解决,目前时间2023年8月4日,仍然有这个问题(发第2遍才起作用,第1遍会报错)