mineflayer icon indicating copy to clipboard operation
mineflayer copied to clipboard

Disable physics during configuration packet

Open bmstefanski opened this issue 4 months ago • 8 comments

I've found that connecting to a server with minecraft version 1.20.4 didn't work - throwing quite ambiguous error An internal error occurred in your connection, but after trying different things for a while I figured it works well on 1.20 and only some servers throw that error. I compared the packet trace between those two versions and one difference I found was that in 1.20.4, servers send start_configuration packets during gameplay to reconfigure clients, but mineflayer's physics plugin was missing handlers for this. The bot continued sending position packets while in configuration state, which is invalid and causes the server to kick the client

bmstefanski avatar Aug 21 '25 00:08 bmstefanski

Tests fail

I think we should rather disable a lot more than specifically physics during configuration phases

And it would be best to add a test for this (probably an internal test), so it will keep working

rom1504 avatar Aug 21 '25 10:08 rom1504

Tests fail

I think we should rather disable a lot more than specifically physics during configuration phases

And it would be best to add a test for this (probably an internal test), so it will keep working

Those seem like flaky tests to me.

They don't have anything to do with this pr

Omena0 avatar Aug 22 '25 05:08 Omena0

Could this be merged?

tcortega avatar Sep 16 '25 19:09 tcortega

No please see my previous message on what still needs to be done here

rom1504 avatar Sep 16 '25 19:09 rom1504

No please see my previous message on what still needs to be done here

The tests that failed did not seem related at all to the PR, as Omena0 said above.

tcortega avatar Sep 16 '25 19:09 tcortega

No please see my previous message on what still needs to be done here

Could you please try re-running the tests that failed?

tcortega avatar Sep 20 '25 14:09 tcortega

I think we should rather disable a lot more than specifically physics during configuration phases

And it would be best to add a test for this (probably an internal test), so it will keep working

This is the main point

rom1504 avatar Sep 20 '25 14:09 rom1504

I think we should rather disable a lot more than specifically physics during configuration phases

And it would be best to add a test for this (probably an internal test), so it will keep working

This is the main point

Yeah, I get that's the main point, but this PR shouldn't be blocked for it. This solves a real issue that's affecting me and other users right now.

If more things should be disabled, we can make a separate, more detailed issue for that. We shouldn't hold up this fix expecting the author to do it all here.

tcortega avatar Sep 20 '25 14:09 tcortega