How to deal with server_late_input_mismatch in 0.27?
#1530
-
|
Hello, Here are the relevant logs I get: When the match starts, I add Can someone point out what this error even means? Why do I get Best regards |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 3 replies
-
|
The error means the server hit tick 725 before it ever got an input buffer for that wizard. The first packet says end_tick 723, but 723 and 724 already ran in FixedUpdate with nothing buffered, so 0.27 logs server_late_input_mismatch. That tick can't be replayed. Your input is all Released anyway so one log at spawn is usually harmless if movement works after. The "Adding InputBuffer and ActionState which are missing" line isn't saying you didn't add ActionState. Lightyear checks for InputBuffer on receive. You only insert ActionState on spawn, so the first packet still hits the insert path and lightyear adds both itself. Examples like simple_box don't pre-insert either. Once per wizard at lobby to level is a spawn race. Client has a Predicted wizard and starts sending inputs right away, server entity exists but the first packet lands a tick or two late. To deal with it — if it's one log per character and then fine, ignore it. Otherwise on server spawn insert InputBuffer alongside ActionState: commands.entity(wizard).insert((
ActionState::<NetworkedInput>::default(),
InputBuffer::<LeafwingSnapshot, NetworkedInput>::default(),
));Also make sure inputs target the replicated server entity not a client-only copy, and don't start sending until the wizard is confirmed spawned. If it keeps happening every tick after that, chase timeline sync around the transition. |
Beta Was this translation helpful? Give feedback.
To add to that, I think what is happening is: (tick value here are for example)
Lightyear is warning you that a mismatch is possible here; if the client had pressed a button at tick 100 or 101, the server …