ViaBackwards icon indicating copy to clipboard operation
ViaBackwards copied to clipboard

Can't join 1.21.3 Folia server with 1.21.1 client

Open MATRIX-feather opened this issue 1 year ago • 20 comments

'/viaversion dump' Output

https://dump.viaversion.com/b97219b4aed7cd8b3d0ea3d23cb0be5df4c0eb2ee72a9e7afdb9c822032b5a9a

Console Error

https://mclo.gs/SyuLCcT

Bug Description

When connecting 1.21.3 Folia server with 1.21.1 client, the client got kicked with io.netty.handler.codec.DecoderException: Pipeline has no inbound protocol configured, can't process packet PooledUnsafeDirectByteBuf(freed)

Steps to Reproduce

  1. Setup a 1.21.3 Folia server
  2. Join with a 1.21.1 client
  3. The client got kicked

Expected Behavior

The client can join the server

Additional Server Info

The server is running Folia version 1.21.3-DEV-dev/1.21.3@815dd7b (2024-12-02T12:17:53Z)

No other plugins are installed, and the client is 1.21.1 vanilla

Checklist

  • [X] Via plugins are only running on EITHER the backend servers (e.g. Paper) OR the proxy (e.g. Velocity), not on both.
  • [X] I have included a ViaVersion dump.
  • [X] If applicable, I have included a paste (not a screenshot) of the error.
  • [X] I have tried a build from https://ci.viaversion.com/ and the issue still persists.

MATRIX-feather avatar Dec 03 '24 03:12 MATRIX-feather

Platform: 1.21.3--DEV--815dd7b%20%28MC%3A%201.21.3%29 ViaVersion (5.1.2-SNAPSHOT): Even with master ViaBackwards(5.1.2-SNAPSHOT): Even with master

Barvalg avatar Dec 03 '24 03:12 Barvalg

Cannot reproduce. You probably have a broken proxy or client

kennytv avatar Dec 03 '24 09:12 kennytv

But the server is not running behind a proxy, the client doesn't use any as well

I also tried launching a fresh client using the official launcher, still got this problem when connecting

MATRIX-feather avatar Dec 03 '24 10:12 MATRIX-feather

What's your compression threshold in the server properties file?

kennytv avatar Dec 07 '24 12:12 kennytv

What's your compression threshold in the server properties file?

-1

MATRIX-feather avatar Dec 07 '24 13:12 MATRIX-feather

Can you try setting it to a really high number instead? I haven't been able to reproduce this yet for some reason

kennytv avatar Dec 07 '24 13:12 kennytv

Just tried 8192000 and 2147483647(huh), no kick.

It seems that this only happens when the compression is disabled.

MATRIX-feather avatar Dec 07 '24 13:12 MATRIX-feather

The server configuration is available here, if needed: https://drive.google.com/file/d/1AXqjApi48VSpcIF9SyjLMeH-YK5uFJFJ/view?usp=sharing

Server starts on port 25566, and server.properties.broken is the one that kicks the player

MATRIX-feather avatar Dec 07 '24 13:12 MATRIX-feather

Hello,

I can reproduce this with Client Vanilla 1.21.1 -> Server PaperMC 1.21.3.

According I recaived an invalid packet aka an Item:

[04:20:39] [Render thread/ERROR]: Registry loading errors:
> Errors in registry minecraft:enchantment:
>> Errors in element minecraft:range:
java.lang.IllegalStateException: Failed to parse value {anvil_cost:1,description:{translate:"custom_enchantment.range"},max_cost:{base:0,per_level_above_first:0},max_level:1,min_cost:{base:0,per_level_above_first:0},slots:["mainhand","offhand"],

nicolube avatar Dec 08 '24 03:12 nicolube

@MATRIX-feather Pls check ur client-log if u see something simellar.

nicolube avatar Dec 08 '24 03:12 nicolube

Hi,

I checked my client logs, but sadly, nothing worth to report:

[13:18:59] [Render thread/INFO] (Minecraft) Connecting to localhost, 25565
[13:19:00] [Netty Epoll Client IO #1/WARN] (Minecraft) Unknown feature flag: minecraft:winter_drop
[13:19:01] [Render thread/WARN] (Minecraft) Not all defined tags for registry ResourceKey[minecraft:root / minecraft:item] are present in data pack: minecraft:flowers, minecraft:tall_flowers, minecraft:trim_templates
[13:19:01] [Render thread/WARN] (Minecraft) Not all defined tags for registry ResourceKey[minecraft:root / minecraft:block] are present in data pack: minecraft:tall_flowers
[13:19:01] [Render thread/WARN] (Minecraft) Client disconnected with reason: Internal Exception: io.netty.handler.codec.DecoderException: Pipeline has no inbound protocol configured, can't process packet PooledUnsafeDirectByteBuf(freed)
[13:19:05] [Render thread/INFO] (Minecraft) Found non-pack entry '/media/neko/Btrfs/minecraft/profiles/kinopico/resourcepacks/folder.json', ignoring

And for the log you posted, I believe it's a different issue, since the client can at least join the server :thinking:

MATRIX-feather avatar Dec 08 '24 05:12 MATRIX-feather

Can also confirm this for 1.20.6 clients on 1.21.3 Paper servers

LaserSlime avatar Dec 17 '24 17:12 LaserSlime

@nicolube Your issue is different and should be reported separately;

Seems to be valid on Folia server, doesn't happen on Paper ones.

FlorianMichael avatar Dec 20 '24 03:12 FlorianMichael

I can reproduce this with Client Fabric 1.21.1 -> Server Folia 1.21.4 with ViaBackwards-5.2.1 and ViaBackwards-5.2.0

[10:42:03 INFO]: adabugra joined the game
[10:42:03 INFO]: adabugra[/176.234.131.2:27863] logged in with entity id 20 at ([world]-11.5, 113.0, 0.5)
[10:42:03 INFO]: adabugra lost connection: Internal Exception: io.netty.handler.codec.DecoderException: Pipeline has no inbound protocol configured, can't process packet PooledUnsafeDirectByteBuf(freed)
[10:42:03 INFO]: adabugra left the game

adabugra avatar Dec 21 '24 11:12 adabugra

Tested here also, when network-compression-threshold is -1 on folia 1.21.4/1.21.3, this problem will occurs.

network-compression-threshold is recommended to set to -1 when server is behind velocity/bungee, in this test case, I am connecting the server directly and it trigger this error. I can also confirm that his problem occurs even if the server is behind velocity/bungee(tested).

server: luminol-1.21.4-bundler (folia fork, folia also have this problem) client: vanilla 1.21.1 / vanilla 1.20.4 (any version that is not same as server version which triggers viaversion, so if 1.21.4 client login 1.21.4 server, this problem does not occurs because viaversion is not running for same version session)

cgw2023 avatar Jan 05 '25 14:01 cgw2023

I can reproduce this on a Fabric 1.21.4 server with a Fabric 1.21.1 client.

Latest snapshot versions of ViaBackwards, ViaVersion.

Latest alpha of ViaFabric.

ThatMG393 avatar Feb 02 '25 13:02 ThatMG393

Bump, players below 1.21.2 (1.21.1 and lower) cannot join 1.21.4 Folia when network-compression-threshold is set to -1. Tested with ViaVersion and ViaBackwards 5.3.1.

Teslicek avatar Apr 01 '25 08:04 Teslicek

Update:

Setting network-compression-threshold to 99999 instead of -1 works and does effectively the same thing, because no packet will exceed 99999. Seems like Folia changed the pipeline a bit, which breaks this behavior.

Teslicek avatar Apr 01 '25 12:04 Teslicek

Am also having this issue on 1.21.4 Paper, no clear fix available yet other than this compression threshold workaround?

xXkguyXx avatar Apr 04 '25 02:04 xXkguyXx

test folia / luminol 1.21.5 , still the same

cgw2023 avatar Jun 12 '25 05:06 cgw2023

still the same

iKuety avatar Aug 24 '25 12:08 iKuety

still happening on 1.21.8 viafabric when client trying to join with 1.21.1 velocity viaversion seems fine, only happens on fabric version

Harusarri avatar Aug 26 '25 15:08 Harusarri

idk, about the Folia server case, but this fixes the Fabric + ViaBackwards issue. When the client installs this mod, the server stops kicking them https://modrinth.com/mod/packet-fixer/

tested on 1.21.8 latest fabric version and viaversion, viabackward client was 1.21.1

Harusarri avatar Aug 27 '25 09:08 Harusarri