question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Protocolize causes a ClassCastException with Geyser-BungeeCord in certain cases

See original GitHub issue

See also: https://github.com/GeyserMC/Geyser/issues/2640

Tested Waterfall versions: 450, 454

Tested Protocolize version: commit 88c189f35a820cddd6d40baea7d032361ad22f26 compiled locally.

Tested Geyser version: https://ci.opencollab.dev/job/GeyserMC/job/Geyser/job/master/931/

To reproduce: install both Protocolize and Geyser-BungeeCord on the server, and ensure the passthrough-motd setting is enabled in Geyser.

Error:

[22:57:42 WARN]: Error dispatching event ProxyPingEvent(connection=org.geysermc.platform.bungeecord.GeyserBungeePingPassthrough$GeyserPendingConnection@a2ccd3b, response=ServerPing(version=ServerPing.Protocol(name=Waterfall 1.8.x, 1.9.x, 1.10.x, 1.11.x, 1.12.x, 1.13.x, 1.14.x, 1.15.x, 1.16.x, 1.17.x, protocol=756), players=ServerPing.Players(max=1, online=0, sample=null), description=Another Bungee server2, modinfo=ServerPing.ModInfo(type=FML, modList=[]))) to listener dev.simplix.protocolize.bungee.listener.PlayerListener@4fc2933e
java.lang.ClassCastException: class org.geysermc.platform.bungeecord.GeyserBungeePingPassthrough$GeyserPendingConnection cannot be cast to class net.md_5.bungee.protocol.AbstractPacketHandler (org.geysermc.platform.bungeecord.GeyserBungeePingPassthrough$GeyserPendingConnection is in unnamed module of loader net.md_5.bungee.api.plugin.PluginClassloader @7cf162bc; net.md_5.bungee.protocol.AbstractPacketHandler is in unnamed module of loader 'app')
	at dev.simplix.protocolize.bungee.listener.PlayerListener.onPing(PlayerListener.java:27) ~[?:?]
	at jdk.internal.reflect.GeneratedMethodAccessor21.invoke(Unknown Source) ~[?:?]
	at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:?]
	at java.lang.reflect.Method.invoke(Method.java:567) ~[?:?]
	at net.md_5.bungee.event.EventHandlerMethod.invoke(EventHandlerMethod.java:19) ~[waterfall-1.17-454.jar:git:Waterfall-Bootstrap:1.17-R0.1-SNAPSHOT:aba3aff:454]
	at net.md_5.bungee.event.EventBus.post(EventBus.java:48) ~[waterfall-1.17-454.jar:git:Waterfall-Bootstrap:1.17-R0.1-SNAPSHOT:aba3aff:454]
	at net.md_5.bungee.api.plugin.PluginManager.callEvent(PluginManager.java:466) ~[waterfall-1.17-454.jar:git:Waterfall-Bootstrap:1.17-R0.1-SNAPSHOT:aba3aff:454]
	at org.geysermc.platform.bungeecord.GeyserBungeePingPassthrough.getPingInformation(GeyserBungeePingPassthrough.java:54) ~[?:?]
	at org.geysermc.connector.network.ConnectorServerEventHandler.onQuery(ConnectorServerEventHandler.java:100) ~[?:?]
	at com.nukkitx.protocol.bedrock.BedrockServer$BedrockServerListener.onQuery(BedrockServer.java:93) ~[?:?]
	at com.nukkitx.network.raknet.RakNetServer.onUnconnectedPing(RakNetServer.java:239) ~[?:?]
	at com.nukkitx.network.raknet.RakNetServer.access$400(RakNetServer.java:34) ~[?:?]
	at com.nukkitx.network.raknet.RakNetServer$ServerDatagramHandler.channelRead(RakNetServer.java:366) ~[?:?]
	at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:379) ~[waterfall-1.17-454.jar:git:Waterfall-Bootstrap:1.17-R0.1-SNAPSHOT:aba3aff:454]
	at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:365) ~[waterfall-1.17-454.jar:git:Waterfall-Bootstrap:1.17-R0.1-SNAPSHOT:aba3aff:454]
	at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:357) ~[waterfall-1.17-454.jar:git:Waterfall-Bootstrap:1.17-R0.1-SNAPSHOT:aba3aff:454]
	at io.netty.channel.DefaultChannelPipeline$HeadContext.channelRead(DefaultChannelPipeline.java:1410) ~[waterfall-1.17-454.jar:git:Waterfall-Bootstrap:1.17-R0.1-SNAPSHOT:aba3aff:454]
	at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:379) ~[waterfall-1.17-454.jar:git:Waterfall-Bootstrap:1.17-R0.1-SNAPSHOT:aba3aff:454]
	at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:365) ~[waterfall-1.17-454.jar:git:Waterfall-Bootstrap:1.17-R0.1-SNAPSHOT:aba3aff:454]
	at io.netty.channel.DefaultChannelPipeline.fireChannelRead(DefaultChannelPipeline.java:919) ~[waterfall-1.17-454.jar:git:Waterfall-Bootstrap:1.17-R0.1-SNAPSHOT:aba3aff:454]
	at io.netty.channel.epoll.EpollDatagramChannel.processPacket(EpollDatagramChannel.java:616) ~[waterfall-1.17-454.jar:git:Waterfall-Bootstrap:1.17-R0.1-SNAPSHOT:aba3aff:454]
	at io.netty.channel.epoll.EpollDatagramChannel.recvmsg(EpollDatagramChannel.java:651) ~[waterfall-1.17-454.jar:git:Waterfall-Bootstrap:1.17-R0.1-SNAPSHOT:aba3aff:454]
	at io.netty.channel.epoll.EpollDatagramChannel.access$100(EpollDatagramChannel.java:56) ~[waterfall-1.17-454.jar:git:Waterfall-Bootstrap:1.17-R0.1-SNAPSHOT:aba3aff:454]
	at io.netty.channel.epoll.EpollDatagramChannel$EpollDatagramChannelUnsafe.epollInReady(EpollDatagramChannel.java:490) ~[waterfall-1.17-454.jar:git:Waterfall-Bootstrap:1.17-R0.1-SNAPSHOT:aba3aff:454]
	at io.netty.channel.epoll.EpollEventLoop.processReady(EpollEventLoop.java:480) ~[waterfall-1.17-454.jar:git:Waterfall-Bootstrap:1.17-R0.1-SNAPSHOT:aba3aff:454]
	at io.netty.channel.epoll.EpollEventLoop.run(EpollEventLoop.java:378) ~[waterfall-1.17-454.jar:git:Waterfall-Bootstrap:1.17-R0.1-SNAPSHOT:aba3aff:454]
	at io.netty.util.concurrent.SingleThreadEventExecutor$4.run(SingleThreadEventExecutor.java:989) ~[waterfall-1.17-454.jar:git:Waterfall-Bootstrap:1.17-R0.1-SNAPSHOT:aba3aff:454]
	at io.netty.util.internal.ThreadExecutorMap$2.run(ThreadExecutorMap.java:74) ~[waterfall-1.17-454.jar:git:Waterfall-Bootstrap:1.17-R0.1-SNAPSHOT:aba3aff:454]
	at java.lang.Thread.run(Thread.java:831) [?:?]

Problem code: Geyser calls a fake ProxyPingEvent to gather ping about the server: https://github.com/GeyserMC/Geyser/blob/master/bootstrap/bungeecord/src/main/java/org/geysermc/platform/bungeecord/GeyserBungeePingPassthrough.java#L54 . Protocolize assumes all ProxyPingEvents extends AbstractPacketHandler: https://github.com/Exceptionflug/protocolize/blob/master/protocolize-bungeecord/src/main/java/dev/simplix/protocolize/bungee/listener/PlayerListener.java#L27 .

If there’s something we can do on our end to potentially address the situation, let me know.

Cheers.

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:8 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
ChiboYencommented, Feb 10, 2022

Yes, sorry, we talked on the Discord, I am now on the latest build and it is now fixed.

0reactions
Exceptionflugcommented, Feb 9, 2022

This was not the latest version on the date you posted. Please download the latest version from here: https://ci.exceptionflug.de/job/Protocolize2/lastSuccessfulBuild/artifact/protocolize-velocity/target/protocolize-velocity.jar

And please tell me if it is fixed.

Read more comments on GitHub >

github_iconTop Results From Across the Web

protocolize
protocolize repo issues. ... Protocolize causes a ClassCastException with Geyser-BungeeCord in certain cases. 0ddlyoko. 0ddlyoko CLOSED · Updated 1 year ago ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found