-
-
Notifications
You must be signed in to change notification settings - Fork 151
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ProtocolLib + ViaVersion incompatibility on NachoSpigot 1.8 #325
Comments
Can't reproduce? Did you make sure Grim soft-depends ViaVersion? That might be the cause. |
Works perfectly fine on latest commit on a 1.8 spigot server with current latest Via dev build & ProtocolLib dev build. |
Still happens for me with newest compiled grim with latest packetevents |
That paste has lpx enabled, I'm unsure what lpx does but it's likely a separate issue. |
without lpx: https://paste.twerion.net/yocaricuvu.makefile |
Still an issue |
Floodgate incompatibility? |
@lordhadow1 can you try removing Floodgate, I'll try setting Floodgate up soon to see what is up. |
I don't see how this is still an issue. Works fine for me. |
here a log without floodgate: https://paste.twerion.net/yuwucevunu.makefile |
spigot.yml late-bin: true fixes it new errors: https://paste.twerion.net/qazurubuve.makefile |
Minimally reproducable without late bind, with only ViaVersion and PacketEvents 2.0 You have to join with a 1.18 client on a 1.8 server while the server is starting - meaning during the time that plugins are loading. Late bind must be disabled to reproduce this. |
Potentially fixed on fed8b95 https://cdn.discordapp.com/attachments/811396971059085364/966122886882549800/grimac-2.2.7-all.jar is a grim jar with this update if any who has had this issue wants to see if it still occurs. |
now you can join, but sometimes only at the 2nd try |
When it breaks: When it works: I don't know how to fix this or what PacketEvents is even trying to do here. But my guess is that PacketEvents 2.0 is somehow getting in front of ViaVersion. |
Can we just try to debug the ViaVersion being delayed in returning client version instead of hacking around ViaVersion and creating a temporary injector just to grab the client version? Or at the very least make it so that the temporary injector will automatically disable itself while in the PLAY state. |
Or wait for me to fix the issue. Been a while since I tested my 1.8 server without late-bind. But I see no issue in keeping your server with "late-bind" enabled (atleast for now) |
Potentially related to double injecting, as I've noticed that it's possible for the injector to inject twice on 1.8. |
This occurs 100% consistently with NachoSpigot, but I've yet to encounter this with paper 1.8. More testing is needed! The root cause seems to be from a failure to move the decoder (serverbound packet processor) in time, corrupting the player's pipeline and throwing a bunch of exceptions in the process. Here is some debug info from the exact moment this exception gets thrown in the pipeline and the player gets kicked. throw new PacketProcessException("Failed to map the Packet ID " + packetID + " to a PacketType constant. Bound: " + packetSide.getOpposite() + ", Connection state: " + user.getConnectionState() + ", Server version: " + serverVersion.getReleaseName()); This gets thrown. [15:58:28 INFO]: [ViaVersion] ViaVersion detected server version: 1.8.x (47) This is the netty pipeline while the user's connection state is PLAY. The packet ID is 29, which is the serverbound PING packet. [timeout, splitter, decompress, pe-decoder-grimac, decoder, protocol_lib_inbound_interceptor, prepender, compress, pe-encoder-grimac, encoder, protocol_lib_wire_packet_encoder, packet_handler, DefaultChannelPipeline$TailContext#0] The decoder is getting in front of viaversion. I'll do more debugging on why it isn't moving in front of viaversion in time causes packetevents to read serverbound packets in the wrong protocol format. |
PacketEvents just doesn't see the LOGIN_SUCCESS packet... I've debugged the client and it is getting the packet, but PacketEvents just entirely misses the packet. I don't know how NachoSpigot managed to accomplish this. Can confirm that it works perfectly with 1.8. |
I'd love to know too, haha. |
So can we get this straight, is this only happening on NachoSpigot? |
If so, can you make the issue name more accurate. Or else I assume its broken on an ordinary Spigot server, I personally do not use NachoSpigot. |
There was multiple issues, the original was a late bind issue and the current issue is a NachoSpigot issue. Both had identical stack traces. |
Fixed? |
No, if you know how to fix it, go ahead, nacho devs doesnt know what they are doing |
Well, nacho is dead. That fixes it, I guess. |
yes, packetevents works on forks of nachospigot like windspigot |
I'm just going to close the issue. There's been too many things discussed here for it to be useful. WindSpigot and PandaSpigot will both support PacketEvents. We aren't adding support for modern netty versions on 1.8, these forks just need to add the paper injector API. |
First join on a 1.18 player:
[18:23:29] [Server thread/INFO]: [GrimAC] Netty pipeline is: [timeout, splitter, pe-decoder-grimac, decompress, decoder, protocol_lib_inbound_interceptor, prepender, encoder, protocol_lib_wire_packet_encoder, pe-encoder-grimac, packet_handler, DefaultChannelPipeline$TailContext#0]
The result is a ton of exceptions thrown
Second join on a 1.18 player:
[18:23:41] [Server thread/INFO]: [GrimAC] Netty pipeline is: [timeout, splitter, decompress, decoder, protocol_lib_inbound_interceptor, prepender, compress, encoder, protocol_lib_wire_packet_encoder, pe-encoder-grimac, packet_handler, DefaultChannelPipeline$TailContext#0]
First join on a 1.8 player:
[18:25:14 INFO]: [GrimAC] Netty pipeline is: [timeout, splitter, pe-decoder-grimac, decoder, protocol_lib_inbound_interceptor, prepender, encoder, protocol_lib_wire_packet_encoder, pe-encoder-grimac, packet_handler, DefaultChannelPipeline$TailContext#0]
The text was updated successfully, but these errors were encountered: