cssxsh / bilibili-helper

Mirai Console 插件开发计划
https://github.com/users/cssxsh/projects/4
GNU Affero General Public License v3.0
143 stars 18 forks source link

插件无法启动,出现 java.lang.NoSuchMethodError #63

Closed asforest closed 2 years ago

asforest commented 2 years ago

插件无法启动,后台会输出报错java.lang.NoSuchMethodError: 'kotlin.reflect.KType kotlin.jvm.internal.Reflection.mutableCollectionType(kotlin.reflect.KType)'

我试了下1.4.4版本也是同样的问题无法启动,请问这可能是什么原因导致的呢?

我没有安装 mirai-selenium-plugin 插件,是一定要安装这个插件才能正常启动吗。

运行环境: 环境 版本
mirai-console-loader 1.2.2
mirai-console 2.9.1
bilibili-helper 1.4.3
openjdk 11.0.12 2021-07-20
os Debian 4.19.146-1 (2020-09-17)
2022-02-12 23:28:53 E/bilibili-helper: java.lang.NoSuchMethodError: 'kotlin.reflect.KType kotlin.jvm.internal.Reflection.mutableCollectionType(kotlin.reflect.KType)'
java.lang.NoSuchMethodError: 'kotlin.reflect.KType kotlin.jvm.internal.Reflection.mutableCollectionType(kotlin.reflect.KType)'
        at xyz.cssxsh.mirai.plugin.data.BiliTaskData.<clinit>(BiliTaskData.kt:20)
        at xyz.cssxsh.mirai.plugin.BiliHelperPlugin.onEnable(BiliHelperPlugin.kt:24)
        at net.mamoe.mirai.console.internal.plugin.JvmPluginInternal.internalOnEnable$mirai_console(JvmPluginInternal.kt:113)
        at net.mamoe.mirai.console.internal.plugin.BuiltInJvmPluginLoaderImpl.enable(BuiltInJvmPluginLoaderImpl.kt:158)
        at net.mamoe.mirai.console.plugin.jvm.JvmPluginLoader$BuiltIn.enable(JvmPluginLoader.kt)
        at net.mamoe.mirai.console.plugin.jvm.JvmPluginLoader$BuiltIn.enable(JvmPluginLoader.kt:36)
        at net.mamoe.mirai.console.plugin.PluginManager.enablePlugin(PluginManager.kt:129)
        at net.mamoe.mirai.console.internal.plugin.PluginManagerImpl.enableAllLoadedPlugins$mirai_console(PluginManagerImpl.kt:172)
        at net.mamoe.mirai.console.internal.MiraiConsoleImplementationBridge.doStart$mirai_console(MiraiConsoleImplementationBridge.kt:214)
        at net.mamoe.mirai.console.MiraiConsoleImplementation$Companion.start(MiraiConsoleImplementation.kt:277)
        at net.mamoe.mirai.console.terminal.MiraiConsoleTerminalLoader.startAsDaemon(MiraiConsoleTerminalLoader.kt:156)
        at net.mamoe.mirai.console.terminal.MiraiConsoleTerminalLoader.startAsDaemon$default(MiraiConsoleTerminalLoader.kt:155)
        at net.mamoe.mirai.console.terminal.MiraiConsoleTerminalLoader.main(MiraiConsoleTerminalLoader.kt:47)
        at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
        at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.base/java.lang.reflect.Method.invoke(Method.java:566)
        at org.itxtech.mcl.Utility.bootMirai(Utility.java:83)
        at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
        at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.base/java.lang.reflect.Method.invoke(Method.java:566)
        at org.mozilla.javascript.MemberBox.invoke(MemberBox.java:138)
        at org.mozilla.javascript.NativeJavaMethod.call(NativeJavaMethod.java:226)
        at org.mozilla.javascript.Interpreter.interpretLoop(Interpreter.java:1692)
        at org.mozilla.javascript.Interpreter.interpret(Interpreter.java:1013)
        at org.mozilla.javascript.InterpretedFunction.call(InterpretedFunction.java:109)
        at org.mozilla.javascript.ContextFactory.doTopCall(ContextFactory.java:412)
        at org.mozilla.javascript.ScriptRuntime.doTopCall(ScriptRuntime.java:3578)
        at org.mozilla.javascript.InterpretedFunction.call(InterpretedFunction.java:107)
        at org.mozilla.javascript.ArrowFunction.call(ArrowFunction.java:43)
        at org.mozilla.javascript.InterfaceAdapter.invokeImpl(InterfaceAdapter.java:155)
        at org.mozilla.javascript.InterfaceAdapter.lambda$invoke$0(InterfaceAdapter.java:105)
        at org.mozilla.javascript.Context.call(Context.java:554)
        at org.mozilla.javascript.ContextFactory.call(ContextFactory.java:522)
        at org.mozilla.javascript.InterfaceAdapter.invoke(InterfaceAdapter.java:105)
        at org.mozilla.javascript.jdk18.VMBridge_jdk18$1.invoke(VMBridge_jdk18.java:126)
        at com.sun.proxy.$Proxy4.run(Unknown Source)
        at org.itxtech.mcl.script.ScriptManager.phaseBoot(ScriptManager.java:106)
        at org.itxtech.mcl.Loader.lambda$start$3(Loader.java:176)
        at org.itxtech.mcl.Loader.tryCatching(Loader.java:145)
        at org.itxtech.mcl.Loader.start(Loader.java:176)
        at org.itxtech.mcl.Loader.main(Loader.java:68)
cssxsh commented 2 years ago

请升级 mirai-console

asforest commented 2 years ago

升级 mirai-console 到 2.10以后就好了。谢谢大佬!

如果可以的话,建议在 README 中添加 mirai-console 的最低版本要求,可以避免后人踩坑。