Skip to content
This repository has been archived by the owner on Sep 12, 2021. It is now read-only.

[求助]发送好友消息出现错误 #2

Closed
lindongbin opened this issue Oct 12, 2020 · 0 comments
Closed

[求助]发送好友消息出现错误 #2

lindongbin opened this issue Oct 12, 2020 · 0 comments
Labels
bug Something isn't working

Comments

@lindongbin
Copy link

发送的格式内容
{"type": "SendToFriend", "content":{"bot": 1077729254, "friend": 8482303, "message": [{"type": "Plain", "text": "现在是"}]}}

出现的错误提示
{"type":"ActionResult","success":false,"result":{"error":"kotlinx.serialization.json.internal.JsonDecodingException: Unexpected JSON token at offset 36: Expected '}'\nJSON input: {"type": "SendToFriend", "content": {"bot": 1077729254, "friend": 8482303, "message": [{"type": "Plain", "text": "\u73b0\u5728\u662f4\u65f633\u5206"}]}}","errorDetail":"kotlinx.serialization.json.internal.JsonDecodingException: Unexpected JSON token at offset 36: Expected '}'\nJSON input: {"type": "SendToFriend", "content": {"bot": 1077729254, "friend": 8482303, "message": [{"type": "Plain", "text": "\u73b0\u5728\u662f4\u65f633\u5206"}]}}\r\n\tat kotlinx.serialization.json.internal.JsonExceptionsKt.JsonDecodingException(JsonExceptions.kt:30)\r\n\tat kotlinx.serialization.json.internal.JsonReader.fail(JsonReader.kt:329)\r\n\tat kotlinx.serialization.json.internal.StreamingJsonDecoder.endStructure(StreamingJsonDecoder.kt:62)\r\n\tat io.github.karlatemp.miraiwebsocketapi.actions.Request$RequestSerializer.deserialize(Request.kt:102)\r\n\tat io.github.karlatemp.miraiwebsocketapi.actions.Request$RequestSerializer.deserialize(Request.kt:26)\r\n\tat kotlinx.serialization.json.internal.PolymorphicKt.decodeSerializableValuePolymorphic(Polymorphic.kt:62)\r\n\tat kotlinx.serialization.json.internal.StreamingJsonDecoder.decodeSerializableValue(StreamingJsonDecoder.kt:40)\r\n\tat kotlinx.serialization.json.Json.decodeFromString(Json.kt:85)\r\n\tat io.github.karlatemp.miraiwebsocketapi.MiraiWebsocketApiKt$web$1$1.invokeSuspend(MiraiWebsocketApi.kt:221)\r\n\tat kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33)\r\n\tat kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:56)\r\n\tat kotlinx.coroutines.scheduling.CoroutineScheduler.runSafely(CoroutineScheduler.kt:571)\r\n\tat kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.executeTask(CoroutineScheduler.kt:738)\r\n\tat kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.runWorker(CoroutineScheduler.kt:678)\r\n\tat kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.run(CoroutineScheduler.kt:665)\r\n"}}

用的是 2.0.0 dev 1,麻烦看下是哪里出问题了

@Karlatemp Karlatemp added the bug Something isn't working label Oct 12, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants