CrucibleMC / Crucible

Crucible, a fork of Thermos, is a CraftBukkit and Forge server implementation for 1.7.10, providing the ability to load both Forge mods and Bukkit plugins alongside each other.
https://discord.gg/jWSTJ4d
GNU General Public License v3.0
184 stars 63 forks source link

[BUG] java.io.IOException: Packet was larger than I expected #139

Open dayd21git opened 11 months ago

dayd21git commented 11 months ago

Describe the bug Installed a clean server. Installed mods on the server. Started the server. Connected to the server and crashed with an error. There is no such problem when I use a original FORGE server: download

Expected behavior I should not be kicked from the server There is no such problem when I use a original FORGE server: download

Log client:
[14:56:06] [Netty Client IO #1/ERROR]: NetworkDispatcher exception
io.netty.handler.codec.DecoderException: java.io.EOFException
    at io.netty.handler.codec.ByteToMessageDecoder.callDecode(ByteToMessageDecoder.java:263) ~[ByteToMessageDecoder.class:?]
    at io.netty.handler.codec.ByteToMessageDecoder.channelRead(ByteToMessageDecoder.java:131) ~[ByteToMessageDecoder.class:?]
    at io.netty.channel.DefaultChannelHandlerContext.invokeChannelRead(DefaultChannelHandlerContext.java:337) ~[DefaultChannelHandlerContext.class:?]
    at io.netty.channel.DefaultChannelHandlerContext.fireChannelRead(DefaultChannelHandlerContext.java:323) ~[DefaultChannelHandlerContext.class:?]
    at io.netty.handler.codec.ByteToMessageDecoder.channelRead(ByteToMessageDecoder.java:173) ~[ByteToMessageDecoder.class:?]
    at io.netty.channel.DefaultChannelHandlerContext.invokeChannelRead(DefaultChannelHandlerContext.java:337) ~[DefaultChannelHandlerContext.class:?]
    at io.netty.channel.DefaultChannelHandlerContext.fireChannelRead(DefaultChannelHandlerContext.java:323) ~[DefaultChannelHandlerContext.class:?]
    at io.netty.handler.timeout.ReadTimeoutHandler.channelRead(ReadTimeoutHandler.java:149) ~[ReadTimeoutHandler.class:?]
    at io.netty.channel.DefaultChannelHandlerContext.invokeChannelRead(DefaultChannelHandlerContext.java:337) ~[DefaultChannelHandlerContext.class:?]
    at io.netty.channel.DefaultChannelHandlerContext.fireChannelRead(DefaultChannelHandlerContext.java:323) ~[DefaultChannelHandlerContext.class:?]
    at io.netty.channel.DefaultChannelPipeline.fireChannelRead(DefaultChannelPipeline.java:785) ~[DefaultChannelPipeline.class:?]
    at io.netty.channel.nio.AbstractNioByteChannel$NioByteUnsafe.read(AbstractNioByteChannel.java:100) ~[AbstractNioByteChannel$NioByteUnsafe.class:?]
    at io.netty.channel.nio.NioEventLoop.processSelectedKey(NioEventLoop.java:480) ~[NioEventLoop.class:?]
    at io.netty.channel.nio.NioEventLoop.processSelectedKeysOptimized(NioEventLoop.java:447) ~[NioEventLoop.class:?]
    at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:341) ~[NioEventLoop.class:?]
    at io.netty.util.concurrent.SingleThreadEventExecutor$2.run(SingleThreadEventExecutor.java:101) ~[SingleThreadEventExecutor$2.class:?]
    at java.lang.Thread.run(Unknown Source) ~[?:1.8.0_361]
Caused by: java.io.EOFException
    at java.util.zip.GZIPInputStream.readUByte(Unknown Source) ~[?:1.8.0_361]
    at java.util.zip.GZIPInputStream.readUShort(Unknown Source) ~[?:1.8.0_361]
    at java.util.zip.GZIPInputStream.readHeader(Unknown Source) ~[?:1.8.0_361]
    at java.util.zip.GZIPInputStream.(Unknown Source) ~[?:1.8.0_361]
    at java.util.zip.GZIPInputStream.(Unknown Source) ~[?:1.8.0_361]
    at net.minecraft.nbt.CompressedStreamTools.func_152457_a(CompressedStreamTools.java:60) ~[du.class:?]
    at net.minecraft.network.PacketBuffer.func_150793_b(SourceFile:89) ~[et.class:?]
    at net.minecraft.network.PacketBuffer.func_150791_c(SourceFile:116) ~[et.class:?]
    at net.minecraft.entity.DataWatcher.func_151508_b(SourceFile:278) ~[te.class:?]
    at net.minecraft.network.play.server.S1CPacketEntityMetadata.func_148837_a(SourceFile:30) ~[hw.class:?]
    at net.minecraft.util.MessageDeserializer.decode(SourceFile:40) ~[ez.class:?]
    at io.netty.handler.codec.ByteToMessageDecoder.callDecode(ByteToMessageDecoder.java:232) ~[ByteToMessageDecoder.class:?]
    ... 16 more
[14:56:06] [Netty Client IO #1/INFO]: Restoring client configs.
[14:56:06] [Netty Client IO #1/ERROR]: NetworkDispatcher exception
io.netty.handler.codec.DecoderException: java.io.IOException: Bad packet id 127
    at io.netty.handler.codec.ByteToMessageDecoder.callDecode(ByteToMessageDecoder.java:263) ~[ByteToMessageDecoder.class:?]
    at io.netty.handler.codec.ByteToMessageDecoder.channelRead(ByteToMessageDecoder.java:147) ~[ByteToMessageDecoder.class:?]
    at io.netty.channel.DefaultChannelHandlerContext.invokeChannelRead(DefaultChannelHandlerContext.java:337) ~[DefaultChannelHandlerContext.class:?]
    at io.netty.channel.DefaultChannelHandlerContext.fireChannelRead(DefaultChannelHandlerContext.java:323) ~[DefaultChannelHandlerContext.class:?]
    at io.netty.handler.codec.ByteToMessageDecoder.channelRead(ByteToMessageDecoder.java:173) ~[ByteToMessageDecoder.class:?]
    at io.netty.channel.DefaultChannelHandlerContext.invokeChannelRead(DefaultChannelHandlerContext.java:337) ~[DefaultChannelHandlerContext.class:?]
    at io.netty.channel.DefaultChannelHandlerContext.fireChannelRead(DefaultChannelHandlerContext.java:323) ~[DefaultChannelHandlerContext.class:?]
    at io.netty.handler.timeout.ReadTimeoutHandler.channelRead(ReadTimeoutHandler.java:149) ~[ReadTimeoutHandler.class:?]
    at io.netty.channel.DefaultChannelHandlerContext.invokeChannelRead(DefaultChannelHandlerContext.java:337) ~[DefaultChannelHandlerContext.class:?]
    at io.netty.channel.DefaultChannelHandlerContext.fireChannelRead(DefaultChannelHandlerContext.java:323) ~[DefaultChannelHandlerContext.class:?]
    at io.netty.channel.DefaultChannelPipeline.fireChannelRead(DefaultChannelPipeline.java:785) ~[DefaultChannelPipeline.class:?]
    at io.netty.channel.nio.AbstractNioByteChannel$NioByteUnsafe.read(AbstractNioByteChannel.java:100) ~[AbstractNioByteChannel$NioByteUnsafe.class:?]
    at io.netty.channel.nio.NioEventLoop.processSelectedKey(NioEventLoop.java:480) ~[NioEventLoop.class:?]
    at io.netty.channel.nio.NioEventLoop.processSelectedKeysOptimized(NioEventLoop.java:447) ~[NioEventLoop.class:?]
    at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:341) ~[NioEventLoop.class:?]
    at io.netty.util.concurrent.SingleThreadEventExecutor$2.run(SingleThreadEventExecutor.java:101) ~[SingleThreadEventExecutor$2.class:?]
    at java.lang.Thread.run(Unknown Source) ~[?:1.8.0_361]
Caused by: java.io.IOException: Bad packet id 127
    at net.minecraft.util.MessageDeserializer.decode(SourceFile:37) ~[ez.class:?]
    at io.netty.handler.codec.ByteToMessageDecoder.callDecode(ByteToMessageDecoder.java:232) ~[ByteToMessageDecoder.class:?]
    ... 16 more
[14:56:06] [Netty Client IO #1/ERROR]: NetworkDispatcher exception
io.netty.handler.codec.DecoderException: java.io.IOException: Bad packet id 2431
    at io.netty.handler.codec.ByteToMessageDecoder.callDecode(ByteToMessageDecoder.java:263) ~[ByteToMessageDecoder.class:?]
    at io.netty.handler.codec.ByteToMessageDecoder.channelRead(ByteToMessageDecoder.java:147) ~[ByteToMessageDecoder.class:?]
    at io.netty.channel.DefaultChannelHandlerContext.invokeChannelRead(DefaultChannelHandlerContext.java:337) ~[DefaultChannelHandlerContext.class:?]
    at io.netty.channel.DefaultChannelHandlerContext.fireChannelRead(DefaultChannelHandlerContext.java:323) ~[DefaultChannelHandlerContext.class:?]
    at io.netty.handler.codec.ByteToMessageDecoder.channelRead(ByteToMessageDecoder.java:173) ~[ByteToMessageDecoder.class:?]
    at io.netty.channel.DefaultChannelHandlerContext.invokeChannelRead(DefaultChannelHandlerContext.java:337) ~[DefaultChannelHandlerContext.class:?]
    at io.netty.channel.DefaultChannelHandlerContext.fireChannelRead(DefaultChannelHandlerContext.java:323) ~[DefaultChannelHandlerContext.class:?]
    at io.netty.handler.timeout.ReadTimeoutHandler.channelRead(ReadTimeoutHandler.java:149) ~[ReadTimeoutHandler.class:?]
    at io.netty.channel.DefaultChannelHandlerContext.invokeChannelRead(DefaultChannelHandlerContext.java:337) ~[DefaultChannelHandlerContext.class:?]
    at io.netty.channel.DefaultChannelHandlerContext.fireChannelRead(DefaultChannelHandlerContext.java:323) ~[DefaultChannelHandlerContext.class:?]
    at io.netty.channel.DefaultChannelPipeline.fireChannelRead(DefaultChannelPipeline.java:785) ~[DefaultChannelPipeline.class:?]
    at io.netty.channel.nio.AbstractNioByteChannel$NioByteUnsafe.read(AbstractNioByteChannel.java:100) ~[AbstractNioByteChannel$NioByteUnsafe.class:?]
    at io.netty.channel.nio.NioEventLoop.processSelectedKey(NioEventLoop.java:480) ~[NioEventLoop.class:?]
    at io.netty.channel.nio.NioEventLoop.processSelectedKeysOptimized(NioEventLoop.java:447) ~[NioEventLoop.class:?]
    at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:341) ~[NioEventLoop.class:?]
    at io.netty.util.concurrent.SingleThreadEventExecutor$2.run(SingleThreadEventExecutor.java:101) ~[SingleThreadEventExecutor$2.class:?]
    at java.lang.Thread.run(Unknown Source) ~[?:1.8.0_361]
Caused by: java.io.IOException: Bad packet id 2431
    at net.minecraft.util.MessageDeserializer.decode(SourceFile:37) ~[ez.class:?]
    at io.netty.handler.codec.ByteToMessageDecoder.callDecode(ByteToMessageDecoder.java:232) ~[ByteToMessageDecoder.class:?]
    ... 16 more
[14:56:06] [Netty Client IO #1/ERROR]: NetworkDispatcher exception
io.netty.handler.codec.DecoderException: java.io.IOException: Packet was larger than I expected, found 22 bytes extra whilst reading packet 0
    at io.netty.handler.codec.ByteToMessageDecoder.callDecode(ByteToMessageDecoder.java:263) ~[ByteToMessageDecoder.class:?]
    at io.netty.handler.codec.ByteToMessageDecoder.channelRead(ByteToMessageDecoder.java:147) ~[ByteToMessageDecoder.class:?]
    at io.netty.channel.DefaultChannelHandlerContext.invokeChannelRead(DefaultChannelHandlerContext.java:337) ~[DefaultChannelHandlerContext.class:?]
    at io.netty.channel.DefaultChannelHandlerContext.fireChannelRead(DefaultChannelHandlerContext.java:323) ~[DefaultChannelHandlerContext.class:?]
    at io.netty.handler.codec.ByteToMessageDecoder.channelRead(ByteToMessageDecoder.java:173) ~[ByteToMessageDecoder.class:?]
    at io.netty.channel.DefaultChannelHandlerContext.invokeChannelRead(DefaultChannelHandlerContext.java:337) ~[DefaultChannelHandlerContext.class:?]
    at io.netty.channel.DefaultChannelHandlerContext.fireChannelRead(DefaultChannelHandlerContext.java:323) ~[DefaultChannelHandlerContext.class:?]
    at io.netty.handler.timeout.ReadTimeoutHandler.channelRead(ReadTimeoutHandler.java:149) ~[ReadTimeoutHandler.class:?]
    at io.netty.channel.DefaultChannelHandlerContext.invokeChannelRead(DefaultChannelHandlerContext.java:337) ~[DefaultChannelHandlerContext.class:?]
    at io.netty.channel.DefaultChannelHandlerContext.fireChannelRead(DefaultChannelHandlerContext.java:323) ~[DefaultChannelHandlerContext.class:?]
    at io.netty.channel.DefaultChannelPipeline.fireChannelRead(DefaultChannelPipeline.java:785) ~[DefaultChannelPipeline.class:?]
    at io.netty.channel.nio.AbstractNioByteChannel$NioByteUnsafe.read(AbstractNioByteChannel.java:100) ~[AbstractNioByteChannel$NioByteUnsafe.class:?]
    at io.netty.channel.nio.NioEventLoop.processSelectedKey(NioEventLoop.java:480) ~[NioEventLoop.class:?]
    at io.netty.channel.nio.NioEventLoop.processSelectedKeysOptimized(NioEventLoop.java:447) ~[NioEventLoop.class:?]
    at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:341) ~[NioEventLoop.class:?]
    at io.netty.util.concurrent.SingleThreadEventExecutor$2.run(SingleThreadEventExecutor.java:101) ~[SingleThreadEventExecutor$2.class:?]
    at java.lang.Thread.run(Unknown Source) ~[?:1.8.0_361]
Caused by: java.io.IOException: Packet was larger than I expected, found 22 bytes extra whilst reading packet 0
    at net.minecraft.util.MessageDeserializer.decode(SourceFile:42) ~[ez.class:?]
    at io.netty.handler.codec.ByteToMessageDecoder.callDecode(ByteToMessageDecoder.java:232) ~[ByteToMessageDecoder.class:?]
    ... 16 more
    
Log server:
[14:55:49] [Server thread/INFO]: day-d[/127.0.0.1:53981] logged in with entity id 1319 at ([world] -187.5, 97.0, -147.5)
[14:56:06] [Server thread/INFO]: day-d has just earned the achievement [You've been installed!]
[14:56:06] [Netty IO #1/INFO]: [Thermos] Watchable object type is incorrect! Appying correct type! ( 5 -> 7)
[14:56:06] [Server thread/INFO]: day-d lost connection: Internal Exception: java.io.IOException: ϰବ࠭ࠢล젵-ꮬ^򥰥 𠧮𢠫࠳񲠭孭ﮤ꫾÷孨半
[14:56:06] [Server thread/INFO]: day-d left the game.
    

Environment (please complete the following information):

Veritaris commented 10 months ago

Hi @dayd21git I suggest you to use mod PacketUnlimiter to unlock max S <> C packet size as workaround It is required on both client and server side