dmulloy2 / ProtocolLib

Provides read and write access to the Minecraft protocol with Bukkit.
GNU General Public License v2.0
1.03k stars 258 forks source link

Error when ever i try to join my survival server version: 1.20.6 #3252

Open mranthonygamer opened 1 month ago

mranthonygamer commented 1 month ago

Every time i try to join i get a failed to encode packet error 2024-09-25_12 45 37

Idk what it was I am using the latest dev build and it is protocol-lib because when ever i remove the plugin the error vanishes Please fix.

Here is my console error [12:45:32 INFO]: UUID of player anthonygamer9000 is f1b3e147-0863-362c-a3b1-93f94fa64e19 [12:45:34 INFO]: [DiscordSRV] Player anthonygamer9000 joined with silent joining permission, not sending a join message [12:45:35 ERROR]: Error sending packet clientbound/minecraft:set_objective (skippable? false) io.netty.handler.codec.EncoderException: Failed to encode packet 'clientbound/minecraft:set_objective' at net.minecraft.network.codec.IdDispatchCodec.encode(IdDispatchCodec.java:53) ~[paper-1.20.6.jar:1.20.6-149-6e71f41] at net.minecraft.network.codec.IdDispatchCodec.encode(IdDispatchCodec.java:20) ~[paper-1.20.6.jar:1.20.6-149-6e71f41] at net.minecraft.network.PacketEncoder.encode(PacketEncoder.java:26) ~[paper-1.20.6.jar:1.20.6-149-6e71f41] at net.minecraft.network.PacketEncoder.encode(PacketEncoder.java:12) ~[paper-1.20.6.jar:1.20.6-149-6e71f41] at io.netty.handler.codec.MessageToByteEncoder.write(MessageToByteEncoder.java:107) ~[netty-codec-4.1.97.Final.jar:4.1.97.Final] at io.netty.channel.AbstractChannelHandlerContext.invokeWrite0(AbstractChannelHandlerContext.java:881) ~[netty-transport-4.1.97.Final.jar:4.1.97.Final] at io.netty.channel.AbstractChannelHandlerContext.invokeWrite(AbstractChannelHandlerContext.java:863) ~[netty-transport-4.1.97.Final.jar:4.1.97.Final] at io.netty.channel.AbstractChannelHandlerContext.write(AbstractChannelHandlerContext.java:968) ~[netty-transport-4.1.97.Final.jar:4.1.97.Final] at io.netty.channel.AbstractChannelHandlerContext.write(AbstractChannelHandlerContext.java:856) ~[netty-transport-4.1.97.Final.jar:4.1.97.Final] at io.netty.handler.codec.MessageToMessageEncoder.write(MessageToMessageEncoder.java:113) ~[netty-codec-4.1.97.Final.jar:4.1.97.Final] at io.netty.channel.AbstractChannelHandlerContext.invokeWrite0(AbstractChannelHandlerContext.java:881) ~[netty-transport-4.1.97.Final.jar:4.1.97.Final] at io.netty.channel.AbstractChannelHandlerContext.invokeWrite(AbstractChannelHandlerContext.java:863) ~[netty-transport-4.1.97.Final.jar:4.1.97.Final] at io.netty.channel.AbstractChannelHandlerContext.write(AbstractChannelHandlerContext.java:968) ~[netty-transport-4.1.97.Final.jar:4.1.97.Final] at io.netty.channel.AbstractChannelHandlerContext.write(AbstractChannelHandlerContext.java:856) ~[netty-transport-4.1.97.Final.jar:4.1.97.Final] at io.netty.handler.codec.MessageToByteEncoder.write(MessageToByteEncoder.java:120) ~[netty-codec-4.1.97.Final.jar:4.1.97.Final] at io.netty.channel.AbstractChannelHandlerContext.invokeWrite0(AbstractChannelHandlerContext.java:881) ~[netty-transport-4.1.97.Final.jar:4.1.97.Final] at io.netty.channel.AbstractChannelHandlerContext.invokeWrite(AbstractChannelHandlerContext.java:863) ~[netty-transport-4.1.97.Final.jar:4.1.97.Final] at io.netty.channel.AbstractChannelHandlerContext.write(AbstractChannelHandlerContext.java:968) ~[netty-transport-4.1.97.Final.jar:4.1.97.Final] at io.netty.channel.AbstractChannelHandlerContext.write(AbstractChannelHandlerContext.java:856) ~[netty-transport-4.1.97.Final.jar:4.1.97.Final] at io.netty.channel.ChannelOutboundHandlerAdapter.write(ChannelOutboundHandlerAdapter.java:113) ~[netty-transport-4.1.97.Final.jar:4.1.97.Final] at net.minecraft.network.Connection$2.write(Connection.java:750) ~[paper-1.20.6.jar:1.20.6-149-6e71f41] at io.netty.channel.AbstractChannelHandlerContext.invokeWrite0(AbstractChannelHandlerContext.java:881) ~[netty-transport-4.1.97.Final.jar:4.1.97.Final] at io.netty.channel.AbstractChannelHandlerContext.invokeWrite(AbstractChannelHandlerContext.java:863) ~[netty-transport-4.1.97.Final.jar:4.1.97.Final] at io.netty.channel.AbstractChannelHandlerContext.write(AbstractChannelHandlerContext.java:968) ~[netty-transport-4.1.97.Final.jar:4.1.97.Final] at io.netty.channel.AbstractChannelHandlerContext.write(AbstractChannelHandlerContext.java:856) ~[netty-transport-4.1.97.Final.jar:4.1.97.Final] at io.netty.channel.ChannelDuplexHandler.write(ChannelDuplexHandler.java:115) ~[netty-transport-4.1.97.Final.jar:4.1.97.Final] at Vulcan-2.8.8.jar/io.github.repooper.packetevents.injector.modern.PlayerChannelHandlerModern.write(PlayerChannelHandlerModern.java:61) ~[Vulcan-2.8.8.jar:?] at io.netty.channel.AbstractChannelHandlerContext.invokeWrite0(AbstractChannelHandlerContext.java:879) ~[netty-transport-4.1.97.Final.jar:4.1.97.Final] at io.netty.channel.AbstractChannelHandlerContext.invokeWrite(AbstractChannelHandlerContext.java:863) ~[netty-transport-4.1.97.Final.jar:4.1.97.Final] at io.netty.channel.AbstractChannelHandlerContext.write(AbstractChannelHandlerContext.java:968) ~[netty-transport-4.1.97.Final.jar:4.1.97.Final] at io.netty.channel.AbstractChannelHandlerContext.write(AbstractChannelHandlerContext.java:856) ~[netty-transport-4.1.97.Final.jar:4.1.97.Final] at io.netty.channel.ChannelDuplexHandler.write(ChannelDuplexHandler.java:115) ~[netty-transport-4.1.97.Final.jar:4.1.97.Final] at TAB v4.1.7.jar/me.neznamy.tab.shared.features.injection.NettyPipelineInjector$TabChannelDuplexHandler.write(NettyPipelineInjector.java:115) ~[TAB v4.1.7.jar:?] at io.netty.channel.AbstractChannelHandlerContext.invokeWrite0(AbstractChannelHandlerContext.java:879) ~[netty-transport-4.1.97.Final.jar:4.1.97.Final] at io.netty.channel.AbstractChannelHandlerContext.invokeWriteAndFlush(AbstractChannelHandlerContext.java:940) ~[netty-transport-4.1.97.Final.jar:4.1.97.Final] at io.netty.channel.AbstractChannelHandlerContext.write(AbstractChannelHandlerContext.java:966) ~[netty-transport-4.1.97.Final.jar:4.1.97.Final] at io.netty.channel.AbstractChannelHandlerContext.writeAndFlush(AbstractChannelHandlerContext.java:934) ~[netty-transport-4.1.97.Final.jar:4.1.97.Final] at io.netty.channel.DefaultChannelPipeline.writeAndFlush(DefaultChannelPipeline.java:1020) ~[netty-transport-4.1.97.Final.jar:4.1.97.Final] at io.netty.channel.AbstractChannel.writeAndFlush(AbstractChannel.java:311) ~[netty-transport-4.1.97.Final.jar:4.1.97.Final] at ProtocolLib.jar/com.comphenix.protocol.injector.netty.channel.NettyChannelProxy.writeAndFlush(NettyChannelProxy.java:227) ~[ProtocolLib.jar:?] at ProtocolLib.jar/com.comphenix.protocol.injector.netty.channel.NettyChannelProxy.writeAndFlush(NettyChannelProxy.java:233) ~[ProtocolLib.jar:?] at net.minecraft.network.Connection.doSendPacket(Connection.java:505) ~[paper-1.20.6.jar:1.20.6-149-6e71f41] at net.minecraft.network.Connection.lambda$sendPacket$13(Connection.java:490) ~[paper-1.20.6.jar:1.20.6-149-6e71f41] at ProtocolLib.jar/com.comphenix.protocol.injector.netty.channel.NettyEventLoopProxy.lambda$proxyRunnable$2(NettyEventLoopProxy.java:49) ~[ProtocolLib.jar:?] at io.netty.util.concurrent.AbstractEventExecutor.runTask(AbstractEventExecutor.java:174) ~[netty-common-4.1.97.Final.jar:4.1.97.Final] at io.netty.util.concurrent.AbstractEventExecutor.safeExecute(AbstractEventExecutor.java:167) ~[netty-common-4.1.97.Final.jar:4.1.97.Final] at io.netty.util.concurrent.SingleThreadEventExecutor.runAllTasks(SingleThreadEventExecutor.java:470) ~[netty-common-4.1.97.Final.jar:4.1.97.Final] at io.netty.channel.epoll.EpollEventLoop.run(EpollEventLoop.java:413) ~[netty-transport-classes-epoll-4.1.97.Final.jar:4.1.97.Final] at io.netty.util.concurrent.SingleThreadEventExecutor$4.run(SingleThreadEventExecutor.java:997) ~[netty-common-4.1.97.Final.jar:4.1.97.Final] at io.netty.util.internal.ThreadExecutorMap$2.run(ThreadExecutorMap.java:74) ~[netty-common-4.1.97.Final.jar:4.1.97.Final] at java.base/java.lang.Thread.run(Thread.java:1583) ~[?:?] Caused by: java.lang.ClassCastException: class java.lang.Object cannot be cast to class net.minecraft.network.chat.numbers.NumberFormat (java.lang.Object is in module java.base of loader 'bootstrap'; net.minecraft.network.chat.numbers.NumberFormat is in unnamed module of loader java.net.URLClassLoader @2ef1e4fa) at net.minecraft.network.codec.StreamCodec$6.encode(StreamCodec.java:104) ~[paper-1.20.6.jar:1.20.6-149-6e71f41] at net.minecraft.network.codec.ByteBufCodecs$18.encode(ByteBufCodecs.java:363) ~[paper-1.20.6.jar:1.20.6-149-6e71f41] at net.minecraft.network.codec.ByteBufCodecs$18.encode(ByteBufCodecs.java:353) ~[paper-1.20.6.jar:1.20.6-149-6e71f41] at net.minecraft.network.protocol.game.ClientboundSetObjectivePacket.write(ClientboundSetObjectivePacket.java:57) ~[paper-1.20.6.jar:1.20.6-149-6e71f41] at net.minecraft.network.codec.StreamCodec$2.encode(StreamCodec.java:38) ~[paper-1.20.6.jar:1.20.6-149-6e71f41] at net.minecraft.network.codec.StreamCodec$5.encode(StreamCodec.java:88) ~[paper-1.20.6.jar:1.20.6-149-6e71f41] at net.minecraft.network.codec.StreamCodec$5.encode(StreamCodec.java:78) ~[paper-1.20.6.jar:1.20.6-149-6e71f41] ... 51 more [12:45:35 INFO]: anthonygamer9000 Has connected [12:45:35 INFO]: anthonygamer9000[/127.0.0.1:60147] logged in with entity id 321 at ([world_nether]125.24057272469213, 74.42966393308161, 150.9150828066012) [12:45:35 WARN]: [SimpleScore] Task #9645 for SimpleScore v3.12.5 generated an exception com.comphenix.protocol.reflect.FieldAccessException: Field index 0 is out of bounds for length 0 at ProtocolLib.jar/com.comphenix.protocol.reflect.FieldAccessException.fromFormat(FieldAccessException.java:49) ~[ProtocolLib.jar:?] at ProtocolLib.jar/com.comphenix.protocol.reflect.StructureModifier.write(StructureModifier.java:318) ~[ProtocolLib.jar:?] at SimpleScore-3.12.5.jar/com.r4g3baby.simplescore.scoreboard.handlers.ProtocolScoreboard.updateScoreboard(ProtocolScoreboard.kt:154) ~[SimpleScore-3.12.5.jar:?] at SimpleScore-3.12.5.jar/com.r4g3baby.simplescore.scoreboard.tasks.ScoreboardTask.updateScoreboards(ScoreboardTask.kt:89) ~[SimpleScore-3.12.5.jar:?] at SimpleScore-3.12.5.jar/com.r4g3baby.simplescore.scoreboard.tasks.ScoreboardTask.run$lambda$7(ScoreboardTask.kt:72) ~[SimpleScore-3.12.5.jar:?] at org.bukkit.craftbukkit.scheduler.CraftTask.run(CraftTask.java:101) ~[paper-1.20.6.jar:1.20.6-149-6e71f41] at org.bukkit.craftbukkit.scheduler.CraftScheduler.mainThreadHeartbeat(CraftScheduler.java:482) ~[paper-1.20.6.jar:1.20.6-149-6e71f41] at net.minecraft.server.MinecraftServer.tickChildren(MinecraftServer.java:1699) ~[paper-1.20.6.jar:1.20.6-149-6e71f41] at net.minecraft.server.dedicated.DedicatedServer.tickChildren(DedicatedServer.java:467) ~[paper-1.20.6.jar:1.20.6-149-6e71f41] at net.minecraft.server.MinecraftServer.tickServer(MinecraftServer.java:1571) ~[paper-1.20.6.jar:1.20.6-149-6e71f41] at net.minecraft.server.MinecraftServer.runServer(MinecraftServer.java:1231) ~[paper-1.20.6.jar:1.20.6-149-6e71f41] at net.minecraft.server.MinecraftServer.lambda$spin$0(MinecraftServer.java:323) ~[paper-1.20.6.jar:1.20.6-149-6e71f41] at java.base/java.lang.Thread.run(Thread.java:1583) ~[?:?] [12:45:35 INFO]: anthonygamer9000 lost connection: Internal Exception: io.netty.handler.codec.EncoderException: Failed to encode packet 'clientbound/minecraft:set_objective'

Ingrim4 commented 1 month ago

Do you by any chance have SimpleScore installed on your server?

mranthonygamer commented 1 month ago

Yes

Ingrim4 commented 1 month ago

Then this is most likely related to SimpleScore as the author doesn't support 1.20.5+ yet. Nothing we can do about it.