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

HTTP API无法上报消息 #37

Closed
ColorfulGhost opened this issue Aug 15, 2020 · 1 comment
Closed

HTTP API无法上报消息 #37

ColorfulGhost opened this issue Aug 15, 2020 · 1 comment

Comments

@ColorfulGhost
Copy link

Exception in thread "DefaultDispatcher-worker-6" java.lang.IllegalStateException: Reader has not consumed the whole input: JsonReader(source='Oh hi there! How are you?', currentPosition=5, tokenClass=0, tokenPosition=3, offset=3)
        at kotlinx.serialization.json.Json.parse(Json.kt:132)
        at kotlinx.serialization.json.Json$Default.parse(Json.kt:210)
        at kotlinx.serialization.json.Json$Default.parseJson(Json.kt:231)
        at tech.mihoyo.mirai.web.http.ReportService.report(ReportService.kt:135)
        at tech.mihoyo.mirai.web.http.ReportService$report$1.invokeSuspend(ReportService.kt)
        at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33)
        at io.ktor.util.pipeline.SuspendFunctionGun.resumeRootWith(PipelineContext.kt:238)
        at io.ktor.util.pipeline.SuspendFunctionGun.loop(PipelineContext.kt:194)
        at io.ktor.util.pipeline.SuspendFunctionGun.access$loop(PipelineContext.kt:67)
        at io.ktor.util.pipeline.SuspendFunctionGun$continuation$1.resumeWith(PipelineContext.kt:144)
        at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:46)
        at io.ktor.util.pipeline.SuspendFunctionGun.resumeRootWith(PipelineContext.kt:238)
        at io.ktor.util.pipeline.SuspendFunctionGun.loop(PipelineContext.kt:194)
        at io.ktor.util.pipeline.SuspendFunctionGun.access$loop(PipelineContext.kt:67)
        at io.ktor.util.pipeline.SuspendFunctionGun$continuation$1.resumeWith(PipelineContext.kt:144)
        at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:46)
        at io.ktor.util.pipeline.SuspendFunctionGun.resumeRootWith(PipelineContext.kt:238)
        at io.ktor.util.pipeline.SuspendFunctionGun.loop(PipelineContext.kt:194)
        at io.ktor.util.pipeline.SuspendFunctionGun.access$loop(PipelineContext.kt:67)
        at io.ktor.util.pipeline.SuspendFunctionGun$continuation$1.resumeWith(PipelineContext.kt:144)
        at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:46)
        at io.ktor.util.pipeline.SuspendFunctionGun.resumeRootWith(PipelineContext.kt:238)
        at io.ktor.util.pipeline.SuspendFunctionGun.loop(PipelineContext.kt:194)
        at io.ktor.util.pipeline.SuspendFunctionGun.access$loop(PipelineContext.kt:67)
        at io.ktor.util.pipeline.SuspendFunctionGun$continuation$1.resumeWith(PipelineContext.kt:144)
        at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:46)
        at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:56)
        at kotlinx.coroutines.scheduling.CoroutineScheduler.runSafely(CoroutineScheduler.kt:571)
        at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.executeTask(CoroutineScheduler.kt:738)
        at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.runWorker(CoroutineScheduler.kt:678)
        at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.run(CoroutineScheduler.kt:665)

但是确实上报服务端收到了请求[PicqBotX] [DEBUG(java.lang.Thread.run:748)] Http Failed: INCORRECT_CHARSET: Not UTF-8

提示不是UTF-8

@ColorfulGhost ColorfulGhost changed the title 无法上报消息 HTTP API无法上报消息 Aug 15, 2020
@yyuueexxiinngg
Copy link
Owner

猜测是HeaderContent-Type没有设置charset的原因, 应该在新commit中已修复, 如测试无法使用请reopen

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

2 participants