mamoe / mirai

高效率 QQ 机器人支持库
https://mirai.mamoe.net
GNU Affero General Public License v3.0
14.5k stars 2.54k forks source link

登录显示版本过低 #2310

Closed thirdwillow closed 2 years ago

thirdwillow commented 2 years ago

问题描述

Exception in thread "main" net.mamoe.mirai.network.WrongPasswordException: Error(bot=Bot(1980524034), code=235, title=温馨提示, message=当前QQ版本过低,请升级至最新版本后再登录。点击进入下载页面, errorInfo= )

QQ密码已经改成了12位

奇怪的是直接在idea里面可以运行,但是打包出来就出现这个问题

复现

        Bot bot1 = BotFactory.INSTANCE.newBot(xxxx,"xxxxxxxx",new BotConfiguration(){{
            fileBasedDeviceInfo();
        }});
        TolData tolData1 = new TolData(bot1);
        tolData = tolData1;

账号密码做了隐藏,12位密码

mirai-core 版本

2.12.1

bot-protocol

MACOS

其他组件版本

系统日志

2022-10-27 21:06:28 I/WindowHelperJvm: Mirai 正在使用桌面环境. 如遇到验证码将会弹出对话框. 可添加 JVM 属性 `mirai.no-desktop` 以关闭.
2022-10-27 21:06:28 I/WindowHelperJvm: Mirai is using desktop. Captcha will be thrown by window popup. You can add `mirai.no-desktop` to JVM properties (-Dmirai.no-desktop) to disable it.
SLF4J: Failed to load class "org.slf4j.impl.StaticLoggerBinder".
SLF4J: Defaulting to no-operation (NOP) logger implementation
SLF4J: See http://www.slf4j.org/codes.html#StaticLoggerBinder for further details.
ERROR StatusLogger Log4j2 could not find a logging implementation. Please add log4j-core to the classpath. Using SimpleLogger to log to the console...
2022-10-27 21:06:29 V/Net 1980524034: No server list cached.
java.security.NoSuchProviderException: JCE cannot authenticate the provider BC
        at java.base/javax.crypto.JceSecurity.getInstance(JceSecurity.java:132)
        at java.base/javax.crypto.KeyAgreement.getInstance(KeyAgreement.java:238)
        at net.mamoe.mirai.internal.utils.crypto.ECDH$Companion.calculateShareKey(ECDHJvmDesktop.kt:89)
        at net.mamoe.mirai.internal.utils.crypto.ECDH.lambda-3$testECDH(ECDHJvmDesktop.kt:49)
        at net.mamoe.mirai.internal.utils.crypto.ECDH.<clinit>(ECDHJvmDesktop.kt:61)
        at net.mamoe.mirai.internal.utils.crypto.ECDHKt.adjustToPublicKey(ECDH.kt:141)
        at net.mamoe.mirai.internal.utils.crypto.ECDHKt.adjustToPublicKey(ECDH.kt:136)
        at net.mamoe.mirai.internal.utils.crypto.ECDHInitialPublicKey.<init>(ECDH.kt:125)
        at net.mamoe.mirai.internal.utils.crypto.ECDHInitialPublicKey.<init>(ECDH.kt:123)
        at net.mamoe.mirai.internal.utils.crypto.ECDHKt$defaultInitialPublicKey$2.invoke(ECDH.kt:132)
        at net.mamoe.mirai.internal.utils.crypto.ECDHKt$defaultInitialPublicKey$2.invoke(ECDH.kt:132)
        at kotlin.SynchronizedLazyImpl.getValue(LazyJVM.kt:74)
        at net.mamoe.mirai.internal.utils.crypto.ECDHKt.getDefaultInitialPublicKey(ECDH.kt:132)
        at net.mamoe.mirai.internal.network.components.AccountSecretsManagerKt.AccountSecretsImpl(AccountSecretsManager.kt:146)
        at net.mamoe.mirai.internal.network.components.AccountSecretsManagerKt.getSecretsOrCreate(AccountSecretsManager.kt:154)
        at net.mamoe.mirai.internal.network.components.BotClientHolderImpl.createClient(BotClientHolder.kt:36)
        at net.mamoe.mirai.internal.network.components.BotClientHolderImpl.access$createClient(BotClientHolder.kt:24)
        at net.mamoe.mirai.internal.network.components.BotClientHolderImpl$client$2.invoke(BotClientHolder.kt:28)
        at net.mamoe.mirai.internal.network.components.BotClientHolderImpl$client$2.invoke(BotClientHolder.kt:28)
        at net.mamoe.mirai.utils.LateinitMutableProperty.getValue(LateinitMutableProperty.kt:38)
        at net.mamoe.mirai.internal.network.components.BotClientHolderImpl.getClient(BotClientHolder.kt:28)
        at net.mamoe.mirai.internal.network.components.SsoProcessorImpl.getClient(SsoProcessor.kt:97)
        at net.mamoe.mirai.internal.network.components.SsoProcessorImpl.login(SsoProcessor.kt:111)
        at net.mamoe.mirai.internal.network.impl.netty.NettyNetworkHandler$StateConnecting$1.invokeSuspend(NettyNetworkHandler.kt:257)
        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)
Caused by: java.util.jar.JarException: file:/G:/java/QQRobot/target/QQRobot-1.0-SNAPSHOT.jar has unsigned entries - a.json
        at java.base/javax.crypto.JarVerifier.verifySingleJar(JarVerifier.java:459)
        at java.base/javax.crypto.JarVerifier.verifyJars(JarVerifier.java:314)
        at java.base/javax.crypto.JarVerifier.verify(JarVerifier.java:257)
        at java.base/javax.crypto.ProviderVerifier.verify(ProviderVerifier.java:129)
        at java.base/javax.crypto.JceSecurity.verifyProvider(JceSecurity.java:191)
        at java.base/javax.crypto.JceSecurity.getVerificationResult(JceSecurity.java:217)
        at java.base/javax.crypto.JceSecurity.getInstance(JceSecurity.java:129)
        ... 29 more
2022-10-27 21:06:31 I/Net 1980524034: ECDH key is invalid, start to fetch ecdh public key from server.
2022-10-27 21:06:32 I/Net 1980524034: Successfully fetched ecdh public key from server.
2022-10-27 21:06:32 V/Net 1980524034: Send: wtlogin.login
2022-10-27 21:06:32 W/Net 1980524034: net.mamoe.mirai.network.WrongPasswordException: Error(bot=Bot(1980524034), code=235, title=温馨提示, message=当前QQ版本过低,请升级至最新版本后再登录。点击进入下载页面, errorInfo= )
net.mamoe.mirai.network.WrongPasswordException: Error(bot=Bot(1980524034), code=235, title=温馨提示, message=当前QQ版本 过低,请升级至最新版本后再登录。点击进入下载页面, errorInfo= )
        at net.mamoe.mirai.internal.network.components.SsoProcessorImpl$SlowLoginImpl.doLogin(SsoProcessor.kt:265)
        at net.mamoe.mirai.internal.network.components.SsoProcessorImpl$SlowLoginImpl$doLogin$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: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)

Exception in thread "main" net.mamoe.mirai.network.WrongPasswordException: Error(bot=Bot(1980524034), code=235, title=温馨提示, message=当前QQ版本过低,请升级至最新版本后再登录。点击进入下载页面, errorInfo= )
        at net.mamoe.mirai.internal.network.components.SsoProcessorImpl$SlowLoginImpl.doLogin(SsoProcessor.kt:265)
        at net.mamoe.mirai.internal.network.components.SsoProcessorImpl$SlowLoginImpl$doLogin$1.invokeSuspend(SsoProcessor.kt)2022-10-27 21:06:32 V/Net 1980524034: Recv: wtlogin.login

        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)
2022-10-27 21:06:32 I/Bot 1980524034: Bot cancelled: Bot closed        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)
        Suppressed: java.util.concurrent.CancellationException: Bot closed
                at kotlinx.coroutines.ExceptionsKt.CancellationException(Exceptions.kt:22)
                at net.mamoe.mirai.internal.AbstractBot.close(AbstractBot.kt:112)
                at net.mamoe.mirai.internal.QQAndroidBot.close(QQAndroidBot.kt:83)
                at net.mamoe.mirai.internal.AbstractBot.login(AbstractBot.kt:136)
                at net.mamoe.mirai.internal.AbstractBot$login$1.invokeSuspend(AbstractBot.kt)
                at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33)
                at kotlinx.coroutines.DispatchedTaskKt.resume(DispatchedTask.kt:178)
                at kotlinx.coroutines.DispatchedTaskKt.dispatch(DispatchedTask.kt:166)
                at kotlinx.coroutines.CancellableContinuationImpl.dispatchResume(CancellableContinuationImpl.kt:397)
                at kotlinx.coroutines.CancellableContinuationImpl.resumeImpl(CancellableContinuationImpl.kt:431)
                at kotlinx.coroutines.CancellableContinuationImpl.resumeImpl$default(CancellableContinuationImpl.kt:420)
                at kotlinx.coroutines.CancellableContinuationImpl.resumeWith(CancellableContinuationImpl.kt:328)
                at kotlinx.coroutines.ResumeAwaitOnCompletion.invoke(JobSupport.kt:1408)
                at kotlinx.coroutines.JobSupport.notifyCompletion(JobSupport.kt:1519)
                at kotlinx.coroutines.JobSupport.completeStateFinalization(JobSupport.kt:323)
                at kotlinx.coroutines.JobSupport.finalizeFinishingState(JobSupport.kt:240)
                at kotlinx.coroutines.JobSupport.tryMakeCompletingSlowPath(JobSupport.kt:906)
                at kotlinx.coroutines.JobSupport.tryMakeCompleting(JobSupport.kt:863)
                at kotlinx.coroutines.JobSupport.makeCompletingOnce$kotlinx_coroutines_core(JobSupport.kt:828)
                at kotlinx.coroutines.AbstractCoroutine.resumeWith(AbstractCoroutine.kt:100)
                at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:46)
                ... 8 more
        [CIRCULAR REFERENCE:net.mamoe.mirai.network.WrongPasswordException: Error(bot=Bot(1980524034), code=235, title= 温馨提示, message=当前QQ版本过低,请升级至最新版本后再登录。点击进入下载页面, errorInfo= )]

网络日志

没有找到网络日志

补充信息

cssxsh commented 2 years ago

已有相似 issue https://github.com/mamoe/mirai/issues/2298

Him188 commented 2 years ago
java.security.NoSuchProviderException: JCE cannot authenticate the provider BC

换非 Oracle JDK 试试

thirdwillow commented 2 years ago

换了jdk17,然后登录方式改成了pad成功了