ProtocolLib

3M Downloads

Couldn't place player in world- Invalid player data

AyalX opened this issue ยท 25 comments

commented

This issue is not solved in a development build

Describe the bug
Unclear the cause of this issue, when attempting to enter our lobby sometimes it kicks you with the message "Invalid player data" if you attempt to rejoin 1-2 more times it let's you in without an issue

Error on console:

[22:48:04 INFO]: UUID of player AyalX is 211c5729-e7a3-4054-af6f-e75b955a126b
[22:48:04 ERROR]: Couldn't place player in world
net.minecraft.ReportedException: Sending packet
        at net.minecraft.server.network.ServerGamePacketListenerImpl.send(ServerGamePacketListenerImpl.java:2260) ~[?:?]
        at net.minecraft.server.network.ServerGamePacketListenerImpl.send(ServerGamePacketListenerImpl.java:2238) ~[?:?]
        at net.minecraft.server.players.PlayerList.sendPlayerPermissionLevel(PlayerList.java:1156) ~[purpur-1.19.4.jar:git-Purpur-1985]
        at net.minecraft.server.players.PlayerList.sendPlayerPermissionLevel(PlayerList.java:1140) ~[purpur-1.19.4.jar:git-Purpur-1985]
        at net.minecraft.server.players.PlayerList.sendPlayerPermissionLevel(PlayerList.java:985) ~[purpur-1.19.4.jar:git-Purpur-1985]
        at net.minecraft.server.players.PlayerList.placeNewPlayer(PlayerList.java:290) ~[purpur-1.19.4.jar:git-Purpur-1985]
        at net.minecraft.server.network.ServerLoginPacketListenerImpl.placeNewPlayer(ServerLoginPacketListenerImpl.java:202) ~[?:?]
        at net.minecraft.server.network.ServerLoginPacketListenerImpl.handleAcceptedLogin(ServerLoginPacketListenerImpl.java:183) ~[?:?]
        at net.minecraft.server.network.ServerLoginPacketListenerImpl.tick(ServerLoginPacketListenerImpl.java:85) ~[?:?]
        at net.minecraft.network.Connection.tick(Connection.java:604) ~[?:?]
        at net.minecraft.server.network.ServerConnectionListener.tick(ServerConnectionListener.java:234) ~[?:?]
        at net.minecraft.server.MinecraftServer.tickChildren(MinecraftServer.java:1605) ~[purpur-1.19.4.jar:git-Purpur-1985]
        at net.minecraft.server.dedicated.DedicatedServer.tickChildren(DedicatedServer.java:488) ~[purpur-1.19.4.jar:git-Purpur-1985]
        at net.minecraft.server.MinecraftServer.tickServer(MinecraftServer.java:1424) ~[purpur-1.19.4.jar:git-Purpur-1985]
        at net.minecraft.server.MinecraftServer.runServer(MinecraftServer.java:1195) ~[purpur-1.19.4.jar:git-Purpur-1985]
        at net.minecraft.server.MinecraftServer.lambda$spin$0(MinecraftServer.java:325) ~[purpur-1.19.4.jar:git-Purpur-1985]
        at java.lang.Thread.run(Thread.java:840) ~[?:?]
Caused by: java.lang.NullPointerException: type cannot be null
        at com.google.common.base.Preconditions.checkNotNull(Preconditions.java:907) ~[guava-31.1-jre.jar:?]
        at com.comphenix.protocol.injector.StructureCache.getStructure(StructureCache.java:138) ~[ProtocolLib.jar:?]
        at com.comphenix.protocol.events.PacketContainer.<init>(PacketContainer.java:126) ~[ProtocolLib.jar:?]
        at com.comphenix.protocol.injector.netty.manager.NetworkManagerInjector.onPacketSending(NetworkManagerInjector.java:96) ~[ProtocolLib.jar:?]
        at com.comphenix.protocol.injector.netty.channel.NettyChannelInjector.processOutbound(NettyChannelInjector.java:553) ~[ProtocolLib.jar:?]
        at com.comphenix.protocol.injector.netty.channel.NettyChannelInjector$2.doProxyRunnable(NettyChannelInjector.java:456) ~[ProtocolLib.jar:?]
        at com.comphenix.protocol.injector.netty.channel.NettyEventLoopProxy.proxyRunnable(NettyEventLoopProxy.java:43) ~[ProtocolLib.jar:?]
        at com.comphenix.protocol.injector.netty.channel.NettyEventLoopProxy.execute(NettyEventLoopProxy.java:252) ~[ProtocolLib.jar:?]
        at net.minecraft.network.Connection.sendPacket(Connection.java:442) ~[?:?]
        at net.minecraft.network.Connection.send(Connection.java:385) ~[?:?]
        at net.minecraft.server.network.ServerGamePacketListenerImpl.send(ServerGamePacketListenerImpl.java:2252) ~[?:?]
        ... 16 more
[22:48:04 INFO]: AyalX lost connection: Invalid player data

Version Info
5.1.1 SNAPSHOT 673
dump-2023-11-22_20.47.16.txt

Additional context
git-Purpur-1985 MC 1.19.4 (Latest currently)

commented

same problem here, but i need the latest version of that plugin

commented

same here under mohist

commented

same, but without AuthMe...
1.18.2 & latest version of ProtocolLib :/

commented

same here under mohist

Mohist Is unstable by default, are you using triton or itemsadder?

commented

Experiencing the same issue out of nowhere.

commented

This bug also happen on 1.20.1 (git-Purpur-2062 (MC: 1.20.1)*)

commented

This bug also happen on 1.20.1 (git-Purpur-2062 (MC: 1.20.1)*)

I confirm, we just ran into that too.

git-Patina-b5712d6 (MC: 1.20.1)

commented

Happening with me too.
This server is running Paper version git-Paper-196 (MC: 1.20.1) (Implementing API version 1.20.1-R0.1-SNAPSHOT) (Git: 773dd72)

commented

Same with me, any fixes?

commented

Yes, thank you for testing this. It confirms my suspection.
The problem is that some plugins sends a list of recipes to the client while the login has not been completed yet.

ProtocolLib could implement that these packets are just ignored but the developer of the third party plugin probably needs to fix this eventually.
I will try to look into this in the next couple of days

commented

This problem could be related to a 3rd party plugin sending a packet in the wrong state (most likely a PLAY packet during CONFIGURATION), maybe also related #2644.

I improved the error handling to make the log output more informative, as I cannot reproduce the problem. Please use this version of ProtocolLib on your server: https://github.com/lukalt/ProtocolLib/actions/runs/7400452537/artifacts/1145817298 and share the server log containing the error message.

I am not quite sure if all the comments in this issue refer to exactly the same issue

hi. I haven't got chance to try version you updated, but I found this issue started to happen from certain day from investigating old logs, and eventually found that it started to happen after I update protocolLib from #660 to later version. Issue persists with latest ci version ( #679 ) as well. After changing back to #660, this issue no longer exists. hope this can help you to identify issue.

I unfortunately can not experiment with new version as this issue is causing failure in inventory syncronization across bukkit instances using HuskSync, which is too critical to carry on. if it ever happens again with #660, I'll update it here.

commented

The error is still present in the latest build of the plugin.

ProtocolLib Version: ProtocolLib v5.2.0-SNAPSHOT-679
Bukkit Version: 1.20.1-R0.1-SNAPSHOT
Server Version: git-Patina-"b5712d6" (MC: 1.20.1)
Java Version: 17.0.9

dump-2023-12-23_10.51.08.txt

commented

I confirm as well. I have same issue...

commented

I think everyone here is using that plugin and I think the problem is Authme... I had seen that on their discord a person (and apparently also said to be a support operator of Apex Hosting) and asked to fix this error, however, his message was not very well received and they answered him saying that no one else had found this problem
Authme discord: https:///discord.gg/Vn9eCyE
Our error message: https://discord.com/channels/295623711485198357/295623711485198357/884379285962506272

commented

Are you using Authme?

commented

Are you using Authme?

Yes, Im using authme from github.

commented

I think everyone here is using that plugin and I think the problem is Authme... I had seen that on their discord a person (and apparently also said to be a support operator of Apex Hosting) and asked to fix this error, however, his message was not very well received and they answered him saying that no one else had found this problem Authme discord: https:///discord.gg/Vn9eCyE Our error message: https://discord.com/channels/295623711485198357/295623711485198357/884379285962506272

I don't use it but i have same problem as well. Welp tbh, sometimes it throws other errors as well so my case can be not same but...
This error "net.minecraft.ReportedException: Sending packet" says that there happens error while sending a packet and in my logs of Bungee i found error "Cannot receive string longer than 16 (got 17 characters)"

I think that for some reason plugin sends more packets then it's allowed so my Bungee is blocking it. As i have this issue only when i use server with Bungee.

commented

I use authme on lobby but error happens when i try to join my RPG server and i getting error on RPG server as well, where Authme it's not installed.

commented

I think everyone here is using that plugin and I think the problem is Authme... I had seen that on their discord a person (and apparently also said to be a support operator of Apex Hosting) and asked to fix this error, however, his message was not very well received and they answered him saying that no one else had found this problem Authme discord: https:///discord.gg/Vn9eCyE Our error message: https://discord.com/channels/295623711485198357/295623711485198357/884379285962506272

We use nlogin instead of authme, but the error is exactly the same. On the other hand, I compared our dump with other people's dumps with similar error and premiumvanish and a few other plugins are quite common there.

commented

We also use premiumvanish

commented

same issue, 1.20.1 paper.
same error for paper in op post.
no error in bungee log
not using AuthMe or premiumVanish.

there are way too many opened issues in protocolLib tho. wonder if this will ever catch dev's attention.
please ping me if anyone got to know the problem.

commented

This problem could be related to a 3rd party plugin sending a packet in the wrong state (most likely a PLAY packet during CONFIGURATION), maybe also related #2644.

I improved the error handling to make the log output more informative, as I cannot reproduce the problem. Please use this version of ProtocolLib on your server: https://github.com/lukalt/ProtocolLib/actions/runs/7400452537/artifacts/1145817298 and share the server log containing the error message.

I am not quite sure if all the comments in this issue refer to exactly the same issue

Is it referring to this log? I'm using 1.20.3 for testing

[03:47:11 ERROR]: Couldn't place player in world
net.minecraft.ReportedException: Sending packet
        at net.minecraft.server.network.ServerGamePacketListenerImpl.send(ServerGamePacketListenerImpl.java:2131) ~[?:?]
        at net.minecraft.server.network.ServerGamePacketListenerImpl.send(ServerGamePacketListenerImpl.java:2109) ~[?:?]
        at net.minecraft.server.players.PlayerList.placeNewPlayer(PlayerList.java:280) ~[purpur-1.18.2.jar:git-Purpur-1632]
        at net.minecraft.server.network.ServerLoginPacketListenerImpl.placeNewPlayer(ServerLoginPacketListenerImpl.java:215) ~[?:?]
        at net.minecraft.server.network.ServerLoginPacketListenerImpl.handleAcceptedLogin(ServerLoginPacketListenerImpl.java:196) ~[?:?]
        at net.minecraft.server.network.ServerLoginPacketListenerImpl.tick(ServerLoginPacketListenerImpl.java:84) ~[?:?]
        at net.minecraft.network.Connection.tick(Connection.java:567) ~[?:?]
        at net.minecraft.server.network.ServerConnectionListener.tick(ServerConnectionListener.java:231) ~[?:?]
        at net.minecraft.server.MinecraftServer.tickChildren(MinecraftServer.java:1651) ~[purpur-1.18.2.jar:git-Purpur-1632]
        at net.minecraft.server.dedicated.DedicatedServer.tickChildren(DedicatedServer.java:522) ~[purpur-1.18.2.jar:git-Purpur-1632]
        at net.minecraft.server.MinecraftServer.tickServer(MinecraftServer.java:1483) ~[purpur-1.18.2.jar:git-Purpur-1632]
        at net.minecraft.server.MinecraftServer.runServer(MinecraftServer.java:1247) ~[purpur-1.18.2.jar:git-Purpur-1632]
        at net.minecraft.server.MinecraftServer.lambda$spin$1(MinecraftServer.java:321) ~[purpur-1.18.2.jar:git-Purpur-1632]
        at java.lang.Thread.run(Thread.java:833) ~[?:?]
Caused by: java.lang.IllegalStateException: Unable to retrieve packet type for net.minecraft.network.protocol.game.PacketPlayOutRecipeUpdate
 in protocol state LOGIN
        at com.comphenix.protocol.injector.netty.manager.NetworkManagerInjector.onPacketSending(NetworkManagerInjector.java:98) ~[ProtocolLi
b.jar:?]
        at com.comphenix.protocol.injector.netty.channel.NettyChannelInjector.processOutbound(NettyChannelInjector.java:553) ~[ProtocolLib.j
ar:?]
        at com.comphenix.protocol.injector.netty.channel.NettyChannelInjector$2.doProxyRunnable(NettyChannelInjector.java:456) ~[ProtocolLib
.jar:?]
        at com.comphenix.protocol.injector.netty.channel.NettyEventLoopProxy.proxyRunnable(NettyEventLoopProxy.java:43) ~[ProtocolLib.jar:?]
        at com.comphenix.protocol.injector.netty.channel.NettyEventLoopProxy.execute(NettyEventLoopProxy.java:252) ~[ProtocolLib.jar:?]
        at net.minecraft.network.Connection.writePacket(Connection.java:435) ~[?:?]
        at net.minecraft.network.Connection.send(Connection.java:382) ~[?:?]
        at net.minecraft.server.network.ServerGamePacketListenerImpl.send(ServerGamePacketListenerImpl.java:2123) ~[?:?]
        ... 13 more
[03:47:11 INFO]: admiadc lost connection: Invalid player data
> pl
[03:51:52 INFO]: Plugins (27): Bank, CMI, CMILib, Core, DecentHolograms, EternalTags, FluidLimit*, Ip2region, ItemsAdder, LibertyBans, LiteS
ignIn, LoneLibs, LuckPerms, PixelVip, PlaceholderAPI, PlugManX (PlugMan), ProtocolLib, rustyconnector-paper, SkinsRestorer, SuperLobby, TAB-
Bridge, TrChat, Vault, VelocityReport, ViaVersion, Vulcan, XConomy
commented

This problem could be related to a 3rd party plugin sending a packet in the wrong state (most likely a PLAY packet during CONFIGURATION), maybe also related #2644.

I improved the error handling to make the log output more informative, as I cannot reproduce the problem.
Please use this version of ProtocolLib on your server: https://github.com/lukalt/ProtocolLib/actions/runs/7400452537/artifacts/1145817298 and share the server log containing the error message.

I am not quite sure if all the comments in this issue refer to exactly the same issue

commented

Yes, thank you for testing this. It confirms my suspection. The problem is that some plugins sends a list of recipes to the client while the login has not been completed yet.

ProtocolLib could implement that these packets are just ignored but the developer of the third party plugin probably needs to fix this eventually. I will try to look into this in the next couple of days

It's not just 1 plugin which causes this problem, for server owners it's gonna be a pain to update all of them. Yes, update is easy, just drag and drop new file but not all plugins have backwards combability with old configs and a lot of work needs to be done.

Even if it's 3rd party plugin which causes problem, would be excellent if Protocollib just delay sending those unsafe packets and let player to complete login then send it....

Problem does not occur when i use 4.6 version, only with newer one.

commented

Would be cool to get a fix on this, servers on 1.20.4 are suffering