cssxsh / fix-protocol-version

GNU Affero General Public License v3.0
105 stars 19 forks source link

fix-protocol-version v1.11.1 及以上版本 Java8 用不了 #86

Closed lcx1969001 closed 1 year ago

lcx1969001 commented 1 year ago

问题描述

从 fix-protocol-version v1.11.1 开始 async-http-client 更新到了 3.0.0.Beta2 版本,但是 Java8 似乎不支持 3.0.0.Beta2 版本,这对使用 mirai-core 且使用的是 java8 的项目不太友好

复现

  1. 使用 Java8
  2. 使用 fix-protocol-version v1.11.1 及以上版本

mirai-core 版本

2.16.0-RC

bot-protocol

ANDROID_PAD

签名服务

unidbg-fetch-qsign: 1.1.7

系统日志

Caused by: java.lang.UnsupportedClassVersionError: org/asynchttpclient/Dsl has been compiled by a more recent version of the Java Runtime (class file version 55.0), this version of the Java Runtime only recognizes class file versions up to 52.0
    at java.lang.ClassLoader.defineClass1(Native Method)
    at java.lang.ClassLoader.defineClass(ClassLoader.java:763)
    at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142)
    at java.net.URLClassLoader.defineClass(URLClassLoader.java:467)
    at java.net.URLClassLoader.access$100(URLClassLoader.java:73)
    at java.net.URLClassLoader$1.run(URLClassLoader.java:368)
    at java.net.URLClassLoader$1.run(URLClassLoader.java:362)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.net.URLClassLoader.findClass(URLClassLoader.java:361)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
    at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:349)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
    at xyz.cssxsh.mirai.tool.KFCFactory.createForBot(KFCFactory.kt:87)
    at net.mamoe.mirai.internal.network.components.EncryptServiceHolderImpl.<init>(EncryptServiceHolder.kt:49)
    at net.mamoe.mirai.internal.QQAndroidBot.createBotLevelComponents(QQAndroidBot.kt:288)
    at net.mamoe.mirai.internal.QQAndroidBot$defaultBotLevelComponents$2.invoke(QQAndroidBot.kt:192)
    at net.mamoe.mirai.internal.QQAndroidBot$defaultBotLevelComponents$2.invoke(QQAndroidBot.kt:191)
    at net.mamoe.mirai.utils.LateinitMutableProperty.getValue(LateinitMutableProperty.kt:47)
    at net.mamoe.mirai.internal.QQAndroidBot.getDefaultBotLevelComponents(QQAndroidBot.kt:191)
    at net.mamoe.mirai.internal.QQAndroidBot.createNetworkLevelComponents(QQAndroidBot.kt:300)
    at net.mamoe.mirai.internal.QQAndroidBot$createNetworkHandler$1.invoke(QQAndroidBot.kt:312)
    at net.mamoe.mirai.internal.QQAndroidBot$createNetworkHandler$1.invoke(QQAndroidBot.kt:305)
    at net.mamoe.mirai.internal.network.handler.selector.AbstractKeepAliveNetworkHandlerSelectorKt$KeepAliveNetworkHandlerSelector$1.createInstance(AbstractKeepAliveNetworkHandlerSelector.kt:277)
    at net.mamoe.mirai.internal.network.handler.selector.AbstractKeepAliveNetworkHandlerSelector.refreshInstance(AbstractKeepAliveNetworkHandlerSelector.kt:249)
    at net.mamoe.mirai.internal.network.handler.selector.AbstractKeepAliveNetworkHandlerSelector.getCurrentInstanceOrCreate(AbstractKeepAliveNetworkHandlerSelector.kt:57)
    at net.mamoe.mirai.internal.network.handler.selector.SelectorNetworkHandler.getContext(SelectorNetworkHandler.kt:51)
    at net.mamoe.mirai.internal.AbstractBot$network$2.invoke(AbstractBot.kt:139)
    at net.mamoe.mirai.internal.AbstractBot$network$2.invoke(AbstractBot.kt:137)
    at kotlin.SynchronizedLazyImpl.getValue(LazyJVM.kt:74)
    at net.mamoe.mirai.internal.AbstractBot.getNetwork(AbstractBot.kt:137)
    at net.mamoe.mirai.internal.AbstractBot.login(AbstractBot.kt:147)
    at net.mamoe.mirai.Bot$login$1.invoke(Bot.kt:65535)
    at net.mamoe.mirai.Bot$login$1.invoke(Bot.kt)
    at kotlin.coroutines.intrinsics.IntrinsicsKt__IntrinsicsJvmKt$createCoroutineUnintercepted$$inlined$createCoroutineFromSuspendFunction$IntrinsicsKt__IntrinsicsJvmKt$1.invokeSuspend(IntrinsicsJvm.kt:205)
    at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33)
    at kotlin.coroutines.ContinuationKt.startCoroutine(Continuation.kt:115)
    at me.him188.kotlin.jvm.blocking.bridge.internal.RunSuspendKt.$runSuspend$(RunSuspend.kt:18)
    at net.mamoe.mirai.Bot.login(Bot.kt)
    at com.qch86.spring.service.BotLoginService.login(BotLoginService.java:25)
    at com.qch86.spring.controller.ApplicationStartController.onApplicationReadyEvent(ApplicationStartController.java:55)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:498)
    at org.springframework.context.event.ApplicationListenerMethodAdapter.doInvoke(ApplicationListenerMethodAdapter.java:344)
    ... 17 common frames omitted

网络日志

No response

补充信息

No response

cssxsh commented 1 year ago

已经发了很多个版本,没有理由再回退了 你有需要可以自行修改并编译