GeyserMC / MCProtocolLib

A library for communication with a Minecraft client/server.
MIT License
721 stars 201 forks source link

Error connecting to server 1.15 #541

Closed ghost closed 4 years ago

ghost commented 4 years ago

Disconnected: java.lang.NoSuchMethodError: com.github.steveice10.packetlib.Session.getFlag(Ljava/lang/String;Ljava/lang/Object;)Ljava/lang/Object; java.lang.NoSuchMethodError: com.github.steveice10.packetlib.Session.getFlag(Ljava/lang/String;Ljava/lang/Object;)Ljava/lang/Object; at com.github.steveice10.mc.protocol.ClientListener.packetReceived(ClientListener.java:59) at com.github.steveice10.packetlib.event.session.PacketReceivedEvent.call(PacketReceivedEvent.java:51) at com.github.steveice10.packetlib.tcp.TcpSession.callEvent(TcpSession.java:142) at com.github.steveice10.packetlib.tcp.TcpPacketCodec.decode(TcpPacketCodec.java:48) at io.netty.handler.codec.ByteToMessageCodec$1.decode(ByteToMessageCodec.java:42) at io.netty.handler.codec.ByteToMessageDecoder.callDecode(ByteToMessageDecoder.java:411) at io.netty.handler.codec.ByteToMessageDecoder.channelRead(ByteToMessageDecoder.java:248) at io.netty.handler.codec.ByteToMessageCodec.channelRead(ByteToMessageCodec.java:103) at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:372) at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:358) at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:350) at io.netty.handler.codec.ByteToMessageDecoder.fireChannelRead(ByteToMessageDecoder.java:293) at io.netty.handler.codec.ByteToMessageDecoder.channelRead(ByteToMessageDecoder.java:267) at io.netty.handler.codec.ByteToMessageCodec.channelRead(ByteToMessageCodec.java:103) at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:372) at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:358) at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:350) at io.netty.handler.codec.ByteToMessageDecoder.fireChannelRead(ByteToMessageDecoder.java:293) at io.netty.handler.codec.ByteToMessageDecoder.channelRead(ByteToMessageDecoder.java:267) at io.netty.handler.codec.ByteToMessageCodec.channelRead(ByteToMessageCodec.java:103) at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:372) at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:358) at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:350) at io.netty.handler.timeout.IdleStateHandler.channelRead(IdleStateHandler.java:266) at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:372) at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:358) at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:350) at io.netty.channel.DefaultChannelPipeline$HeadContext.channelRead(DefaultChannelPipeline.java:1334) at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:372) at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:358) at io.netty.channel.DefaultChannelPipeline.fireChannelRead(DefaultChannelPipeline.java:926) at io.netty.channel.oio.AbstractOioByteChannel.doRead(AbstractOioByteChannel.java:162) at io.netty.channel.oio.AbstractOioChannel$1.run(AbstractOioChannel.java:37) at io.netty.channel.ThreadPerChannelEventLoop.run(ThreadPerChannelEventLoop.java:67) at io.netty.util.concurrent.SingleThreadEventExecutor$5.run(SingleThreadEventExecutor.java:877) at java.lang.Thread.run(Unknown Source)

this is by using the login method from: https://github.com/Steveice10/MCProtocolLib/blob/master/example/com/github/steveice10/mc/protocol/test/MinecraftProtocolTest.java#L152

ghost commented 4 years ago

hey steve, could you update the example login code to show how to use the new ProxyInfo parameter? Is there a way for it to be localhost? Thanks.

ghost commented 4 years ago

TcpSessionFactory tcpSessionFactory = proxy.equals(Proxy.NO_PROXY) ? new TcpSessionFactory() : new TcpSessionFactory(new ProxyInfo(ProxyInfo.Type.SOCKS4, proxy.address())); Would this work? Thanks

ghost commented 4 years ago

Yes, it worked. Thank you very much