Open ForteScarlet opened 1 year ago
在对两个bot进行测试登录的时候,突然发现刚刚登录成功的一个bot突然提示‘密码错误’,在不修改密码的同时,使用 disableAccountSecretes() 后即可成功登录,因此怀疑这可能会导致bot登录时出现密码错误问题。
disableAccountSecretes()
val b1 = BotFactory.newBot(111, pwd){ // ... }.alsoLogin() val b2 = BotFactory.newBot(222, pwd){ // ... }.alsoLogin()
2.13.4
ANDROID_PHONE
No response
2023-02-06 17:09:25,198 DefaultDispatcher-worker-1 DEBUG Initializing configuration XmlConfiguration[location=G:\code\javaProjects\simbot-component-mirai\simbot-component-mirai-core\build\resources\test\log4j2.xml] 2023-02-06 17:09:25,205 DefaultDispatcher-worker-1 DEBUG Installed 1 script engine Warning: Nashorn engine is planned to be removed from a future JDK release 2023-02-06 17:09:25,413 DefaultDispatcher-worker-1 DEBUG Oracle Nashorn version: 11.0.18, language: ECMAScript, threading: Not Thread Safe, compile: true, names: [nashorn, Nashorn, js, JS, JavaScript, javascript, ECMAScript, ecmascript], factory class: jdk.nashorn.api.scripting.NashornScriptEngineFactory 2023-02-06 17:09:25,413 DefaultDispatcher-worker-1 DEBUG PluginManager 'Core' found 115 plugins 2023-02-06 17:09:25,414 DefaultDispatcher-worker-1 DEBUG PluginManager 'Level' found 0 plugins 2023-02-06 17:09:25,416 DefaultDispatcher-worker-1 DEBUG PluginManager 'Lookup' found 13 plugins 2023-02-06 17:09:25,417 DefaultDispatcher-worker-1 DEBUG Building Plugin[name=layout, class=org.apache.logging.log4j.core.layout.PatternLayout]. 2023-02-06 17:09:25,427 DefaultDispatcher-worker-1 DEBUG PluginManager 'TypeConverter' found 26 plugins 2023-02-06 17:09:25,439 DefaultDispatcher-worker-1 DEBUG PatternLayout$Builder(pattern="%d{yyyy-MM-dd HH:mm:ss.SSS} %highlight{%-5level} [%t] %highlight{%c{1.}.%M(%L)}: %msg%n", PatternSelector=null, Configuration(G:\code\javaProjects\simbot-component-mirai\simbot-component-mirai-core\build\resources\test\log4j2.xml), Replace=null, charset="null", alwaysWriteExceptions="null", disableAnsi="null", noConsoleNoAnsi="null", header="null", footer="null") 2023-02-06 17:09:25,440 DefaultDispatcher-worker-1 DEBUG PluginManager 'Converter' found 42 plugins 2023-02-06 17:09:25,452 DefaultDispatcher-worker-1 DEBUG Building Plugin[name=appender, class=org.apache.logging.log4j.core.appender.ConsoleAppender]. 2023-02-06 17:09:25,459 DefaultDispatcher-worker-1 DEBUG ConsoleAppender$Builder(target="SYSTEM_OUT", follow="null", direct="null", bufferedIo="null", bufferSize="null", immediateFlush="null", ignoreExceptions="null", PatternLayout(%d{yyyy-MM-dd HH:mm:ss.SSS} %highlight{%-5level} [%t] %highlight{%c{1.}.%M(%L)}: %msg%n), name="Console", Configuration(G:\code\javaProjects\simbot-component-mirai\simbot-component-mirai-core\build\resources\test\log4j2.xml), Filter=null) 2023-02-06 17:09:25,459 DefaultDispatcher-worker-1 DEBUG Jansi is not installed, cannot find org.fusesource.jansi.WindowsAnsiOutputStream 2023-02-06 17:09:25,460 DefaultDispatcher-worker-1 DEBUG Starting OutputStreamManager SYSTEM_OUT.false.false 2023-02-06 17:09:25,460 DefaultDispatcher-worker-1 DEBUG Building Plugin[name=appenders, class=org.apache.logging.log4j.core.config.AppendersPlugin]. 2023-02-06 17:09:25,461 DefaultDispatcher-worker-1 DEBUG createAppenders(={Console}) 2023-02-06 17:09:25,462 DefaultDispatcher-worker-1 DEBUG Building Plugin[name=logger, class=org.apache.logging.log4j.core.config.LoggerConfig]. 2023-02-06 17:09:25,465 DefaultDispatcher-worker-1 ERROR Loggers cannot be configured without a name: arg[2](null) 2023-02-06 17:09:25,466 DefaultDispatcher-worker-1 ERROR logger contains an invalid element or attribute "path" 2023-02-06 17:09:25,466 DefaultDispatcher-worker-1 DEBUG createLogger(additivity="true", level="null", name="null", includeLocation="null", ={}, ={}, Configuration(G:\code\javaProjects\simbot-component-mirai\simbot-component-mirai-core\build\resources\test\log4j2.xml), Filter=null) 2023-02-06 17:09:25,466 DefaultDispatcher-worker-1 ERROR Unable to invoke factory method in class org.apache.logging.log4j.core.config.LoggerConfig for element logger: org.apache.logging.log4j.core.config.ConfigurationException: Arguments given for element logger are invalid org.apache.logging.log4j.core.config.ConfigurationException: Arguments given for element logger are invalid at org.apache.logging.log4j.core.config.plugins.util.PluginBuilder.generateParameters(PluginBuilder.java:275) at org.apache.logging.log4j.core.config.plugins.util.PluginBuilder.build(PluginBuilder.java:135) at org.apache.logging.log4j.core.config.AbstractConfiguration.createPluginObject(AbstractConfiguration.java:958) at org.apache.logging.log4j.core.config.AbstractConfiguration.createConfiguration(AbstractConfiguration.java:898) at org.apache.logging.log4j.core.config.AbstractConfiguration.createConfiguration(AbstractConfiguration.java:890) at org.apache.logging.log4j.core.config.AbstractConfiguration.doConfigure(AbstractConfiguration.java:513) at org.apache.logging.log4j.core.config.AbstractConfiguration.initialize(AbstractConfiguration.java:237) at org.apache.logging.log4j.core.config.AbstractConfiguration.start(AbstractConfiguration.java:249) at org.apache.logging.log4j.core.LoggerContext.setConfiguration(LoggerContext.java:545) at org.apache.logging.log4j.core.LoggerContext.reconfigure(LoggerContext.java:617) at org.apache.logging.log4j.core.LoggerContext.reconfigure(LoggerContext.java:634) at org.apache.logging.log4j.core.LoggerContext.start(LoggerContext.java:229) at org.apache.logging.log4j.core.impl.Log4jContextFactory.getContext(Log4jContextFactory.java:152) at org.apache.logging.log4j.core.impl.Log4jContextFactory.getContext(Log4jContextFactory.java:45) at org.apache.logging.log4j.LogManager.getContext(LogManager.java:194) at org.apache.logging.log4j.spi.AbstractLoggerAdapter.getContext(AbstractLoggerAdapter.java:122) at org.apache.logging.slf4j.Log4jLoggerFactory.getContext(Log4jLoggerFactory.java:43) at org.apache.logging.log4j.spi.AbstractLoggerAdapter.getLogger(AbstractLoggerAdapter.java:46) at org.apache.logging.slf4j.Log4jLoggerFactory.getLogger(Log4jLoggerFactory.java:29) at org.slf4j.LoggerFactory.getLogger(LoggerFactory.java:363) at io.netty.util.internal.logging.Slf4JLoggerFactory.newInstance(Slf4JLoggerFactory.java:49) at io.netty.util.internal.logging.InternalLoggerFactory.useSlf4JLoggerFactory(InternalLoggerFactory.java:63) at io.netty.util.internal.logging.InternalLoggerFactory.newDefaultFactory(InternalLoggerFactory.java:42) at io.netty.util.internal.logging.InternalLoggerFactory.getDefaultFactory(InternalLoggerFactory.java:111) at io.netty.util.internal.logging.InternalLoggerFactory.getInstance(InternalLoggerFactory.java:134) at io.netty.util.internal.logging.InternalLoggerFactory.getInstance(InternalLoggerFactory.java:127) at io.netty.channel.MultithreadEventLoopGroup.<clinit>(MultithreadEventLoopGroup.java:35) at net.mamoe.mirai.internal.network.impl.netty.NettyNetworkHandler.createConnection$suspendImpl(NettyNetworkHandler.kt:87) at net.mamoe.mirai.internal.network.impl.netty.NettyNetworkHandler.createConnection(NettyNetworkHandler.kt) at net.mamoe.mirai.internal.network.handler.CommonNetworkHandler$StateConnecting$startState$1.invokeSuspend(CommonNetworkHandler.kt:240) 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: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) 2023-02-06 17:09:25,467 DefaultDispatcher-worker-1 DEBUG Building Plugin[name=appender-ref, class=org.apache.logging.log4j.core.config.AppenderRef]. 2023-02-06 17:09:25,467 DefaultDispatcher-worker-1 DEBUG createAppenderRef(ref="Console", level="null", Filter=null) 2023-02-06 17:09:25,468 DefaultDispatcher-worker-1 DEBUG Building Plugin[name=root, class=org.apache.logging.log4j.core.config.LoggerConfig$RootLogger]. 2023-02-06 17:09:25,468 DefaultDispatcher-worker-1 DEBUG createLogger(additivity="null", level="DEBUG", includeLocation="null", ={Console}, ={}, Configuration(G:\code\javaProjects\simbot-component-mirai\simbot-component-mirai-core\build\resources\test\log4j2.xml), Filter=null) 2023-02-06 17:09:25,469 DefaultDispatcher-worker-1 DEBUG Building Plugin[name=loggers, class=org.apache.logging.log4j.core.config.LoggersPlugin]. 2023-02-06 17:09:25,470 DefaultDispatcher-worker-1 ERROR Null object returned for logger in loggers. 2023-02-06 17:09:25,471 DefaultDispatcher-worker-1 DEBUG createLoggers(={, root}) 2023-02-06 17:09:25,471 DefaultDispatcher-worker-1 DEBUG Configuration XmlConfiguration[location=G:\code\javaProjects\simbot-component-mirai\simbot-component-mirai-core\build\resources\test\log4j2.xml] initialized 2023-02-06 17:09:25,471 DefaultDispatcher-worker-1 DEBUG Starting configuration XmlConfiguration[location=G:\code\javaProjects\simbot-component-mirai\simbot-component-mirai-core\build\resources\test\log4j2.xml] 2023-02-06 17:09:25,472 DefaultDispatcher-worker-1 DEBUG Log4j2 ConfigurationScheduler starting 1 threads 2023-02-06 17:09:25,476 DefaultDispatcher-worker-1 DEBUG Started configuration XmlConfiguration[location=G:\code\javaProjects\simbot-component-mirai\simbot-component-mirai-core\build\resources\test\log4j2.xml] OK. 2023-02-06 17:09:25,478 DefaultDispatcher-worker-1 DEBUG Shutting down OutputStreamManager SYSTEM_OUT.false.false-1 2023-02-06 17:09:25,478 DefaultDispatcher-worker-1 DEBUG Shut down OutputStreamManager SYSTEM_OUT.false.false-1, all resources released: true 2023-02-06 17:09:25,478 DefaultDispatcher-worker-1 DEBUG Appender DefaultConsole-1 stopped with status true 2023-02-06 17:09:25,478 DefaultDispatcher-worker-1 DEBUG Stopped org.apache.logging.log4j.core.config.DefaultConfiguration@6941473b OK 2023-02-06 17:09:25,539 DefaultDispatcher-worker-1 DEBUG Registering MBean org.apache.logging.log4j2:type=71bc1ae4 2023-02-06 17:09:25,541 DefaultDispatcher-worker-1 DEBUG Registering MBean org.apache.logging.log4j2:type=71bc1ae4,component=StatusLogger 2023-02-06 17:09:25,541 DefaultDispatcher-worker-1 DEBUG Registering MBean org.apache.logging.log4j2:type=71bc1ae4,component=ContextSelector 2023-02-06 17:09:25,542 DefaultDispatcher-worker-1 DEBUG Registering MBean org.apache.logging.log4j2:type=71bc1ae4,component=Loggers,name= 2023-02-06 17:09:25,543 DefaultDispatcher-worker-1 DEBUG Registering MBean org.apache.logging.log4j2:type=71bc1ae4,component=Appenders,name=Console 2023-02-06 17:09:25,544 DefaultDispatcher-worker-1 DEBUG Reconfiguration complete for context[name=71bc1ae4] at URI G:\code\javaProjects\simbot-component-mirai\simbot-component-mirai-core\build\resources\test\log4j2.xml (org.apache.logging.log4j.core.LoggerContext@54763d03) with optional ClassLoader: null 2023-02-06 17:09:25,545 DefaultDispatcher-worker-1 DEBUG Shutdown hook enabled. Registering a new one. 2023-02-06 17:09:25,545 DefaultDispatcher-worker-1 DEBUG LoggerContext[name=71bc1ae4, org.apache.logging.log4j.core.LoggerContext@54763d03] started OK. 2023-02-06 17:09:25.552 DEBUG [DefaultDispatcher-worker-1] i.n.u.i.l.InternalLoggerFactory.useSlf4JLoggerFactory(63): Using SLF4J as the default logging framework 2023-02-06 17:09:25.556 DEBUG [DefaultDispatcher-worker-1] i.n.c.MultithreadEventLoopGroup.<clinit>(44): -Dio.netty.eventLoopThreads: 16 2023-02-06 17:09:25.574 DEBUG [DefaultDispatcher-worker-1] i.n.u.i.InternalThreadLocalMap.<clinit>(83): -Dio.netty.threadLocalMap.stringBuilder.initialSize: 1024 2023-02-06 17:09:25.574 DEBUG [DefaultDispatcher-worker-1] i.n.u.i.InternalThreadLocalMap.<clinit>(86): -Dio.netty.threadLocalMap.stringBuilder.maxSize: 4096 2023-02-06 17:09:25.582 DEBUG [DefaultDispatcher-worker-1] i.n.c.n.NioEventLoop.<clinit>(106): -Dio.netty.noKeySetOptimization: false 2023-02-06 17:09:25.582 DEBUG [DefaultDispatcher-worker-1] i.n.c.n.NioEventLoop.<clinit>(107): -Dio.netty.selectorAutoRebuildThreshold: 512 2023-02-06 17:09:25.597 DEBUG [DefaultDispatcher-worker-1] i.n.u.i.PlatformDependent.isWindows0(1063): Platform: Windows 2023-02-06 17:09:25.599 DEBUG [DefaultDispatcher-worker-1] i.n.u.i.PlatformDependent0.explicitNoUnsafeCause0(433): -Dio.netty.noUnsafe: false 2023-02-06 17:09:25.599 DEBUG [DefaultDispatcher-worker-1] i.n.u.i.PlatformDependent0.javaVersion0(927): Java version: 11 2023-02-06 17:09:25.601 DEBUG [DefaultDispatcher-worker-1] i.n.u.i.PlatformDependent0.<clinit>(131): sun.misc.Unsafe.theUnsafe: available 2023-02-06 17:09:25.602 DEBUG [DefaultDispatcher-worker-1] i.n.u.i.PlatformDependent0.<clinit>(155): sun.misc.Unsafe.copyMemory: available 2023-02-06 17:09:25.603 DEBUG [DefaultDispatcher-worker-1] i.n.u.i.PlatformDependent0.<clinit>(193): java.nio.Buffer.address: available 2023-02-06 17:09:25.603 DEBUG [DefaultDispatcher-worker-1] i.n.u.i.PlatformDependent0.<clinit>(267): direct buffer constructor: unavailable java.lang.UnsupportedOperationException: Reflective setAccessible(true) disabled at io.netty.util.internal.ReflectionUtil.trySetAccessible(ReflectionUtil.java:31) ~[netty-all-4.1.63.Final.jar:4.1.63.Final] at io.netty.util.internal.PlatformDependent0$4.run(PlatformDependent0.java:239) ~[netty-all-4.1.63.Final.jar:4.1.63.Final] at java.security.AccessController.doPrivileged(Native Method) ~[?:?] at io.netty.util.internal.PlatformDependent0.<clinit>(PlatformDependent0.java:233) [netty-all-4.1.63.Final.jar:4.1.63.Final] at io.netty.util.internal.PlatformDependent.isAndroid(PlatformDependent.java:294) [netty-all-4.1.63.Final.jar:4.1.63.Final] at io.netty.util.internal.PlatformDependent.<clinit>(PlatformDependent.java:93) [netty-all-4.1.63.Final.jar:4.1.63.Final] at io.netty.channel.nio.NioEventLoop.newTaskQueue0(NioEventLoop.java:279) [netty-all-4.1.63.Final.jar:4.1.63.Final] at io.netty.channel.nio.NioEventLoop.newTaskQueue(NioEventLoop.java:150) [netty-all-4.1.63.Final.jar:4.1.63.Final] at io.netty.channel.nio.NioEventLoop.<init>(NioEventLoop.java:138) [netty-all-4.1.63.Final.jar:4.1.63.Final] at io.netty.channel.nio.NioEventLoopGroup.newChild(NioEventLoopGroup.java:146) [netty-all-4.1.63.Final.jar:4.1.63.Final] at io.netty.channel.nio.NioEventLoopGroup.newChild(NioEventLoopGroup.java:37) [netty-all-4.1.63.Final.jar:4.1.63.Final] at io.netty.util.concurrent.MultithreadEventExecutorGroup.<init>(MultithreadEventExecutorGroup.java:84) [netty-all-4.1.63.Final.jar:4.1.63.Final] at io.netty.util.concurrent.MultithreadEventExecutorGroup.<init>(MultithreadEventExecutorGroup.java:58) [netty-all-4.1.63.Final.jar:4.1.63.Final] at io.netty.channel.MultithreadEventLoopGroup.<init>(MultithreadEventLoopGroup.java:52) [netty-all-4.1.63.Final.jar:4.1.63.Final] at io.netty.channel.nio.NioEventLoopGroup.<init>(NioEventLoopGroup.java:96) [netty-all-4.1.63.Final.jar:4.1.63.Final] at io.netty.channel.nio.NioEventLoopGroup.<init>(NioEventLoopGroup.java:91) [netty-all-4.1.63.Final.jar:4.1.63.Final] at io.netty.channel.nio.NioEventLoopGroup.<init>(NioEventLoopGroup.java:72) [netty-all-4.1.63.Final.jar:4.1.63.Final] at io.netty.channel.nio.NioEventLoopGroup.<init>(NioEventLoopGroup.java:52) [netty-all-4.1.63.Final.jar:4.1.63.Final] at io.netty.channel.nio.NioEventLoopGroup.<init>(NioEventLoopGroup.java:44) [netty-all-4.1.63.Final.jar:4.1.63.Final] at net.mamoe.mirai.internal.network.impl.netty.NettyNetworkHandler.createConnection$suspendImpl(NettyNetworkHandler.kt:87) [mirai-core-jvm-2.13.4.jar:2.13.4] at net.mamoe.mirai.internal.network.impl.netty.NettyNetworkHandler.createConnection(NettyNetworkHandler.kt) [mirai-core-jvm-2.13.4.jar:2.13.4] at net.mamoe.mirai.internal.network.handler.CommonNetworkHandler$StateConnecting$startState$1.invokeSuspend(CommonNetworkHandler.kt:240) [mirai-core-jvm-2.13.4.jar:2.13.4] at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33) [kotlin-stdlib-1.8.0.jar:1.8.0-release-345(1.8.0)] at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:106) [kotlinx-coroutines-core-jvm-1.6.4.jar:?] at kotlinx.coroutines.scheduling.CoroutineScheduler.runSafely(CoroutineScheduler.kt:570) [kotlinx-coroutines-core-jvm-1.6.4.jar:?] at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.executeTask(CoroutineScheduler.kt:750) [kotlinx-coroutines-core-jvm-1.6.4.jar:?] at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.runWorker(CoroutineScheduler.kt:677) [kotlinx-coroutines-core-jvm-1.6.4.jar:?] at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.run(CoroutineScheduler.kt:664) [kotlinx-coroutines-core-jvm-1.6.4.jar:?] 2023-02-06 17:09:25.607 DEBUG [DefaultDispatcher-worker-1] i.n.u.i.PlatformDependent0.<clinit>(332): java.nio.Bits.unaligned: available, true 2023-02-06 17:09:25.608 DEBUG [DefaultDispatcher-worker-1] i.n.u.i.PlatformDependent0.<clinit>(391): jdk.internal.misc.Unsafe.allocateUninitializedArray(int): unavailable java.lang.IllegalAccessException: class io.netty.util.internal.PlatformDependent0$6 cannot access class jdk.internal.misc.Unsafe (in module java.base) because module java.base does not export jdk.internal.misc to unnamed module @7c46a8f4 at jdk.internal.reflect.Reflection.newIllegalAccessException(Reflection.java:361) ~[?:?] at java.lang.reflect.AccessibleObject.checkAccess(AccessibleObject.java:591) ~[?:?] at java.lang.reflect.Method.invoke(Method.java:558) ~[?:?] at io.netty.util.internal.PlatformDependent0$6.run(PlatformDependent0.java:353) ~[netty-all-4.1.63.Final.jar:4.1.63.Final] at java.security.AccessController.doPrivileged(Native Method) ~[?:?] at io.netty.util.internal.PlatformDependent0.<clinit>(PlatformDependent0.java:344) [netty-all-4.1.63.Final.jar:4.1.63.Final] at io.netty.util.internal.PlatformDependent.isAndroid(PlatformDependent.java:294) [netty-all-4.1.63.Final.jar:4.1.63.Final] at io.netty.util.internal.PlatformDependent.<clinit>(PlatformDependent.java:93) [netty-all-4.1.63.Final.jar:4.1.63.Final] at io.netty.channel.nio.NioEventLoop.newTaskQueue0(NioEventLoop.java:279) [netty-all-4.1.63.Final.jar:4.1.63.Final] at io.netty.channel.nio.NioEventLoop.newTaskQueue(NioEventLoop.java:150) [netty-all-4.1.63.Final.jar:4.1.63.Final] at io.netty.channel.nio.NioEventLoop.<init>(NioEventLoop.java:138) [netty-all-4.1.63.Final.jar:4.1.63.Final] at io.netty.channel.nio.NioEventLoopGroup.newChild(NioEventLoopGroup.java:146) [netty-all-4.1.63.Final.jar:4.1.63.Final] at io.netty.channel.nio.NioEventLoopGroup.newChild(NioEventLoopGroup.java:37) [netty-all-4.1.63.Final.jar:4.1.63.Final] at io.netty.util.concurrent.MultithreadEventExecutorGroup.<init>(MultithreadEventExecutorGroup.java:84) [netty-all-4.1.63.Final.jar:4.1.63.Final] at io.netty.util.concurrent.MultithreadEventExecutorGroup.<init>(MultithreadEventExecutorGroup.java:58) [netty-all-4.1.63.Final.jar:4.1.63.Final] at io.netty.channel.MultithreadEventLoopGroup.<init>(MultithreadEventLoopGroup.java:52) [netty-all-4.1.63.Final.jar:4.1.63.Final] at io.netty.channel.nio.NioEventLoopGroup.<init>(NioEventLoopGroup.java:96) [netty-all-4.1.63.Final.jar:4.1.63.Final] at io.netty.channel.nio.NioEventLoopGroup.<init>(NioEventLoopGroup.java:91) [netty-all-4.1.63.Final.jar:4.1.63.Final] at io.netty.channel.nio.NioEventLoopGroup.<init>(NioEventLoopGroup.java:72) [netty-all-4.1.63.Final.jar:4.1.63.Final] at io.netty.channel.nio.NioEventLoopGroup.<init>(NioEventLoopGroup.java:52) [netty-all-4.1.63.Final.jar:4.1.63.Final] at io.netty.channel.nio.NioEventLoopGroup.<init>(NioEventLoopGroup.java:44) [netty-all-4.1.63.Final.jar:4.1.63.Final] at net.mamoe.mirai.internal.network.impl.netty.NettyNetworkHandler.createConnection$suspendImpl(NettyNetworkHandler.kt:87) [mirai-core-jvm-2.13.4.jar:2.13.4] at net.mamoe.mirai.internal.network.impl.netty.NettyNetworkHandler.createConnection(NettyNetworkHandler.kt) [mirai-core-jvm-2.13.4.jar:2.13.4] at net.mamoe.mirai.internal.network.handler.CommonNetworkHandler$StateConnecting$startState$1.invokeSuspend(CommonNetworkHandler.kt:240) [mirai-core-jvm-2.13.4.jar:2.13.4] at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33) [kotlin-stdlib-1.8.0.jar:1.8.0-release-345(1.8.0)] at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:106) [kotlinx-coroutines-core-jvm-1.6.4.jar:?] at kotlinx.coroutines.scheduling.CoroutineScheduler.runSafely(CoroutineScheduler.kt:570) [kotlinx-coroutines-core-jvm-1.6.4.jar:?] at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.executeTask(CoroutineScheduler.kt:750) [kotlinx-coroutines-core-jvm-1.6.4.jar:?] at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.runWorker(CoroutineScheduler.kt:677) [kotlinx-coroutines-core-jvm-1.6.4.jar:?] at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.run(CoroutineScheduler.kt:664) [kotlinx-coroutines-core-jvm-1.6.4.jar:?] 2023-02-06 17:09:25.611 DEBUG [DefaultDispatcher-worker-1] i.n.u.i.PlatformDependent0.<clinit>(419): java.nio.DirectByteBuffer.<init>(long, int): unavailable 2023-02-06 17:09:25.611 DEBUG [DefaultDispatcher-worker-1] i.n.u.i.PlatformDependent.unsafeUnavailabilityCause0(1106): sun.misc.Unsafe: available 2023-02-06 17:09:25.612 DEBUG [DefaultDispatcher-worker-1] i.n.u.i.PlatformDependent.maxDirectMemory0(1208): maxDirectMemory: 4271898624 bytes (maybe) 2023-02-06 17:09:25.612 DEBUG [DefaultDispatcher-worker-1] i.n.u.i.PlatformDependent.tmpdir0(1227): -Dio.netty.tmpdir: C:\Users\ADMINI~1\AppData\Local\Temp (java.io.tmpdir) 2023-02-06 17:09:25.612 DEBUG [DefaultDispatcher-worker-1] i.n.u.i.PlatformDependent.bitMode0(1306): -Dio.netty.bitMode: 64 (sun.arch.data.model) 2023-02-06 17:09:25.613 DEBUG [DefaultDispatcher-worker-1] i.n.u.i.PlatformDependent.<clinit>(178): -Dio.netty.maxDirectMemory: -1 bytes 2023-02-06 17:09:25.613 DEBUG [DefaultDispatcher-worker-1] i.n.u.i.PlatformDependent.<clinit>(185): -Dio.netty.uninitializedArrayAllocationThreshold: -1 2023-02-06 17:09:25.614 DEBUG [DefaultDispatcher-worker-1] i.n.u.i.CleanerJava9.<clinit>(71): java.nio.ByteBuffer.cleaner(): available 2023-02-06 17:09:25.615 DEBUG [DefaultDispatcher-worker-1] i.n.u.i.PlatformDependent.<clinit>(205): -Dio.netty.noPreferDirect: false 2023-02-06 17:09:25.622 DEBUG [DefaultDispatcher-worker-1] i.n.u.i.PlatformDependent.<clinit>(967): org.jctools-core.MpscChunkedArrayQueue: available 2023-02-06 17:09:25.878 DEBUG [DefaultDispatcher-worker-1] i.n.c.DefaultChannelId.<clinit>(79): -Dio.netty.processId: 15220 (auto-detected) 2023-02-06 17:09:25.881 DEBUG [DefaultDispatcher-worker-1] i.n.u.NetUtil.<clinit>(135): -Djava.net.preferIPv4Stack: false 2023-02-06 17:09:25.881 DEBUG [DefaultDispatcher-worker-1] i.n.u.NetUtil.<clinit>(136): -Djava.net.preferIPv6Addresses: false 2023-02-06 17:09:25.969 DEBUG [DefaultDispatcher-worker-1] i.n.u.NetUtilInitializations.determineLoopback(129): Loopback interface: lo (Software Loopback Interface 1, 127.0.0.1) 2023-02-06 17:09:25.970 DEBUG [DefaultDispatcher-worker-1] i.n.u.NetUtil.run(187): Failed to get SOMAXCONN from sysctl and file \proc\sys\net\core\somaxconn. Default: 200 2023-02-06 17:09:26.067 DEBUG [DefaultDispatcher-worker-1] i.n.c.DefaultChannelId.<clinit>(101): -Dio.netty.machineId: 04:d4:c4:ff:fe:ab:69:4b (auto-detected) 2023-02-06 17:09:26.078 DEBUG [DefaultDispatcher-worker-1] i.n.u.ResourceLeakDetector.<clinit>(129): -Dio.netty.leakDetection.level: simple 2023-02-06 17:09:26.078 DEBUG [DefaultDispatcher-worker-1] i.n.u.ResourceLeakDetector.<clinit>(130): -Dio.netty.leakDetection.targetRecords: 4 2023-02-06 17:09:26.116 DEBUG [DefaultDispatcher-worker-1] i.n.b.PooledByteBufAllocator.<clinit>(155): -Dio.netty.allocator.numHeapArenas: 16 2023-02-06 17:09:26.116 DEBUG [DefaultDispatcher-worker-1] i.n.b.PooledByteBufAllocator.<clinit>(156): -Dio.netty.allocator.numDirectArenas: 16 2023-02-06 17:09:26.116 DEBUG [DefaultDispatcher-worker-1] i.n.b.PooledByteBufAllocator.<clinit>(158): -Dio.netty.allocator.pageSize: 8192 2023-02-06 17:09:26.116 DEBUG [DefaultDispatcher-worker-1] i.n.b.PooledByteBufAllocator.<clinit>(163): -Dio.netty.allocator.maxOrder: 11 2023-02-06 17:09:26.116 DEBUG [DefaultDispatcher-worker-1] i.n.b.PooledByteBufAllocator.<clinit>(167): -Dio.netty.allocator.chunkSize: 16777216 2023-02-06 17:09:26.116 DEBUG [DefaultDispatcher-worker-1] i.n.b.PooledByteBufAllocator.<clinit>(168): -Dio.netty.allocator.smallCacheSize: 256 2023-02-06 17:09:26.116 DEBUG [DefaultDispatcher-worker-1] i.n.b.PooledByteBufAllocator.<clinit>(169): -Dio.netty.allocator.normalCacheSize: 64 2023-02-06 17:09:26.117 DEBUG [DefaultDispatcher-worker-1] i.n.b.PooledByteBufAllocator.<clinit>(170): -Dio.netty.allocator.maxCachedBufferCapacity: 32768 2023-02-06 17:09:26.117 DEBUG [DefaultDispatcher-worker-1] i.n.b.PooledByteBufAllocator.<clinit>(171): -Dio.netty.allocator.cacheTrimInterval: 8192 2023-02-06 17:09:26.117 DEBUG [DefaultDispatcher-worker-1] i.n.b.PooledByteBufAllocator.<clinit>(172): -Dio.netty.allocator.cacheTrimIntervalMillis: 0 2023-02-06 17:09:26.117 DEBUG [DefaultDispatcher-worker-1] i.n.b.PooledByteBufAllocator.<clinit>(173): -Dio.netty.allocator.useCacheForAllThreads: true 2023-02-06 17:09:26.117 DEBUG [DefaultDispatcher-worker-1] i.n.b.PooledByteBufAllocator.<clinit>(174): -Dio.netty.allocator.maxCachedByteBuffersPerChunk: 1023 2023-02-06 17:09:26.128 DEBUG [DefaultDispatcher-worker-1] i.n.b.ByteBufUtil.<clinit>(87): -Dio.netty.allocator.type: pooled 2023-02-06 17:09:26.128 DEBUG [DefaultDispatcher-worker-1] i.n.b.ByteBufUtil.<clinit>(96): -Dio.netty.threadLocalDirectBufferSize: 0 2023-02-06 17:09:26.129 DEBUG [DefaultDispatcher-worker-1] i.n.b.ByteBufUtil.<clinit>(99): -Dio.netty.maxThreadLocalCharBufferSize: 16384 2023-02-06 17:09:26 V/Net 3505686168: Loading server list from cache. 2023-02-06 17:09:26 V/Net 3505686168: Server list: msfwifi.3g.qq.com:8080, 125.39.196.172:80, 59.83.208.208:8080, 112.86.231.148:14000, 116.147.18.244:80, 163.177.30.32:8080, 116.130.229.126:80, 60.29.242.161:80, 157.148.54.249:443, 60.29.238.126:8080. 2023-02-06 17:09:26 I/Bot 3505686168: Loaded account secrets from local cache. 2023-02-06 17:09:26 I/Net 3505686168: ECDH key is valid. 2023-02-06 17:09:26 V/Net 3505686168: Send: wtlogin.exchange_emp(10:fast-login) 2023-02-06 17:09:26.321 DEBUG [DefaultDispatcher-worker-1] i.n.u.Recycler.<clinit>(103): -Dio.netty.recycler.maxCapacityPerThread: 4096 2023-02-06 17:09:26.321 DEBUG [DefaultDispatcher-worker-1] i.n.u.Recycler.<clinit>(104): -Dio.netty.recycler.maxSharedCapacityFactor: 2 2023-02-06 17:09:26.321 DEBUG [DefaultDispatcher-worker-1] i.n.u.Recycler.<clinit>(105): -Dio.netty.recycler.linkCapacity: 16 2023-02-06 17:09:26.321 DEBUG [DefaultDispatcher-worker-1] i.n.u.Recycler.<clinit>(106): -Dio.netty.recycler.ratio: 8 2023-02-06 17:09:26.321 DEBUG [DefaultDispatcher-worker-1] i.n.u.Recycler.<clinit>(107): -Dio.netty.recycler.delayedQueue.ratio: 8 2023-02-06 17:09:26.332 DEBUG [nioEventLoopGroup-2-2] i.n.b.AbstractByteBuf.<clinit>(63): -Dio.netty.buffer.checkAccessible: true 2023-02-06 17:09:26.332 DEBUG [nioEventLoopGroup-2-2] i.n.b.AbstractByteBuf.<clinit>(64): -Dio.netty.buffer.checkBounds: true 2023-02-06 17:09:26.333 DEBUG [nioEventLoopGroup-2-2] i.n.u.ResourceLeakDetectorFactory.newResourceLeakDetector(196): Loaded default ResourceLeakDetector: io.netty.util.ResourceLeakDetector@7ee880a3 2023-02-06 17:09:26 V/Net 3505686168: Send: wtlogin.login(9:password-login) 2023-02-06 17:09:26 V/Net 3505686168: Recv: wtlogin.exchange_emp 2023-02-06 17:09:26 V/Net 3505686168: Recv: wtlogin.login 2023-02-06 17:09:26 W/Net 3505686168: Exception in resumeConnection. net.mamoe.mirai.internal.network.components.LoginFailedExceptionAsNetworkException: Error(bot=Bot(3505686168), code=1, title=登录失败, message=帐号或密码错误,请重新输入。, errorInfo=) at net.mamoe.mirai.internal.network.handler.CommonNetworkHandler$StateConnecting$startState$2.invokeSuspend(CommonNetworkHandler.kt:248) 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: net.mamoe.mirai.network.WrongPasswordException: Error(bot=Bot(3505686168), code=1, title=登录失败, message=帐号或密码错误,请重新输入。, errorInfo=) at net.mamoe.mirai.internal.network.components.SsoProcessorImpl$SlowLoginImpl.doLogin(SsoProcessor.kt:311) at net.mamoe.mirai.internal.network.components.SsoProcessorImpl$SlowLoginImpl$doLogin$1.invokeSuspend(SsoProcessor.kt) ... 9 more Suppressed: java.lang.IllegalStateException: Fast login failed: Error(bot=Bot(3505686168), code=15, title=登录失败, message=你的用户身份已失效,为保证帐号安全,请你重新登录。, errorInfo=) at net.mamoe.mirai.internal.network.components.SsoProcessorImpl$FastLoginImpl.doLogin(SsoProcessor.kt:344) at net.mamoe.mirai.internal.network.components.SsoProcessorImpl$FastLoginImpl$doLogin$1.invokeSuspend(SsoProcessor.kt) ... 9 more 2023-02-06 17:09:26 W/Net 3505686168: Network selector received exception, closing bot. (net.mamoe.mirai.internal.network.components.LoginFailedExceptionAsNetworkException: Error(bot=Bot(3505686168), code=1, title=登录失败, message=帐号或密码错误,请重新输入。, errorInfo=)) 2023-02-06 17:09:26 W/Net 3505686168: Network selector received exception, closing bot. (net.mamoe.mirai.internal.network.components.LoginFailedExceptionAsNetworkException: Error(bot=Bot(3505686168), code=1, title=登录失败, message=帐号或密码错误,请重新输入。, errorInfo=)) 2023-02-06 17:09:26 I/Bot 3505686168: Bot cancelled: Bot closed 2023-02-06 17:09:26 V/Net 2240189254: Loading server list from cache. 2023-02-06 17:09:26 V/Net 2240189254: Server list: msfwifi.3g.qq.com:8080, 125.39.196.172:80, 59.83.208.208:8080, 112.86.231.148:14000, 116.147.18.244:80, 163.177.30.32:8080, 116.130.229.126:80, 60.29.242.161:80, 157.148.54.249:443, 60.29.238.126:8080. 2023-02-06 17:09:26 I/Net 2240189254: ECDH key is invalid, start to fetch ecdh public key from server. 2023-02-06 17:09:27 I/Net 2240189254: Successfully fetched ecdh public key from server. 2023-02-06 17:09:27 V/Net 2240189254: Send: wtlogin.login(9:password-login) 2023-02-06 17:09:27 V/Net 2240189254: Recv: wtlogin.login 2023-02-06 17:09:28.641 DEBUG [nioEventLoopGroup-2-2] i.n.b.PoolThreadCache.free(224): Freed 2 thread-local buffer(s) from thread: nioEventLoopGroup-2-2 2023-02-06 17:09:32 V/Net 2240189254: Send: wtlogin.login(8:request-sms) 2023-02-06 17:09:33 V/Net 2240189254: Recv: wtlogin.login 2023-02-06 17:09:43 V/Net 2240189254: Send: wtlogin.login(7:submit-sms) 2023-02-06 17:09:43 I/Bot 2240189254: Login successful 2023-02-06 17:09:43 V/Net 2240189254: Recv: wtlogin.login 2023-02-06 17:09:43 I/Bot 2240189254: Saved account secrets to local cache for fast login. 2023-02-06 17:09:43 V/Net 2240189254: Send: StatSvc.register(online) 2023-02-06 17:09:43 I/Bot 2240189254: Login successful. 2023-02-06 17:09:43 I/Net 2240189254: Server time updated, serverTime: 1675674582, diff: -1ms=-0.001s 2023-02-06 17:09:43 V/Net 2240189254: Recv: StatSvc.register 2023-02-06 17:09:43 V/Net 2240189254: Loading BdhSession from cache file 2023-02-06 17:09:43 I/Net 2240189254: Syncing friend message history... 2023-02-06 17:09:43 I/Net 2240189254: Start loading stranger list... 2023-02-06 17:09:43 I/Net 2240189254: Start loading friend list... 2023-02-06 17:09:43 V/Net 2240189254: Send: StatSvc.GetDevLoginInfo(StatSvc.GetDevLoginInfo) 2023-02-06 17:09:43 I/Net 2240189254: Start loading friendGroup list... 2023-02-06 17:09:43 V/Net 2240189254: Send: OidbSvc.0x496(OidbSvc.0x496) 2023-02-06 17:09:43 V/Net 2240189254: Send: friendlist.getFriendGroupList(friendlist.getFriendGroupList) 2023-02-06 17:09:43 V/Net 2240189254: Send: friendlist.getFriendGroupList(friendlist.getFriendGroupList) 2023-02-06 17:09:43 V/Net 2240189254: Send: OidbSvc.0x5d2_0(OidbSvc.0x5d2_0) 2023-02-06 17:09:43 V/Net 2240189254: Recv: OidbSvc.0x5d2_0 2023-02-06 17:09:43 I/Net 2240189254: Successfully loaded stranger list: 0 in total 2023-02-06 17:09:43 V/Net 2240189254: Recv: OidbSvc.0x496 2023-02-06 17:09:43 I/Net 2240189254: Start loading group list... 2023-02-06 17:09:43 V/Net 2240189254: Send: friendlist.GetTroopListReqV2(friendlist.GetTroopListReqV2) 2023-02-06 17:09:43 V/Net 2240189254: Recv: StatSvc.GetDevLoginInfo 2023-02-06 17:09:43 I/Net 2240189254: Online OtherClients: FORTESCARLET(WINDOWS) 2023-02-06 17:09:43 V/Net 2240189254: Recv: friendlist.getFriendGroupList 2023-02-06 17:09:43 V/Net 2240189254: Loading friend list: 30/30 2023-02-06 17:09:43 I/Net 2240189254: Successfully loaded friend list: 30 in total 2023-02-06 17:09:43 V/Net 2240189254: Recv: friendlist.getFriendGroupList 2023-02-06 17:09:43 V/Net 2240189254: Loading friendGroup list: 4/4 2023-02-06 17:09:43 I/Net 2240189254: Successfully loaded friendGroup list: 4 in total 2023-02-06 17:09:43 V/Net 2240189254: Recv: friendlist.GetTroopListReqV2
个人认为或许默认情况下应该在cache文件夹中为每一个bot独立分配一个目录?
是的,需要独立目录,但现在修改这个行为将会是 breaking change
你可以手动再设置一下 bot 工作目录
BotFactory.INSTANCE.newBot(0, "") { workingDir = workingDir.resolve(qq) }
好的,目前也的确是如此解决的
问题描述
在对两个bot进行测试登录的时候,突然发现刚刚登录成功的一个bot突然提示‘密码错误’,在不修改密码的同时,使用
disableAccountSecretes()
后即可成功登录,因此怀疑这可能会导致bot登录时出现密码错误问题。复现
val b1 = BotFactory.newBot(111, pwd){ // ... }.alsoLogin() val b2 = BotFactory.newBot(222, pwd){ // ... }.alsoLogin()
mirai-core 版本
2.13.4
bot-protocol
ANDROID_PHONE
其他组件版本
No response
系统日志
网络日志
No response
补充信息
个人认为或许默认情况下应该在cache文件夹中为每一个bot独立分配一个目录?