Giter Site home page Giter Site logo

Comments (10)

LaserSlime avatar LaserSlime commented on August 11, 2024 1

The client version is 1.20.1. And yes I am aware of these changes and I tried to find ways to adjust my code but I couldnt find any. Mainly because there is no CONFIGURATION value in the Protocol Enum that protocolize provides.

from protocolize.

Exceptionflug avatar Exceptionflug commented on August 11, 2024 1

Hey, sorry for the late response. Currently trying to reproduce this:

1.20.2 Client:
it works

1.20.1 Client:
strange

Yes the commit you mentioned fixes this stacktrace you sent. As you can see, I get the Paper brand aswell as the vanilla brand. I'm running a PluginMessage listener on upstream receive. So the Paper brand should definetely not belong here. I'm currently investigating this.

from protocolize.

Exceptionflug avatar Exceptionflug commented on August 11, 2024

Hey, I assume you are running a 1.20.2 supporting proxy server. And I assume the client version is also 1.20.2. Why I am that sure? Because mojang changed in 1.20.2 the protocol and implemented a new Protocol State "CONFIGURATION". See https://wiki.vg/Protocol#Serverbound_Plugin_Message_.28configuration.29. The client brand will be sent during this new phase so you have to add some changes to your listener. For all < 1.20.2 clients, it should work fine. If not I have to investigate a few things in BungeeCord.

from protocolize.

LaserSlime avatar LaserSlime commented on August 11, 2024

Ok so what do I have to change to fix it?

from protocolize.

LaserSlime avatar LaserSlime commented on August 11, 2024

Ok this issues seems to only affect clients below 1.20.2. I have tried to revert commit c4aa9ae and that fixed it for clients below 1.20.2 but now prints this error for 1.20.2:

[22:13:27 WARN]: Error dispatching event ServerConnectedEvent(player=LaserSlime, server=net.md_5.bungee.ServerConnection@62ba9c1a) to listener dev.simplix.protocolize.bungee.listener.PlayerListener@237add
java.lang.RuntimeException: Unable to obtain connection
        at dev.simplix.protocolize.bungee.util.ReflectionUtil.getConnection(ReflectionUtil.java:91) ~[?:?]
        at dev.simplix.protocolize.bungee.netty.ProtocolizeDecoderChannelHandler.<init>(ProtocolizeDecoderChannelHandler.java:41) ~[?:?]
        at dev.simplix.protocolize.bungee.listener.PlayerListener.onServerSwitch(PlayerListener.java:52) ~[?:?]
        at jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:?]
        at jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77) ~[?:?]
        at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:?]
        at java.lang.reflect.Method.invoke(Method.java:568) ~[?:?]
        at net.md_5.bungee.event.EventHandlerMethod.invoke(EventHandlerMethod.java:19) ~[waterfall.jar:git:Waterfall-Bootstrap:1.20-R0.2-SNAPSHOT:0e657ed:545]
        at net.md_5.bungee.event.EventBus.post(EventBus.java:50) ~[waterfall.jar:git:Waterfall-Bootstrap:1.20-R0.2-SNAPSHOT:0e657ed:545]
        at net.md_5.bungee.api.plugin.PluginManager.callEvent(PluginManager.java:467) ~[waterfall.jar:git:Waterfall-Bootstrap:1.20-R0.2-SNAPSHOT:0e657ed:545]
        at net.md_5.bungee.ServerConnector.handleLogin(ServerConnector.java:233) ~[waterfall.jar:git:Waterfall-Bootstrap:1.20-R0.2-SNAPSHOT:0e657ed:545]
        at net.md_5.bungee.connection.DownstreamBridge.handle(DownstreamBridge.java:838) ~[waterfall.jar:git:Waterfall-Bootstrap:1.20-R0.2-SNAPSHOT:0e657ed:545]
        at net.md_5.bungee.protocol.packet.Login.handle(Login.java:283) ~[waterfall.jar:git:Waterfall-Bootstrap:1.20-R0.2-SNAPSHOT:0e657ed:545]
        at net.md_5.bungee.netty.HandlerBoss.channelRead(HandlerBoss.java:124) ~[waterfall.jar:git:Waterfall-Bootstrap:1.20-R0.2-SNAPSHOT:0e657ed:545]
        at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:444) ~[waterfall.jar:git:Waterfall-Bootstrap:1.20-R0.2-SNAPSHOT:0e657ed:545]
        at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:420) ~[waterfall.jar:git:Waterfall-Bootstrap:1.20-R0.2-SNAPSHOT:0e657ed:545]
        at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:412) ~[waterfall.jar:git:Waterfall-Bootstrap:1.20-R0.2-SNAPSHOT:0e657ed:545]
        at io.netty.handler.timeout.IdleStateHandler.channelRead(IdleStateHandler.java:286) ~[waterfall.jar:git:Waterfall-Bootstrap:1.20-R0.2-SNAPSHOT:0e657ed:545]
        at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:442) ~[waterfall.jar:git:Waterfall-Bootstrap:1.20-R0.2-SNAPSHOT:0e657ed:545]
        at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:420) ~[waterfall.jar:git:Waterfall-Bootstrap:1.20-R0.2-SNAPSHOT:0e657ed:545]
        at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:412) ~[waterfall.jar:git:Waterfall-Bootstrap:1.20-R0.2-SNAPSHOT:0e657ed:545]
        at io.netty.handler.codec.MessageToMessageDecoder.channelRead(MessageToMessageDecoder.java:103) ~[waterfall.jar:git:Waterfall-Bootstrap:1.20-R0.2-SNAPSHOT:0e657ed:545]
        at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:444) ~[waterfall.jar:git:Waterfall-Bootstrap:1.20-R0.2-SNAPSHOT:0e657ed:545]
        at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:420) ~[waterfall.jar:git:Waterfall-Bootstrap:1.20-R0.2-SNAPSHOT:0e657ed:545]
        at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:412) ~[waterfall.jar:git:Waterfall-Bootstrap:1.20-R0.2-SNAPSHOT:0e657ed:545]
        at io.netty.handler.codec.ByteToMessageDecoder.fireChannelRead(ByteToMessageDecoder.java:346) ~[waterfall.jar:git:Waterfall-Bootstrap:1.20-R0.2-SNAPSHOT:0e657ed:545]
        at io.netty.handler.codec.ByteToMessageDecoder.fireChannelRead(ByteToMessageDecoder.java:333) ~[waterfall.jar:git:Waterfall-Bootstrap:1.20-R0.2-SNAPSHOT:0e657ed:545]
        at io.netty.handler.codec.ByteToMessageDecoder.callDecode(ByteToMessageDecoder.java:454) ~[waterfall.jar:git:Waterfall-Bootstrap:1.20-R0.2-SNAPSHOT:0e657ed:545]
        at io.netty.handler.codec.ByteToMessageDecoder.channelRead(ByteToMessageDecoder.java:290) ~[waterfall.jar:git:Waterfall-Bootstrap:1.20-R0.2-SNAPSHOT:0e657ed:545]
        at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:444) ~[waterfall.jar:git:Waterfall-Bootstrap:1.20-R0.2-SNAPSHOT:0e657ed:545]
        at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:420) ~[waterfall.jar:git:Waterfall-Bootstrap:1.20-R0.2-SNAPSHOT:0e657ed:545]
        at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:412) ~[waterfall.jar:git:Waterfall-Bootstrap:1.20-R0.2-SNAPSHOT:0e657ed:545]
        at io.netty.channel.DefaultChannelPipeline$HeadContext.channelRead(DefaultChannelPipeline.java:1410) ~[waterfall.jar:git:Waterfall-Bootstrap:1.20-R0.2-SNAPSHOT:0e657ed:545]
        at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:440) ~[waterfall.jar:git:Waterfall-Bootstrap:1.20-R0.2-SNAPSHOT:0e657ed:545]
        at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:420) ~[waterfall.jar:git:Waterfall-Bootstrap:1.20-R0.2-SNAPSHOT:0e657ed:545]
        at io.netty.channel.DefaultChannelPipeline.fireChannelRead(DefaultChannelPipeline.java:919) ~[waterfall.jar:git:Waterfall-Bootstrap:1.20-R0.2-SNAPSHOT:0e657ed:545]
        at io.netty.channel.nio.AbstractNioByteChannel$NioByteUnsafe.read(AbstractNioByteChannel.java:166) ~[waterfall.jar:git:Waterfall-Bootstrap:1.20-R0.2-SNAPSHOT:0e657ed:545]
        at io.netty.channel.nio.NioEventLoop.processSelectedKey(NioEventLoop.java:788) ~[waterfall.jar:git:Waterfall-Bootstrap:1.20-R0.2-SNAPSHOT:0e657ed:545]
        at io.netty.channel.nio.NioEventLoop.processSelectedKeysOptimized(NioEventLoop.java:724) ~[waterfall.jar:git:Waterfall-Bootstrap:1.20-R0.2-SNAPSHOT:0e657ed:545]
        at io.netty.channel.nio.NioEventLoop.processSelectedKeys(NioEventLoop.java:650) ~[waterfall.jar:git:Waterfall-Bootstrap:1.20-R0.2-SNAPSHOT:0e657ed:545]
        at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:562) ~[waterfall.jar:git:Waterfall-Bootstrap:1.20-R0.2-SNAPSHOT:0e657ed:545]
        at io.netty.util.concurrent.SingleThreadEventExecutor$4.run(SingleThreadEventExecutor.java:997) ~[waterfall.jar:git:Waterfall-Bootstrap:1.20-R0.2-SNAPSHOT:0e657ed:545]
        at io.netty.util.internal.ThreadExecutorMap$2.run(ThreadExecutorMap.java:74) ~[waterfall.jar:git:Waterfall-Bootstrap:1.20-R0.2-SNAPSHOT:0e657ed:545]
        at java.lang.Thread.run(Thread.java:833) [?:?]
Caused by: java.lang.IllegalArgumentException: Can not set final net.md_5.bungee.UserConnection field net.md_5.bungee.connection.UpstreamBridge.con to net.md_5.bungee.connection.DownstreamBridge
        at jdk.internal.reflect.UnsafeFieldAccessorImpl.throwSetIllegalArgumentException(UnsafeFieldAccessorImpl.java:167) ~[?:?]
        at jdk.internal.reflect.UnsafeFieldAccessorImpl.throwSetIllegalArgumentException(UnsafeFieldAccessorImpl.java:171) ~[?:?]
        at jdk.internal.reflect.UnsafeFieldAccessorImpl.ensureObj(UnsafeFieldAccessorImpl.java:58) ~[?:?]
        at jdk.internal.reflect.UnsafeQualifiedObjectFieldAccessorImpl.get(UnsafeQualifiedObjectFieldAccessorImpl.java:38) ~[?:?]
        at java.lang.reflect.Field.get(Field.java:425) ~[?:?]
        at dev.simplix.protocolize.bungee.util.ReflectionUtil.getConnection(ReflectionUtil.java:88) ~[?:?]
        ... 43 more

from protocolize.

LaserSlime avatar LaserSlime commented on August 11, 2024

There is definitely a mistake in the constructor of ProtocolizeDecoderChannelHandler. A custom packet that I implemented also can't be rewritten because it's mapping is falsely set to Serverbound even though I registered it as Clientbound, which causes ProtocolRegistrationProvider#packedId to return -1 since it's searching for a Serverbound instead of a Clientbound packet.

from protocolize.

Exceptionflug avatar Exceptionflug commented on August 11, 2024

Fixed this in the latest build, but it currently doesn build because of velocity so we have to wait I guess

from protocolize.

LaserSlime avatar LaserSlime commented on August 11, 2024

Didnt velocity add 1.20.2 support yesterday? Also I can just only build the bungeecord version and the api. I did that and the brand issue is definitely fixed. However the issue I mentioned with the custom packet registration still remains. Though I dont really care about that anymore since I found an alternative way to achieve what I want that doesnt require the rewriting to work but it's still worth looking into.

from protocolize.

Exceptionflug avatar Exceptionflug commented on August 11, 2024

Yes velocity did add 1.20.2 support but they did not bump their version number so I cannot push their proxy module to my maven repo to use the new config state.

The other problem you stated is something for a new issue. Could you please open a new issue for that and add a bit more of an explanation? I still don't know quite right what the problem is.

from protocolize.

Exceptionflug avatar Exceptionflug commented on August 11, 2024

Fixed long time ago

from protocolize.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.