Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

2.9.1与mirai 2.16配合时会抛异常导致退出 #747

Open
landall opened this issue Nov 3, 2023 · 1 comment
Open

2.9.1与mirai 2.16配合时会抛异常导致退出 #747

landall opened this issue Nov 3, 2023 · 1 comment

Comments

@landall
Copy link

landall commented Nov 3, 2023

2023-11-03 01:31:35 E/MAH Access: java.lang.IllegalArgumentException: endIndex (37) is greater than length (14)
java.lang.IllegalArgumentException: endIndex (37) is greater than length (14)
at mirai-api-http-2.9.1.mirai2.jar[shared]//io.ktor.http.cio.internals.CharArrayBuilder.subSequence(CharArrayBuilder.kt:35)
at mirai-api-http-2.9.1.mirai2.jar[shared]//io.ktor.http.cio.HttpHeadersMap$getAll$4.invoke(HttpHeadersMap.kt:91)
at mirai-api-http-2.9.1.mirai2.jar[shared]//io.ktor.http.cio.HttpHeadersMap$getAll$4.invoke(HttpHeadersMap.kt:91)
at kotlin.sequences.TransformingSequence$iterator$1.next(Sequences.kt:210)
at kotlin.sequences.TransformingSequence$iterator$1.next(Sequences.kt:210)
at kotlin.sequences.SequencesKt___SequencesKt.toCollection(_Sequences.kt:787)
at kotlin.sequences.SequencesKt___SequencesKt.toMutableList(_Sequences.kt:817)
at kotlin.sequences.SequencesKt___SequencesKt.toList(_Sequences.kt:808)
at mirai-api-http-2.9.1.mirai2.jar[shared]//io.ktor.http.cio.CIOHeaders.getAll(CIOHeaders.kt:29)
at mirai-api-http-2.9.1.mirai2.jar[shared]//io.ktor.server.engine.BaseApplicationEngineKt.verifyHostHeader(BaseApplicationEngine.kt:88)
at mirai-api-http-2.9.1.mirai2.jar[shared]//io.ktor.server.engine.BaseApplicationEngineKt.access$verifyHostHeader(BaseApplicationEngine.kt:1)
at mirai-api-http-2.9.1.mirai2.jar[shared]//io.ktor.server.engine.BaseApplicationEngineKt$installDefaultInterceptors$2.invokeSuspend(BaseApplicationEngine.kt:113)
at mirai-api-http-2.9.1.mirai2.jar[shared]//io.ktor.server.engine.BaseApplicationEngineKt$installDefaultInterceptors$2.invoke(BaseApplicationEngine.kt)
at mirai-api-http-2.9.1.mirai2.jar[shared]//io.ktor.server.engine.BaseApplicationEngineKt$installDefaultInterceptors$2.invoke(BaseApplicationEngine.kt)
at mirai-api-http-2.9.1.mirai2.jar[shared]//io.ktor.util.pipeline.SuspendFunctionGun.loop(SuspendFunctionGun.kt:123)
at mirai-api-http-2.9.1.mirai2.jar[shared]//io.ktor.util.pipeline.SuspendFunctionGun.proceed(SuspendFunctionGun.kt:81)
at mirai-api-http-2.9.1.mirai2.jar//net.mamoe.mirai.api.http.adapter.http.feature.auth.Authorization$install$1.invokeSuspend(Authorization.kt:41)
at mirai-api-http-2.9.1.mirai2.jar//net.mamoe.mirai.api.http.adapter.http.feature.auth.Authorization$install$1.invoke(Authorization.kt)
at mirai-api-http-2.9.1.mirai2.jar//net.mamoe.mirai.api.http.adapter.http.feature.auth.Authorization$install$1.invoke(Authorization.kt)
at mirai-api-http-2.9.1.mirai2.jar[shared]//io.ktor.util.pipeline.SuspendFunctionGun.loop(SuspendFunctionGun.kt:123)
at mirai-api-http-2.9.1.mirai2.jar[shared]//io.ktor.util.pipeline.SuspendFunctionGun.proceed(SuspendFunctionGun.kt:81)
at mirai-api-http-2.9.1.mirai2.jar[shared]//io.ktor.server.engine.BaseApplicationEngineKt$installDefaultTransformationChecker$1.invokeSuspend(BaseApplicationEngine.kt:122)
at mirai-api-http-2.9.1.mirai2.jar[shared]//io.ktor.server.engine.BaseApplicationEngineKt$installDefaultTransformationChecker$1.invoke(BaseApplicationEngine.kt)
at mirai-api-http-2.9.1.mirai2.jar[shared]//io.ktor.server.engine.BaseApplicationEngineKt$installDefaultTransformationChecker$1.invoke(BaseApplicationEngine.kt)
at mirai-api-http-2.9.1.mirai2.jar[shared]//io.ktor.util.pipeline.SuspendFunctionGun.loop(SuspendFunctionGun.kt:123)
at mirai-api-http-2.9.1.mirai2.jar[shared]//io.ktor.util.pipeline.SuspendFunctionGun.proceed(SuspendFunctionGun.kt:81)
at mirai-api-http-2.9.1.mirai2.jar//net.mamoe.mirai.api.http.adapter.http.feature.handler.HttpRouterAccessHandler.intercept(HttpRouterAccessHandler.kt:35)
at mirai-api-http-2.9.1.mirai2.jar//net.mamoe.mirai.api.http.adapter.http.feature.handler.HttpRouterAccessHandler.access$intercept(HttpRouterAccessHandler.kt:24)
at mirai-api-http-2.9.1.mirai2.jar//net.mamoe.mirai.api.http.adapter.http.feature.handler.HttpRouterAccessHandler$Feature$install$1.invokeSuspend(HttpRouterAccessHandler.kt:90)
at mirai-api-http-2.9.1.mirai2.jar//net.mamoe.mirai.api.http.adapter.http.feature.handler.HttpRouterAccessHandler$Feature$install$1.invoke(HttpRouterAccessHandler.kt)
at mirai-api-http-2.9.1.mirai2.jar//net.mamoe.mirai.api.http.adapter.http.feature.handler.HttpRouterAccessHandler$Feature$install$1.invoke(HttpRouterAccessHandler.kt)
at mirai-api-http-2.9.1.mirai2.jar[shared]//io.ktor.util.pipeline.SuspendFunctionGun.loop(SuspendFunctionGun.kt:123)
at mirai-api-http-2.9.1.mirai2.jar[shared]//io.ktor.util.pipeline.SuspendFunctionGun.proceed(SuspendFunctionGun.kt:81)
at mirai-api-http-2.9.1.mirai2.jar[shared]//io.ktor.util.pipeline.SuspendFunctionGun.execute$ktor_utils(SuspendFunctionGun.kt:101)
at mirai-api-http-2.9.1.mirai2.jar[shared]//io.ktor.util.pipeline.Pipeline.execute(Pipeline.kt:77)
at mirai-api-http-2.9.1.mirai2.jar[shared]//io.ktor.server.engine.DefaultEnginePipelineKt$defaultEnginePipeline$1$invokeSuspend$$inlined$execute$1.invokeSuspend(Pipeline.kt:478)
at mirai-api-http-2.9.1.mirai2.jar[shared]//io.ktor.server.engine.DefaultEnginePipelineKt$defaultEnginePipeline$1$invokeSuspend$$inlined$execute$1.invoke(Pipeline.kt)
at mirai-api-http-2.9.1.mirai2.jar[shared]//io.ktor.server.engine.DefaultEnginePipelineKt$defaultEnginePipeline$1$invokeSuspend$$inlined$execute$1.invoke(Pipeline.kt)
at mirai-api-http-2.9.1.mirai2.jar[shared]//io.ktor.util.debug.ContextUtilsKt.initContextInDebugMode(ContextUtils.kt:17)
at mirai-api-http-2.9.1.mirai2.jar[shared]//io.ktor.server.engine.DefaultEnginePipelineKt$defaultEnginePipeline$1.invokeSuspend(DefaultEnginePipeline.kt:118)
at mirai-api-http-2.9.1.mirai2.jar[shared]//io.ktor.server.engine.DefaultEnginePipelineKt$defaultEnginePipeline$1.invoke(DefaultEnginePipeline.kt)
at mirai-api-http-2.9.1.mirai2.jar[shared]//io.ktor.server.engine.DefaultEnginePipelineKt$defaultEnginePipeline$1.invoke(DefaultEnginePipeline.kt)
at mirai-api-http-2.9.1.mirai2.jar[shared]//io.ktor.util.pipeline.SuspendFunctionGun.loop(SuspendFunctionGun.kt:123)
at mirai-api-http-2.9.1.mirai2.jar[shared]//io.ktor.util.pipeline.SuspendFunctionGun.proceed(SuspendFunctionGun.kt:81)
at mirai-api-http-2.9.1.mirai2.jar[shared]//io.ktor.util.pipeline.SuspendFunctionGun.execute$ktor_utils(SuspendFunctionGun.kt:101)
at mirai-api-http-2.9.1.mirai2.jar[shared]//io.ktor.util.pipeline.Pipeline.execute(Pipeline.kt:77)
at mirai-api-http-2.9.1.mirai2.jar[shared]//io.ktor.server.cio.CIOApplicationEngine$handleRequest$2$invokeSuspend$$inlined$execute$1.invokeSuspend(Pipeline.kt:478)
at mirai-api-http-2.9.1.mirai2.jar[shared]//io.ktor.server.cio.CIOApplicationEngine$handleRequest$2$invokeSuspend$$inlined$execute$1.invoke(Pipeline.kt)
at mirai-api-http-2.9.1.mirai2.jar[shared]//io.ktor.server.cio.CIOApplicationEngine$handleRequest$2$invokeSuspend$$inlined$execute$1.invoke(Pipeline.kt)
at mirai-api-http-2.9.1.mirai2.jar[shared]//io.ktor.util.debug.ContextUtilsKt.initContextInDebugMode(ContextUtils.kt:17)
at mirai-api-http-2.9.1.mirai2.jar[shared]//io.ktor.server.cio.CIOApplicationEngine$handleRequest$2.invokeSuspend(CIOApplicationEngine.kt:189)
at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33)
at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:106)
at kotlinx.coroutines.internal.LimitedDispatcher.run(LimitedDispatcher.kt:42)
at kotlinx.coroutines.scheduling.TaskImpl.run(Tasks.kt:95)
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)

@landall
Copy link
Author

landall commented Nov 3, 2023

仔细看了下日志,这个可能是个修饰性错误。
2023-11-01 22:27:07 这个时间点,mirai发生过一次重连,然后code=45了。
之后好像mirai-api-http就开始定期抛异常,一共抛了三四次的样子。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant