iTXTech / mirai-js

强大的 Mirai JavaScript 插件运行时
GNU Affero General Public License v3.0
86 stars 33 forks source link

mirai console 1.0-M4版本中无法加载 #5

Closed JonneyDong closed 4 years ago

JonneyDong commented 4 years ago

加载mirai js 插件时报如下错误, 请求怎么解决

V/main: Loading JVM plugins... Exception in thread "main" net.mamoe.mirai.console.internal.util.ServiceLoadException: Could not load service org.itxtech.miraijs.MiraiJs. at net.mamoe.mirai.console.internal.util.PluginServiceHelper.loadService(PluginServiceHelper.kt:56) at net.mamoe.mirai.console.internal.util.PluginServiceHelper.loadAllServices(PluginServiceHelper.kt:38) at net.mamoe.mirai.console.internal.plugin.BuiltInJvmPluginLoaderImpl$extractPlugins$1$1.invoke(BuiltInJvmPluginLoaderImpl.kt:62) at net.mamoe.mirai.console.internal.plugin.BuiltInJvmPluginLoaderImpl$extractPlugins$1$1.invoke(BuiltInJvmPluginLoaderImpl.kt:29) at kotlin.sequences.TransformingSequence$iterator$1.next(Sequences.kt:210) at kotlin.sequences.FlatteningSequence$iterator$1.ensureItemIterator(Sequences.kt:314) at kotlin.sequences.FlatteningSequence$iterator$1.hasNext(Sequences.kt:303) at kotlin.sequences.TransformingSequence$iterator$1.hasNext(Sequences.kt:214) at kotlin.sequences.TransformingSequence$iterator$1.hasNext(Sequences.kt:214) at kotlin.sequences.FlatteningSequence$iterator$1.ensureItemIterator(Sequences.kt:307) at kotlin.sequences.FlatteningSequence$iterator$1.hasNext(Sequences.kt:303) at kotlin.sequences.SequencesKt_SequencesKt.toCollection(Sequences.kt:742) at kotlin.sequences.SequencesKtSequencesKt.toSet(_Sequences.kt:783) at net.mamoe.mirai.console.internal.plugin.BuiltInJvmPluginLoaderImpl.extractPlugins(BuiltInJvmPluginLoaderImpl.kt:80) at net.mamoe.mirai.console.plugin.loader.AbstractFilePluginLoader.listPlugins(FilePluginLoader.kt:42) at net.mamoe.mirai.console.plugin.jvm.JvmPluginLoader$BuiltIn.listPlugins(JvmPluginLoader.kt) at net.mamoe.mirai.console.internal.plugin.PluginManagerImpl.listAndSortAllPlugins(PluginManagerImpl.kt:182) at net.mamoe.mirai.console.internal.plugin.PluginManagerImpl.findAndSortAllPluginsUsingBuiltInLoaders(PluginManagerImpl.kt:126) at net.mamoe.mirai.console.internal.plugin.PluginManagerImpl.loadAllPluginsUsingBuiltInLoaders$mirai_console(PluginManagerImpl.kt:136) at net.mamoe.mirai.console.internal.MiraiConsoleImplementationBridge.doStart$mirai_console(MiraiConsoleImplementationBridge.kt:133) at net.mamoe.mirai.console.MiraiConsoleImplementation$Companion.start(MiraiConsoleImplementation.kt:184) at net.mamoe.mirai.console.pure.MiraiConsolePureLoader.startAsDaemon(MiraiConsolePureLoader.kt:150) at net.mamoe.mirai.console.pure.MiraiConsolePureLoader.startAsDaemon$default(MiraiConsolePureLoader.kt:149) at net.mamoe.mirai.console.pure.MiraiConsolePureLoader.main(MiraiConsolePureLoader.kt:46) Caused by: java.lang.ExceptionInInitializerError at java.lang.Class.forName0(Native Method) at java.lang.Class.forName(Class.java:348) at net.mamoe.mirai.console.internal.util.PluginServiceHelper.loadService(PluginServiceHelper.kt:47) ... 23 more Caused by: java.lang.IllegalStateException: PermissionService is not yet initialized therefore cannot be used. at net.mamoe.mirai.console.permission.PermissionService$Companion.getInstance(PermissionService.kt:119) at net.mamoe.mirai.console.internal.plugin.JvmPluginInternal$parentPermission$2.invoke(JvmPluginInternal.kt:52) at net.mamoe.mirai.console.internal.plugin.JvmPluginInternal$parentPermission$2.invoke(JvmPluginInternal.kt:44) at kotlin.SynchronizedLazyImpl.getValue(LazyJVM.kt:74) at net.mamoe.mirai.console.internal.plugin.JvmPluginInternal.getParentPermission(JvmPluginInternal.kt) at net.mamoe.mirai.console.command.CompositeCommand.(CompositeCommand.kt:86) at org.itxtech.miraijs.plugin.PluginManager$JpmCommand.(PluginManager.kt:99) at org.itxtech.miraijs.plugin.PluginManager.(PluginManager.kt:40) at org.itxtech.miraijs.MiraiJs.(MiraiJs.kt:39) ... 26 more

PeratX commented 4 years ago

什么版本的console

JonneyDong commented 4 years ago

什么版本的console

三件套 mirai-console:1.0-M4 mirai-console-pure:1.0-M4 mirai-core-qqandroid:1.2.3

JonneyDong commented 4 years ago

什么版本的console

我使用的是miraiOK 一键套装

http://t.imlxy.net:64724/mirai/MiraiOK/miraiOK_windows-386.exe

PeratX commented 4 years ago

不支持M4,最新版本支持1.0-RC-dev-29 同时支持从mirai console loader启动