Velocity icon indicating copy to clipboard operation
Velocity copied to clipboard

Failed to validate message acknowledgements

Open 7wOv6ySCjo opened this issue 2 years ago • 14 comments

Hello everybody. I built a minecraft:tellraw command on the page: www.minecraftjson.com

I run this command in the console of my backend server Paper: minecraft:tellraw Sistan ["",{"text":"JUEGOS:","bold":true,"color":"#F97603"}," ","Sistan"," acaba de completar el parkour ",{"text":"[Angeles]","color":"dark_purple","clickEvent":{"action":"run_command","value":"/angeles"},"hoverEvent":{"action":"show_text","contents":[{"text":"Hacé click para ir","color":"green"}]}}]

The tellraw message arrives at the client Minecraft 1.19.4 and I simply click on one of the hoverEvent in the message. Velocity kicks me with: Failed to validate message acknowledgements from Sistan

Logs: Velocity:

[04:25:57.642] [Velocity Async Event Executor - #14/INFO] [com.velocitypowered.proxy.protocol.packet.chat.CommandHandler]: [connected player] Sistan (/###.###.##.###:63108) -> executed command /angeles
[04:25:57.668] [Netty epoll Worker #13/INFO] [com.velocitypowered.proxy.connection.client.ConnectedPlayer]: [connected player] Sistan (/###.###.##.###:63108): kicked from server survival_oscuro: 
[04:25:57.668] [Netty epoll Worker #13/INFO] [com.velocitypowered.proxy.connection.MinecraftConnection]: [server connection] Sistan -> survival_oscuro has disconnected

Backend:

[04:25:57.643] [Netty Epoll Server IO #3/WARN]: Failed to validate message acknowledgements from Sistan
[04:25:57.661] [Server thread/INFO]: Sistan lost connection: Chat message validation failure

What solution could I use to prevent this from happening? It is happening massively.

7wOv6ySCjo avatar Oct 28 '23 09:10 7wOv6ySCjo

does just running the command "/angeles" manually cause the same issue? does it occur with any other commands in the tellraw?

456dev avatar Nov 20 '23 15:11 456dev

does just running the command "/angeles" manually cause the same issue? does it occur with any other commands in the tellraw?

happens with any clickable command in the message.

7wOv6ySCjo avatar Feb 02 '24 20:02 7wOv6ySCjo

does just running the command "/angeles" manually cause the same issue? does it occur with any other commands in the tellraw?

I encounter the same problem! From time to time a same clickable message sent with tellraw command can be executed or disconnect the player with the following message in the console : [02:00:42 WARN]: Failed to validate message acknowledgements from Jeremylo1

Jeremylo1 avatar Feb 14 '24 01:02 Jeremylo1

I encounter a similar problem when proxying PaperMC via Bungeecord (only affects some specific servers, apparently. But I also haven't extensively tested it on multiple server instances so it could be global). Every now and then (around once per hour or once per 30 minutes) when I (or other players) send a message in chat this happens to the player who tried to send a message (counting command as a message):

[22:18:08] [Netty Epoll Server IO #1/WARN]: Failed to update secure chat state for Player: 'Received chat packet with missing or invalid signature.'
[22:18:08] [Server thread/INFO]: Player lost connection: Received chat packet with missing or invalid signature.
[22:41:10] [Netty Epoll Server IO #3/WARN]: Failed to validate message acknowledgements from Player
[22:41:10] [Server thread/INFO]: Player lost connection: Chat message validation failure

Gotten it on git-Paper-422 & git-Paper-424 (both MC 1.20.4) so far. However, I did not encounter the same problem from the tellraw that you sent, but the issue I'm experiencing is pretty similar. (enforce-secure-profile is set to false as well)

JonnygamingTv avatar Feb 15 '24 22:02 JonnygamingTv

This is velocity thou and your using bungeecord

gamer50082 avatar Feb 16 '24 04:02 gamer50082

Same issue, can't click any "links for commands" in chat.

ArikSquad avatar Feb 23 '24 15:02 ArikSquad

We still do not have an approaching solution to this problem? the problem persists.

7wOv6ySCjo avatar Feb 28 '24 06:02 7wOv6ySCjo

I'm also having this issue for a month now. It doesn't happen when when we type the commands by ourselfs. But clicking on command links does kick players sometimes. I use Velocity 3.3.0-SNAPSHOT & Paper version git-Paper-450 (MC: 1.20.4) (Implementing API version 1.20.4-R0.1-SNAPSHOT) (Git: 62b220a). We use the /tpa commands of HuskHomes. If you need more technical info, I'm happy to help! I hope I can write some "Steps To Reproduce" for you.

Here the typical messages in console of kicked players clicking on tpa accept text in chat.

[14:30:17 INFO]: Player_1 issued server command: /tpa Player_2
[14:30:20 WARN]: Failed to validate message acknowledgements from Player_2
[14:30:20 INFO]: Player_2 lost connection: Chat message validation failure
[14:30:20 INFO]: Player_2 left the game

I'm running HuskHomes 4.5.5. So I will try to update this plugin to the latest release and see if this bug still occurs. One thing I noticed is that it isn't reported in the velocity console that a player has been kicked. So maybe it's a bug of the specific plugin.

[Update]: Updating the plugin to the latest version didn't solve the issue unfortunately.

Mitchel387 avatar Mar 16 '24 15:03 Mitchel387

This is the case for all clickable messages in the chat, regardless of the plugin used. In fact, even if the server doesn't contain any plugins, this issue still occurs. However, the problem only arises after the player has been connected for a certain amount of time. If the player disconnects and reconnects, they can click on the message without any issues. But if they have been connected for at least an hour, it will disconnect them.

Jeremylo1 avatar Mar 23 '24 14:03 Jeremylo1

This is the case for all clickable messages in the chat, regardless of the plugin used. In fact, even if the server doesn't contain any plugins, this issue still occurs. However, the problem only arises after the player has been connected for a certain amount of time. If the player disconnects and reconnects, they can click on the message without any issues. But if they have been connected for at least an hour, it will disconnect them.

Same thing happens here with my custom plugin, exactly what you said "the problem only arises after the player has been connected for a certain amount of time".

NinjagoKristian avatar May 25 '24 23:05 NinjagoKristian

I have this same issue currently. I actually debugged this issue myself for 3 full days now. I went from removing specific plugins, to removing all of them. Downgrading from Purpur to paper, Downgrading velocity, completely resetting configs on bother servers, changing configs on both servers, and it resolved nothing.

I did however locate the main issue. I would type in chat twice then when I would use any type of command (aka I used gamemode spectator), it would kick for invalid chat. I worked on this for 3 full days, with no resolution luck. PaperServer VelocityServer

TechCallCP avatar May 28 '24 15:05 TechCallCP

I have this same issue currently. I actually debugged this issue myself for 3 full days now. I went from removing specific plugins, to removing all of them. Downgrading from Purpur to paper, Downgrading velocity, completely resetting configs on bother servers, changing configs on both servers, and it resolved nothing.

I did however locate the main issue. I would type in chat twice then when I would use any type of command (aka I used gamemode spectator), it would kick for invalid chat. I worked on this for 3 full days, with no resolution luck. PaperServer VelocityServer

The first photo is the paper side, the second one is velocity.

TechCallCP avatar May 28 '24 15:05 TechCallCP

I think that there is still a slight potential for a race condition in the chat logic handling, there is a bunch of this stuff that I just want to nuke and start from scratch on, however, that will sadly be a little while away

electronicboy avatar May 28 '24 15:05 electronicboy

I think that there is still a slight potential for a race condition in the chat logic handling, there is a bunch of this stuff that I just want to nuke and start from scratch on, however, that will sadly be a little while away

This bug started to happen exactly since the chat validations were added from version 1.19.4 onwards. It would be good to review the changes made since then and see where the bug arises or what is the new change that ‘helps’ to enhance this race condition.

For now: an alternative to solve this problem is the use of two plugins: SignedVelocity and FreedomChat. These two plugins, and I don't know why, together will solve this strange error.

7wOv6ySCjo avatar May 28 '24 18:05 7wOv6ySCjo