simple-robot / simpler-robot

Simple Robot,一个bot风格的Kotlin多平台事件调度框架,异步高效、Java友好!/ A Bot-style Kotlin Multiplatform event scheduling framework, asynchronous and high-performance, java-friendly! 🐱😼😻😸
https://simbot.forte.love
GNU Lesser General Public License v3.0
512 stars 44 forks source link

当前QQ版本过低,请升级至最新版本后再登录 #481

Closed NiceCatCoder closed 1 year ago

NiceCatCoder commented 1 year ago

版本号

simboot-core-spring-boot-starter:3.0.0-beta.3

附加版本

simbot-component-mirai-boot:3.0.0.0-beta.1

问题描述

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

复现方式

-

相关日志

2022-10-22 13:19:16.924  INFO 3096 --- [atcher-worker-1] love.forte.simbot.mirai.bot.2901211512   : [SliderCaptcha] 正在提交中...
2022-10-22 13:19:16.924  INFO 3096 --- [atcher-worker-1] love.forte.simbot.mirai.bot.2901211512   : [SliderCaptcha] Submitting...
2022-10-22 13:19:17.155  WARN 3096 --- [ispatcherThread] love.forte.simbot.mirai.net.2901211512   : null

net.mamoe.mirai.network.WrongPasswordException: Error(bot=Bot(2901211512), code=235, title=温馨提示, message=当前QQ版本过低,请升级至最新版本后再登录。点击进入下载页面, errorInfo= )
    at net.mamoe.mirai.internal.network.components.SsoProcessorImpl$SlowLoginImpl.doLogin(SsoProcessor.kt:284) ~[mirai-core-jvm-2.12.1.jar:2.12.1]
    at net.mamoe.mirai.internal.network.components.SsoProcessorImpl$SlowLoginImpl$doLogin$1.invokeSuspend(SsoProcessor.kt) ~[mirai-core-jvm-2.12.1.jar:2.12.1]
    at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33) ~[kotlin-stdlib-1.6.21.jar:1.6.21-release-334(1.6.21)]
    at kotlinx.coroutines.internal.ScopeCoroutine.afterResume(Scopes.kt:33) ~[kotlinx-coroutines-core-jvm-1.6.1.jar:na]
    at kotlinx.coroutines.AbstractCoroutine.resumeWith(AbstractCoroutine.kt:102) ~[kotlinx-coroutines-core-jvm-1.6.1.jar:na]
    at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:46) ~[kotlin-stdlib-1.6.21.jar:1.6.21-release-334(1.6.21)]
    at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:106) ~[kotlinx-coroutines-core-jvm-1.6.1.jar:na]
    at kotlinx.coroutines.scheduling.CoroutineScheduler.runSafely(CoroutineScheduler.kt:570) ~[kotlinx-coroutines-core-jvm-1.6.1.jar:na]
    at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.executeTask(CoroutineScheduler.kt:749) ~[kotlinx-coroutines-core-jvm-1.6.1.jar:na]
    at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.runWorker(CoroutineScheduler.kt:677) ~[kotlinx-coroutines-core-jvm-1.6.1.jar:na]
    at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.run(CoroutineScheduler.kt:664) ~[kotlinx-coroutines-core-jvm-1.6.1.jar:na]

2022-10-22 13:19:17.164  INFO 3096 --- [ispatcherThread] love.forte.simbot.mirai.bot.2901211512   : Bot cancelled: Bot closed
2022-10-22 13:19:17.167  WARN 3096 --- [           main] ConfigServletWebServerApplicationContext : Exception encountered during context initialization - cancelling refresh attempt: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'simbotSpringBootApplication' defined in love.forte.simboot.spring.autoconfigure.SimbotSpringBootApplicationConfiguration: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [love.forte.simboot.spring.autoconfigure.application.SpringBootApplication]: Factory method 'simbotSpringBootApplication' threw exception; nested exception is java.lang.IllegalStateException: Can't overwrite cause with a null
2022-10-22 13:19:17.172  INFO 3096 --- [           main] o.apache.catalina.core.StandardService   : Stopping service [Tomcat]
2022-10-22 13:19:17.190  INFO 3096 --- [           main] ConditionEvaluationReportLoggingListener : 

Error starting ApplicationContext. To display the conditions report re-run your application with 'debug' enabled.
2022-10-22 13:19:17.229 ERROR 3096 --- [           main] o.s.boot.SpringApplication               : Application run failed

org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'simbotSpringBootApplication' defined in love.forte.simboot.spring.autoconfigure.SimbotSpringBootApplicationConfiguration: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [love.forte.simboot.spring.autoconfigure.application.SpringBootApplication]: Factory method 'simbotSpringBootApplication' threw exception; nested exception is java.lang.IllegalStateException: Can't overwrite cause with a null
    at org.springframework.beans.factory.support.ConstructorResolver.instantiate(ConstructorResolver.java:658) ~[spring-beans-5.3.20.jar:5.3.20]
    at org.springframework.beans.factory.support.ConstructorResolver.instantiateUsingFactoryMethod(ConstructorResolver.java:638) ~[spring-beans-5.3.20.jar:5.3.20]
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateUsingFactoryMethod(AbstractAutowireCapableBeanFactory.java:1352) ~[spring-beans-5.3.20.jar:5.3.20]
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:1195) ~[spring-beans-5.3.20.jar:5.3.20]
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:582) ~[spring-beans-5.3.20.jar:5.3.20]
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:542) ~[spring-beans-5.3.20.jar:5.3.20]
    at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:335) ~[spring-beans-5.3.20.jar:5.3.20]
    at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:234) ~[spring-beans-5.3.20.jar:5.3.20]
    at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:333) ~[spring-beans-5.3.20.jar:5.3.20]
    at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:208) ~[spring-beans-5.3.20.jar:5.3.20]
    at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:953) ~[spring-beans-5.3.20.jar:5.3.20]
    at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:918) ~[spring-context-5.3.20.jar:5.3.20]
    at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:583) ~[spring-context-5.3.20.jar:5.3.20]
    at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.refresh(ServletWebServerApplicationContext.java:147) ~[spring-boot-2.7.0.jar:2.7.0]
    at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:734) ~[spring-boot-2.7.0.jar:2.7.0]
    at org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:408) ~[spring-boot-2.7.0.jar:2.7.0]
    at org.springframework.boot.SpringApplication.run(SpringApplication.java:308) ~[spring-boot-2.7.0.jar:2.7.0]
    at org.springframework.boot.SpringApplication.run(SpringApplication.java:1306) ~[spring-boot-2.7.0.jar:2.7.0]
    at org.springframework.boot.SpringApplication.run(SpringApplication.java:1295) ~[spring-boot-2.7.0.jar:2.7.0]
    at indi.bread_nicecat.bncrobot.BNCRobot.main(BNCRobot.java:17) ~[classes/:na]
Caused by: org.springframework.beans.BeanInstantiationException: Failed to instantiate [love.forte.simboot.spring.autoconfigure.application.SpringBootApplication]: Factory method 'simbotSpringBootApplication' threw exception; nested exception is java.lang.IllegalStateException: Can't overwrite cause with a null
    at org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:185) ~[spring-beans-5.3.20.jar:5.3.20]
    at org.springframework.beans.factory.support.ConstructorResolver.instantiate(ConstructorResolver.java:653) ~[spring-beans-5.3.20.jar:5.3.20]
    ... 19 common frames omitted
Caused by: java.lang.IllegalStateException: Can't overwrite cause with a null
    at java.base/java.lang.Throwable.initCause(Throwable.java:463) ~[na:na]
    at love.forte.simbot.component.mirai.internal.MiraiBotImpl.start(MiraiBotImpl.kt:239) ~[simbot-component-mirai-core-3.0.0.0-beta.1.jar:na]
    at love.forte.simbot.component.mirai.internal.MiraiBotImpl$start$1.invokeSuspend(MiraiBotImpl.kt) ~[simbot-component-mirai-core-3.0.0.0-beta.1.jar:na]
    at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33) ~[kotlin-stdlib-1.6.21.jar:1.6.21-release-334(1.6.21)]
    at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:104) ~[kotlinx-coroutines-core-jvm-1.6.1.jar:na]
    at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136) ~[na:na]
    at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635) ~[na:na]
    at java.base/java.lang.Thread.run(Thread.java:833) ~[na:na]
Caused by: net.mamoe.mirai.network.WrongPasswordException: Error(bot=Bot(2901211512), code=235, title=温馨提示, message=当前QQ版本过低,请升级至最新版本后再登录。点击进入下载页面, errorInfo= )
    at net.mamoe.mirai.internal.network.components.SsoProcessorImpl$SlowLoginImpl.doLogin(SsoProcessor.kt:284) ~[mirai-core-jvm-2.12.1.jar:2.12.1]
    at net.mamoe.mirai.internal.network.components.SsoProcessorImpl$SlowLoginImpl$doLogin$1.invokeSuspend(SsoProcessor.kt) ~[mirai-core-jvm-2.12.1.jar:2.12.1]
    at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33) ~[kotlin-stdlib-1.6.21.jar:1.6.21-release-334(1.6.21)]
    at kotlinx.coroutines.internal.ScopeCoroutine.afterResume(Scopes.kt:33) ~[kotlinx-coroutines-core-jvm-1.6.1.jar:na]
    at kotlinx.coroutines.AbstractCoroutine.resumeWith(AbstractCoroutine.kt:102) ~[kotlinx-coroutines-core-jvm-1.6.1.jar:na]
    at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:46) ~[kotlin-stdlib-1.6.21.jar:1.6.21-release-334(1.6.21)]
    at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:106) ~[kotlinx-coroutines-core-jvm-1.6.1.jar:na]
    at kotlinx.coroutines.scheduling.CoroutineScheduler.runSafely(CoroutineScheduler.kt:570) ~[kotlinx-coroutines-core-jvm-1.6.1.jar:na]
    at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.executeTask(CoroutineScheduler.kt:749) ~[kotlinx-coroutines-core-jvm-1.6.1.jar:na]
    at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.runWorker(CoroutineScheduler.kt:677) ~[kotlinx-coroutines-core-jvm-1.6.1.jar:na]
    at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.run(CoroutineScheduler.kt:664) ~[kotlinx-coroutines-core-jvm-1.6.1.jar:na]
    Suppressed: java.util.concurrent.CancellationException: Bot closed
        at kotlinx.coroutines.ExceptionsKt.CancellationException(Exceptions.kt:22) ~[kotlinx-coroutines-core-jvm-1.6.1.jar:na]
        at net.mamoe.mirai.internal.AbstractBot.close(AbstractBot.kt:112) ~[mirai-core-jvm-2.12.1.jar:2.12.1]
        at net.mamoe.mirai.internal.QQAndroidBot.close(QQAndroidBot.kt:84) ~[mirai-core-jvm-2.12.1.jar:2.12.1]
        at net.mamoe.mirai.internal.AbstractBot.login(AbstractBot.kt:136) ~[mirai-core-jvm-2.12.1.jar:2.12.1]
        at net.mamoe.mirai.internal.AbstractBot$login$1.invokeSuspend(AbstractBot.kt) ~[mirai-core-jvm-2.12.1.jar:2.12.1]
        at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33) ~[kotlin-stdlib-1.6.21.jar:1.6.21-release-334(1.6.21)]
        at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:104) ~[kotlinx-coroutines-core-jvm-1.6.1.jar:na]
        at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136) ~[na:na]
        at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635) ~[na:na]
        at java.base/java.lang.Thread.run(Thread.java:833) ~[na:na]
    Caused by: net.mamoe.mirai.network.WrongPasswordException: Error(bot=Bot(2901211512), code=235, title=温馨提示, message=当前QQ版本过低,请升级至最新版本后再登录。点击进入下载页面, errorInfo= )

其他补充

No response

ForteScarlet commented 1 year ago

参考 https://github.com/orgs/simple-robot/discussions/9

NiceCatCoder commented 1 year ago

仍未解决

NiceCatCoder commented 1 year ago

更换V3->V2后此问题仍未解决,密码正确,ticket是我手动提取的不知道方法对不对 image

NiceCatCoder commented 1 year ago
net.mamoe.mirai.network.WrongPasswordException: Error(bot=Bot(2901211512), code=235, title=温馨提示, message=当前QQ版本过低,请升级至最新版本后再登录。点击进入下载页面, errorInfo= )]
进程已结束,退出代码1

config.yml

simbot:
core:
bots: 2901211512:**
scan-package: indi.bread_nicecat.bncrobot.listener
bncatbot:
core:
astest: astest

BNCRobot.java


package indi.bread_nicecat.bncrobot;

import love.forte.common.configuration.Configuration; import love.forte.simbot.annotation.SimbotApplication; import love.forte.simbot.annotation.SimbotResource; import love.forte.simbot.core.SimbotApp; import love.forte.simbot.core.SimbotContext;

/**

@SimbotApplication(@SimbotResource(value = "bncat-robot-config.yml")) public class BNCRobot { public static void main(String[] args) { SimbotContext context = SimbotApp.run(BNCRobot.class, args); Configuration configuration = context.getConfiguration(); } }

ForteScarlet commented 1 year ago

这跟v2或v3关系不大,主要追踪或参考涉及到的mirai issue。 可以考虑多换几个账号试试

NiceCatCoder commented 1 year ago

Solved!主要是因为IDEA的链接识别有些问题,导致链接后半段没有一起被复制,导致ticket不对应。但是我有些疑惑,他这个代码是235不是237.应该还有其他的原因吧...

ForteScarlet commented 1 year ago

这东西一直挺玄学的,就当它是魔法吧