Skip to content
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

Couldn't place player in world- Invalid player data #2644

Closed
AyalX opened this issue Nov 22, 2023 · 25 comments · Fixed by #2961
Closed

Couldn't place player in world- Invalid player data #2644

AyalX opened this issue Nov 22, 2023 · 25 comments · Fixed by #2961

Comments

@AyalX
Copy link

AyalX commented Nov 22, 2023

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)

@MeowIce
Copy link

MeowIce commented Dec 10, 2023

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

@d1wb
Copy link

d1wb commented Dec 10, 2023

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)

@Niccckkkk
Copy link

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)

@SuprClan
Copy link

Same with me, any fixes?

@CircusCow
Copy link

Experiencing the same issue out of nowhere.

@d1wb
Copy link

d1wb commented Dec 23, 2023

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

@XXX10Tacles
Copy link

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

@Alien0-7
Copy link

Are you using Authme?

@MeowIce
Copy link

MeowIce commented Dec 27, 2023

Are you using Authme?

Yes, Im using authme from github.

@Alien0-7
Copy link

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

@XXX10Tacles
Copy link

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.

@XXX10Tacles
Copy link

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.

@d1wb
Copy link

d1wb commented Jan 2, 2024

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.

@AyalX
Copy link
Author

AyalX commented Jan 2, 2024

We also use premiumvanish

@aaa8881
Copy link

aaa8881 commented Jan 3, 2024

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.

@lukalt
Copy link
Contributor

lukalt commented Jan 3, 2024

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

@chencu5958
Copy link

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

@lukalt
Copy link
Contributor

lukalt commented Jan 4, 2024

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

@aaa8881
Copy link

aaa8881 commented Jan 4, 2024

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.

@XXX10Tacles
Copy link

XXX10Tacles commented Jan 22, 2024

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.

@WarnDa
Copy link

WarnDa commented Feb 6, 2024

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

@L0RRIX-1
Copy link

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

@Mathildeuh
Copy link

same here under mohist

@davidjimeneztv
Copy link

davidjimeneztv commented May 8, 2024

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

@L0RRIX-1
Copy link

same here under mohist

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet