Checks / 检查
- [x] I confirm that I have searched for existing issues / pull requests before reporting to avoid duplicate reporting./我确认在报告之前我已经搜索了现有的问题或者拉取请求,以避免重复报告。
- [x] I confirm that I followed the Docs and read the Changelog, but this problem still exists./我确认我按照文档配置并阅读了Changelog,但这个问题仍然存在。
- [x] I confirm that I noted that if I don't follow the instructions, the issue may be closed directly./我确认我已经检查,如果我不按照说明进行操作,该问题可能会被直接关闭。
Java Version / Java版本
openjdk:21(docker)
Minecraft Version / Minecraft版本
1.7.10
McBot Version / McBot版本
1.5.6
Description / 描述
在1.7.10中,群内发消息无法正常转发到服务器,服务器会提示如下报错:https://mclo.gs/nRcoR3F
看起来是因为返回格式不是“string”导致的,所以我在napcat中把上报格式从"array"改成了"string",这个报错确实是被解决了——因为它不返回任何东西
至于为什么在1.7.10中使用openjdk:21,这是因为GTNH提供了用openjdk:21的服务端
To Reproduce / 重现
- 按照教程配置Mcbot(1.7.10)
- 在群里发消息
- 看到了服务端的报错
Log / 日志
[14:21:30] [nioEventLoopGroup-3-1/INFO] [STDERR]: [java.lang.Throwable$WrappedPrintStream:println:785]: cn.evolvefield.mods.botapi.util.json.JSONException: JSONObject["message"] is not a string.
[14:21:30] [nioEventLoopGroup-3-1/INFO] [STDERR]: [java.lang.Throwable$WrappedPrintStream:println:785]: at Launch//cn.evolvefield.mods.botapi.util.json.JSONObject.wrongValueFormatException(JSONObject.java:2597)
[14:21:30] [nioEventLoopGroup-3-1/INFO] [STDERR]: [java.lang.Throwable$WrappedPrintStream:println:785]: at Launch//cn.evolvefield.mods.botapi.util.json.JSONObject.getString(JSONObject.java:832)
[14:21:30] [nioEventLoopGroup-3-1/INFO] [STDERR]: [java.lang.Throwable$WrappedPrintStream:println:785]: at Launch//cn.evolvefield.mods.botapi.api.MessageJson.(MessageJson.java:83)
[14:21:30] [nioEventLoopGroup-3-1/INFO] [STDERR]: [java.lang.Throwable$WrappedPrintStream:println:785]: at Launch//cn.evolvefield.mods.botapi.core.service.MessageHandlerService.receiveMessage(MessageHandlerService.java:42)
[14:21:30] [nioEventLoopGroup-3-1/INFO] [STDERR]: [java.lang.Throwable$WrappedPrintStream:println:785]: at Launch//cn.evolvefield.mods.botapi.core.network.WebSocket.WebSocketClientHandler.channelRead0(WebSocketClientHandler.java:45)
[14:21:30] [nioEventLoopGroup-3-1/INFO] [STDERR]: [java.lang.Throwable$WrappedPrintStream:println:785]: at Launch//io.netty.channel.SimpleChannelInboundHandler.channelRead(SimpleChannelInboundHandler.java:98)
[14:21:30] [nioEventLoopGroup-3-1/INFO] [STDERR]: [java.lang.Throwable$WrappedPrintStream:println:785]: at Launch//io.netty.channel.DefaultChannelHandlerContext.invokeChannelRead(DefaultChannelHandlerContext.java:337)
[14:21:30] [nioEventLoopGroup-3-1/INFO] [STDERR]: [java.lang.Throwable$WrappedPrintStream:println:785]: at Launch//io.netty.channel.DefaultChannelHandlerContext.fireChannelRead(DefaultChannelHandlerContext.java:323)
[14:21:30] [nioEventLoopGroup-3-1/INFO] [STDERR]: [java.lang.Throwable$WrappedPrintStream:println:785]: at Launch//io.netty.handler.codec.MessageToMessageDecoder.channelRead(MessageToMessageDecoder.java:103)
[14:21:30] [nioEventLoopGroup-3-1/INFO] [STDERR]: [java.lang.Throwable$WrappedPrintStream:println:785]: at Launch//io.netty.channel.DefaultChannelHandlerContext.invokeChannelRead(DefaultChannelHandlerContext.java:337)
[14:21:30] [nioEventLoopGroup-3-1/INFO] [STDERR]: [java.lang.Throwable$WrappedPrintStream:println:785]: at Launch//io.netty.channel.DefaultChannelHandlerContext.fireChannelRead(DefaultChannelHandlerContext.java:323)
[14:21:30] [nioEventLoopGroup-3-1/INFO] [STDERR]: [java.lang.Throwable$WrappedPrintStream:println:785]: at Launch//io.netty.handler.codec.ByteToMessageDecoder.channelRead(ByteToMessageDecoder.java:173)
[14:21:30] [nioEventLoopGroup-3-1/INFO] [STDERR]: [java.lang.Throwable$WrappedPrintStream:println:785]: at Launch//io.netty.channel.DefaultChannelHandlerContext.invokeChannelRead(DefaultChannelHandlerContext.java:337)
[14:21:30] [nioEventLoopGroup-3-1/INFO] [STDERR]: [java.lang.Throwable$WrappedPrintStream:println:785]: at Launch//io.netty.channel.DefaultChannelHandlerContext.fireChannelRead(DefaultChannelHandlerContext.java:323)
[14:21:30] [nioEventLoopGroup-3-1/INFO] [STDERR]: [java.lang.Throwable$WrappedPrintStream:println:785]: at Launch//io.netty.channel.DefaultChannelPipeline.fireChannelRead(DefaultChannelPipeline.java:785)
[14:21:30] [nioEventLoopGroup-3-1/INFO] [STDERR]: [java.lang.Throwable$WrappedPrintStream:println:785]: at Launch//io.netty.channel.nio.AbstractNioByteChannel$NioByteUnsafe.read(AbstractNioByteChannel.java:100)
[14:21:30] [nioEventLoopGroup-3-1/INFO] [STDERR]: [java.lang.Throwable$WrappedPrintStream:println:785]: at Launch//io.netty.channel.nio.NioEventLoop.processSelectedKey(NioEventLoop.java:480)
[14:21:30] [nioEventLoopGroup-3-1/INFO] [STDERR]: [java.lang.Throwable$WrappedPrintStream:println:785]: at Launch//io.netty.channel.nio.NioEventLoop.processSelectedKeysOptimized(NioEventLoop.java:447)
[14:21:30] [nioEventLoopGroup-3-1/INFO] [STDERR]: [java.lang.Throwable$WrappedPrintStream:println:785]: at Launch//io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:341)
[14:21:30] [nioEventLoopGroup-3-1/INFO] [STDERR]: [java.lang.Throwable$WrappedPrintStream:println:785]: at Launch//io.netty.util.concurrent.SingleThreadEventExecutor$2.run(SingleThreadEventExecutor.java:101)
[14:21:30] [nioEventLoopGroup-3-1/INFO] [STDERR]: [java.lang.Throwable$WrappedPrintStream:println:785]: at java.base/java.lang.Thread.run(Thread.java:1583)
Config / 配置
啊?我寻思1.7.10没找到这个东西啊