@Nambers
mirai-core-jvm
2.13.2
Linux
laocunzhang 发布的帖子
-
这是怎么回事呢?Windows上可以,Linux上就不行了
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
-
RE: Field 'friendGroupId' is required for type with serial name 'net.mamoe.mirai.internal.contact.info.FriendInfoImpl'
@cssxsh
mirai-core-jvm 2.13.2 ,2.13.1 也试过了
ANDROID_PAD,ANDROID_PHONE,ANDROID_WATCH 三个都试过了
一样的结果,不知道什么原因了 -
RE: Field 'friendGroupId' is required for type with serial name 'net.mamoe.mirai.internal.contact.info.FriendInfoImpl'
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] at kotlinx.serialization.json.internal.StreamingJsonDecoder.decodeSerializableValue(StreamingJsonDecoder.kt:40) at kotlinx.serialization.json.Json.decodeFromString(Json.kt:100) at net.mamoe.mirai.utils.SerializationKt_common.loadNotBlankAs(Serialization.kt:76) at net.mamoe.mirai.internal.network.components.ContactCacheServiceImpl$friendListCache$2.invoke(ContactCacheService.kt:63) at net.mamoe.mirai.internal.network.components.ContactCacheServiceImpl$friendListCache$2.invoke(ContactCacheService.kt:60) at kotlin.SynchronizedLazyImpl.getValue(LazyJVM.kt:74) at net.mamoe.mirai.internal.network.components.ContactCacheServiceImpl.getFriendListCache(ContactCacheService.kt:60) at net.mamoe.mirai.internal.network.protocol.packet.login.StatSvc$Register$online$1.invoke(StatSvc.kt:186) at net.mamoe.mirai.internal.network.protocol.packet.login.StatSvc$Register$online$1.invoke(StatSvc.kt:168) at net.mamoe.mirai.internal.network.protocol.packet.login.StatSvc$Register.impl(StatSvc.kt:273) at net.mamoe.mirai.internal.network.protocol.packet.login.StatSvc$Register.online(StatSvc.kt:168) at net.mamoe.mirai.internal.network.protocol.packet.login.StatSvc$Register.online$default(StatSvc.kt:165) at net.mamoe.mirai.internal.network.components.SsoProcessorImpl.registerClientOnline(SsoProcessor.kt:165) at net.mamoe.mirai.internal.network.components.SsoProcessorImpl.login(SsoProcessor.kt:156) at net.mamoe.mirai.internal.network.components.SsoProcessorImpl$login$1.invokeSuspend(SsoProcessor.kt) at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33) at kotlinx.coroutines.internal.ScopeCoroutine.afterResume(Scopes.kt:33) 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:106) at kotlinx.coroutines.scheduling.CoroutineScheduler.runSafely(CoroutineScheduler.kt:570) at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.executeTask(CoroutineScheduler.kt:750) at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.runWorker(CoroutineScheduler.kt:677) at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.run(CoroutineScheduler.kt:664) Caused by: 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 kotlinx.serialization.json.internal.StreamingJsonDecoder.decodeSerializableValue(StreamingJsonDecoder.kt:40) at kotlinx.serialization.encoding.AbstractDecoder.decodeSerializableValue(AbstractDecoder.kt:43) at kotlinx.serialization.encoding.AbstractDecoder.decodeSerializableElement(AbstractDecoder.kt:70) at kotlinx.serialization.json.internal.StreamingJsonDecoder.decodeSerializableElement(StreamingJsonDecoder.kt:111) at net.mamoe.mirai.internal.network.FriendListCache$$serializer.deserialize(ContactListCache.kt:34) at net.mamoe.mirai.internal.network.FriendListCache$$serializer.deserialize(ContactListCache.kt:34) at kotlinx.serialization.json.internal.PolymorphicKt.decodeSerializableValuePolymorphic(Polymorphic.kt:59) at kotlinx.serialization.json.internal.StreamingJsonDecoder.decodeSerializableValue(StreamingJsonDecoder.kt:38) ... 23 more Caused by: 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 kotlinx.serialization.json.internal.StreamingJsonDecoder.decodeSerializableValue(StreamingJsonDecoder.kt:40) at kotlinx.serialization.encoding.AbstractDecoder.decodeSerializableValue(AbstractDecoder.kt:43) at kotlinx.serialization.encoding.AbstractDecoder.decodeSerializableElement(AbstractDecoder.kt:70) at kotlinx.serialization.json.internal.StreamingJsonDecoder.decodeSerializableElement(StreamingJsonDecoder.kt:111) at kotlinx.serialization.encoding.CompositeDecoder$DefaultImpls.decodeSerializableElement$default(Decoding.kt:537) at kotlinx.serialization.internal.CollectionLikeSerializer.readElement(CollectionSerializers.kt:80) at kotlinx.serialization.internal.AbstractCollectionSerializer.readElement$default(CollectionSerializers.kt:51) at kotlinx.serialization.internal.AbstractCollectionSerializer.merge(CollectionSerializers.kt:36) at kotlinx.serialization.internal.AbstractCollectionSerializer.deserialize(CollectionSerializers.kt:43) at kotlinx.serialization.json.internal.PolymorphicKt.decodeSerializableValuePolymorphic(Polymorphic.kt:59) at kotlinx.serialization.json.internal.StreamingJsonDecoder.decodeSerializableValue(StreamingJsonDecoder.kt:38) ... 30 more Caused by: kotlinx.serialization.MissingFieldException: Field 'friendGroupId' is required for type with serial name 'net.mamoe.mirai.internal.contact.info.FriendInfoImpl', but it was missing at kotlinx.serialization.internal.PluginExceptionsKt.throwMissingFieldException(PluginExceptions.kt:20) at net.mamoe.mirai.internal.contact.info.FriendInfoImpl.<init>(FriendInfoImpl.kt:16) at net.mamoe.mirai.internal.contact.info.FriendInfoImpl$$serializer.deserialize(FriendInfoImpl.kt:16) at net.mamoe.mirai.internal.contact.info.FriendInfoImpl$$serializer.deserialize(FriendInfoImpl.kt:16) at kotlinx.serialization.json.internal.PolymorphicKt.decodeSerializableValuePolymorphic(Polymorphic.kt:59) at kotlinx.serialization.json.internal.StreamingJsonDecoder.decodeSerializableValue(StreamingJsonDecoder.kt:38) ... 40 more
-
Field 'friendGroupId' is required for type with serial name 'net.mamoe.mirai.internal.contact.info.FriendInfoImpl'
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]
一直报错 -
2.13.0问题,找不到类OkHttp?怎么回事
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 -
RE: 机器人被群友发起临时会话的消息接收不到
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) -
RE: QQ群成员(未加好友)私聊报错
<dependency>
<groupId>net.mamoe</groupId>
<artifactId>mirai-core-jvm</artifactId>
<version>2.7-M2</version>
</dependency> -
QQ群成员(未加好友)私聊报错
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)