mamoe / mirai

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

Cipher.AES/GCM/NoPadding, mode: not initialized, algorithm from: (no provider) net.mamoe.mirai.internal.deps.okhttp3.internal.connection.RealCall$AsyncCall@2ca114fc #2550

Closed MrY-Cat closed 1 year ago

MrY-Cat commented 1 year ago

问题描述

在代码无变化的情况下,仅仅重新运行,bot登录不上去,在某一步停止了,起初是停止到zh这里: CA8_ `Z 3_02MW`HJM~{TXJ 后来试了试刷新gradle,删掉bot的device.json和cache,然后变成停到这里: image

两次运行的网络日志在后面。 似乎不是网络问题,因为换成另一个bot则可以成功登录。 这是怎么回事呢

复现

目前我的电脑上这个bot无论怎么重新运行都是这样。

mirai-core 版本

2.14.0

bot-protocol

ANDROID_PAD

其他组件版本

No response

系统日志

2023-03-06 22:47:02 I/main: Starting mirai-console...
2023-03-06 22:47:02 I/main: 

==================================[ Mirai consosle 2.14.0 ]===================================
 __       __ __                   __  ______                                      __
|  \     /  \  \                 |  \/      \                                    |  \
| ▓▓\   /  ▓▓\▓▓ ______   ______  \▓▓  ▓▓▓▓▓▓\ ______  _______   _______  ______ | ▓▓ ______
| ▓▓▓\ /  ▓▓▓  \/      \ |      \|  \ ▓▓   \▓▓/      \|       \ /       \/      \| ▓▓/      \
| ▓▓▓▓\  ▓▓▓▓ ▓▓  ▓▓▓▓▓▓\ \▓▓▓▓▓▓\ ▓▓ ▓▓     |  ▓▓▓▓▓▓\ ▓▓▓▓▓▓▓\  ▓▓▓▓▓▓▓  ▓▓▓▓▓▓\ ▓▓  ▓▓▓▓▓▓\
| ▓▓\▓▓ ▓▓ ▓▓ ▓▓ ▓▓   \▓▓/      ▓▓ ▓▓ ▓▓   __| ▓▓  | ▓▓ ▓▓  | ▓▓\▓▓    \| ▓▓  | ▓▓ ▓▓ ▓▓    ▓▓
| ▓▓ \▓▓▓| ▓▓ ▓▓ ▓▓     |  ▓▓▓▓▓▓▓ ▓▓ ▓▓__/  \ ▓▓__/ ▓▓ ▓▓  | ▓▓_\▓▓▓▓▓▓\ ▓▓__/ ▓▓ ▓▓ ▓▓▓▓▓▓▓▓
| ▓▓  \▓ | ▓▓ ▓▓ ▓▓      \▓▓    ▓▓ ▓▓\▓▓    ▓▓\▓▓    ▓▓ ▓▓  | ▓▓       ▓▓\▓▓    ▓▓ ▓▓\▓▓     \
 \▓▓      \▓▓\▓▓\▓▓       \▓▓▓▓▓▓▓\▓▓ \▓▓▓▓▓▓  \▓▓▓▓▓▓ \▓▓   \▓▓\▓▓▓▓▓▓▓  \▓▓▓▓▓▓ \▓▓ \▓▓▓▓▓▓▓

2023-03-06 22:47:02 I/main: Backend: version 2.14.0, built on 2023-02-06 14:25:21.
2023-03-06 22:47:02 I/main: Frontend Terminal: version 2.14.0, provided by Mamoe Technologies
2023-03-06 22:47:02 I/main: Welcome to visit https://mirai.mamoe.net/
2023-03-06 22:47:03 I/main: Prepared built-in commands: autoLogin, help, login, logout, permission, status, stop
2023-03-06 22:47:03 I/main: 0 plugin(s) enabled.
2023-03-06 22:47:03 I/main: mirai-console started successfully.
2023-03-06 22:47:03 I/复读喵: Plugin loaded
>

网络日志

2023-03-06 22:34:33 E/Net 2305339556: Exception in coroutine 'BotInitProcessor.init'
java.lang.IllegalStateException: Exception in attached Job 'BotInitProcessor.init'
    at net.mamoe.mirai.internal.network.handler.state.JobAttachStateObserver$stateChanged0$1.invokeSuspend(JobAttachStateObserver.kt:40)
    at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33)
    at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:104)
    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: StateSwitchingException(old=StateLoading, new=StateClosed, cause=null)
    at net.mamoe.mirai.internal.network.handler.NetworkHandlerSupport.setStateImpl$mirai_core(NetworkHandlerSupport.kt:352)
    at net.mamoe.mirai.internal.network.handler.CommonNetworkHandler.close(CommonNetworkHandler.kt:418)
    at net.mamoe.mirai.internal.network.handler.selector.SelectorNetworkHandler.close(SelectorNetworkHandler.kt:119)
    at net.mamoe.mirai.internal.AbstractBot.close(AbstractBot.kt:115)
    at net.mamoe.mirai.internal.QQAndroidBot.close(QQAndroidBot.kt:97)
    at net.mamoe.mirai.Bot.closeAndJoin$suspendImpl(Bot.kt:245)
    at net.mamoe.mirai.Bot.closeAndJoin(Bot.kt)
    at net.mamoe.mirai.Bot.closeAndJoin$default(Bot.kt:244)
    at net.mamoe.mirai.console.MiraiConsoleImplementation$Companion.shutdown$mirai_console(MiraiConsoleImplementation.kt:441)
    at net.mamoe.mirai.console.MiraiConsole$INSTANCE$shutdown$1.invokeSuspend(MiraiConsole.kt:265)
    at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33)
    at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:106)
    ... 4 more
    Suppressed: kotlinx.coroutines.TimeoutCancellationException: Timed out waiting for 5000 ms
        at kotlinx.coroutines.TimeoutKt.TimeoutCancellationException(Timeout.kt:184)
        at kotlinx.coroutines.TimeoutCoroutine.run(Timeout.kt:154)
        at kotlinx.coroutines.EventLoopImplBase$DelayedRunnableTask.run(EventLoop.common.kt:508)
        at kotlinx.coroutines.EventLoopImplBase.processNextEvent(EventLoop.common.kt:284)
        at kotlinx.coroutines.DefaultExecutor.run(DefaultExecutor.kt:108)
        at java.base/java.lang.Thread.run(Thread.java:833)

2023-03-06 22:37:42 V/Net 2305339556: Invalidate caches because hash file not available.
2023-03-06 22:37:42 V/Net 2305339556: No server list cached.
2023-03-06 22:37:43 I/Net 2305339556: ECDH key is invalid, start to fetch ecdh public key from server.

补充信息

No response

MrY-Cat commented 1 year ago

更换协议也不行

MrY-Cat commented 1 year ago

image image image image

sandtechnology commented 1 year ago

这是你的网络问题 请自行检查能否正常连接到https://keyrotate.qq.com (Java进程)