Exception in thread "Thread-12" java.util.ServiceConfigurationError: net.mamoe.mirai.IMirai: Provider net.mamoe.mirai.internal.MiraiImpl could not be instantiated
at java.util.ServiceLoader.fail(ServiceLoader.java:232)
at java.util.ServiceLoader.access$100(ServiceLoader.java:185)
at java.util.ServiceLoader$LazyIterator.nextService(ServiceLoader.java:384)
at java.util.ServiceLoader$LazyIterator.next(ServiceLoader.java:404)
at java.util.ServiceLoader$1.next(ServiceLoader.java:480)
at kotlin.collections.CollectionsKt___CollectionsKt.firstOrNull(_Collections.kt:270)
at net.mamoe.mirai.Mirai.findMiraiInstance(IMirai.kt:357)
at net.mamoe.mirai._MiraiInstance.get(IMirai.kt:351)
at net.mamoe.mirai.Mirai.getInstance(IMirai.kt:41)
at net.mamoe.mirai.BotFactory$INSTANCE.newBot(BotFactory.kt:115)
at com.zhang.game.adm.daemons.QQbot.<init>(QQbot.java:107)
at com.zhang.game.adm.daemons.QQbot.getInstance(QQbot.java:80)
at com.zhang.game.adm.GameServer$3.run(GameServer.java:439)
at java.lang.Thread.run(Thread.java:748)
Caused by: java.lang.NoSuchMethodError: net.mamoe.mirai.utils.ServicesKt.loadServices(Lkotlin/reflect/KClass;)Lkotlin/sequences/Sequence;
at net.mamoe.mirai.internal.message.protocol.MessageProtocolFacadeImpl.<init>(MessageProtocolFacade.kt:194)
at net.mamoe.mirai.internal.message.protocol.MessageProtocolFacade$INSTANCE.<init>(MessageProtocolFacade.kt:162)
at net.mamoe.mirai.internal.message.protocol.MessageProtocolFacade$INSTANCE.<clinit>(MessageProtocolFacade.kt)
at net.mamoe.mirai.internal.message.protocol.MessageProtocolFacade.<clinit>(MessageProtocolFacade.kt)
at net.mamoe.mirai.internal.MiraiImplKt._MiraiImpl_static_init(MiraiImpl.kt:25)
at net.mamoe.mirai.internal.MiraiImpl.<clinit>(MiraiImpl.kt:94)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
at java.lang.Class.newInstance(Class.java:442)
at java.util.ServiceLoader$LazyIterator.nextService(ServiceLoader.java:380)
... 11 more
kotlinx.serialization.MissingFieldException: Field 'friendGroupId' is required for type with serial name 'net.mamoe.mirai.internal.contact.info.FriendInfoImpl', but it was missing at path: $.list[0] at path: $.list[0] at path: $.list[0]
一直报错
Caused by: java.lang.NoClassDefFoundError: net/mamoe/mirai/internal/deps/io/ktor/client/engine/okhttp/OkHttp
at net.mamoe.mirai.internal.MiraiImplKt.createDefaultHttpClient(MiraiImpl.kt:29)
at net.mamoe.mirai.internal.MiraiImpl.<init>(MiraiImpl.kt:97)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
at java.lang.Class.newInstance(Class.java:442)
at java.util.ServiceLoader$LazyIterator.nextService(ServiceLoader.java:380)
... 31 more
Caused by: java.lang.ClassNotFoundException: net.mamoe.mirai.internal.deps.io.ktor.client.engine.okhttp.OkHttp
at org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1285)
at org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1119)
... 39 more
java.util.NoSuchElementException: group 2055561833
at net.mamoe.mirai.Bot.getGroupOrFail(Bot.kt:152)
at net.mamoe.mirai.internal.message.OnlineMessageSourceFromTempImpl.<init>(incomingSourceImpl.kt:139)
at net.mamoe.mirai.internal.message.ReceiveMessageTransformer.createMessageSource(ReceiveMessageHandler.kt:109)
at net.mamoe.mirai.internal.message.ReceiveMessageHandlerKt.toMessageChain(ReceiveMessageHandler.kt:83)
at net.mamoe.mirai.internal.message.ReceiveMessageHandlerKt.toMessageChainOnline(ReceiveMessageHandler.kt:49)
at net.mamoe.mirai.internal.network.protocol.packet.chat.receive.MessageSvc_PbGetMsgKt.transform(MessageSvc.PbGetMsg.kt:515)
at net.mamoe.mirai.internal.network.protocol.packet.chat.receive.MessageSvc_PbGetMsgKt.transform$default(MessageSvc.PbGetMsg.kt:248)
at net.mamoe.mirai.internal.network.protocol.packet.chat.receive.MessageSvcPbGetMsg$decode$messages$5.invokeSuspend(MessageSvc.PbGetMsg.kt:184)
at net.mamoe.mirai.internal.network.protocol.packet.chat.receive.MessageSvcPbGetMsg$decode$messages$5.invoke(MessageSvc.PbGetMsg.kt)
at kotlinx.coroutines.flow.FlowKt__MergeKt$flatMapConcat$$inlined$map$1$2.emit(Collect.kt:134)
at net.mamoe.mirai.internal.network.protocol.packet.chat.receive.MessageSvcPbGetMsg$decode$$inlined$filter$1$2.emit(Collect.kt:135)
at net.mamoe.mirai.internal.network.protocol.packet.chat.receive.MessageSvcPbGetMsg$decode$messages$2$invokeSuspend$$inlined$filter$1$2.emit(Collect.kt:135)
at kotlinx.coroutines.flow.FlowKt__BuildersKt$asFlow$$inlined$unsafeFlow$3.collect(SafeCollector.common.kt:115)
at net.mamoe.mirai.internal.network.protocol.packet.chat.receive.MessageSvcPbGetMsg$decode$messages$2$invokeSuspend$$inlined$filter$1.collect(SafeCollector.common.kt:114)
at kotlinx.coroutines.flow.FlowKt__MergeKt$flattenConcat$$inlined$unsafeFlow$1$lambda$1.emit(Collect.kt:134)
at kotlinx.coroutines.flow.FlowKt__MergeKt$flatMapConcat$$inlined$map$1$2.emit(Collect.kt:134)
at net.mamoe.mirai.internal.network.protocol.packet.chat.receive.MessageSvcPbGetMsg$decode$$inlined$filterNot$1$2.emit(Collect.kt:135)
at kotlinx.coroutines.flow.FlowKt__BuildersKt$asFlow$$inlined$unsafeFlow$3.collect(SafeCollector.common.kt:115)
at net.mamoe.mirai.internal.network.protocol.packet.chat.receive.MessageSvcPbGetMsg$decode$$inlined$filterNot$1.collect(SafeCollector.common.kt:114)
at kotlinx.coroutines.flow.FlowKt__MergeKt$flatMapConcat$$inlined$map$1.collect(SafeCollector.common.kt:114)
at kotlinx.coroutines.flow.FlowKt__MergeKt$flattenConcat$$inlined$unsafeFlow$1.collect(SafeCollector.common.kt:114)
at net.mamoe.mirai.internal.network.protocol.packet.chat.receive.MessageSvcPbGetMsg$decode$$inlined$filter$1.collect(SafeCollector.common.kt:114)
at kotlinx.coroutines.flow.FlowKt__MergeKt$flatMapConcat$$inlined$map$1.collect(SafeCollector.common.kt:114)
at kotlinx.coroutines.flow.FlowKt__MergeKt$flattenConcat$$inlined$unsafeFlow$1.collect(SafeCollector.common.kt:114)
at kotlinx.coroutines.flow.FlowKt__CollectionKt.toCollection(Collection.kt:32)
at kotlinx.coroutines.flow.FlowKt.toCollection(Unknown Source)
at kotlinx.coroutines.flow.FlowKt__CollectionKt.toList(Collection.kt:15)
at kotlinx.coroutines.flow.FlowKt.toList(Unknown Source)
at kotlinx.coroutines.flow.FlowKt__CollectionKt.toList$default(Collection.kt:15)
at kotlinx.coroutines.flow.FlowKt.toList$default(Unknown Source)
at net.mamoe.mirai.internal.network.protocol.packet.chat.receive.MessageSvcPbGetMsg.decode(MessageSvc.PbGetMsg.kt:188)
at net.mamoe.mirai.internal.network.protocol.packet.chat.receive.MessageSvcPbGetMsg$decode$1.invokeSuspend(MessageSvc.PbGetMsg.kt)
at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33)
at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:106)
at kotlinx.coroutines.scheduling.CoroutineScheduler.runSafely(CoroutineScheduler.kt:571)
at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.executeTask(CoroutineScheduler.kt:750)
at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.runWorker(CoroutineScheduler.kt:678)
at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.run(CoroutineScheduler.kt:665)