Sandertv / gophertunnel

General purpose library for Minecraft Bedrock Edition software written in Go
MIT License
423 stars 95 forks source link

Invalid packet checksum #2

Closed gioiann closed 5 years ago

gioiann commented 5 years ago

I've been getting this error really often, expecially on mineplex. When this happens a temporary "fix" is restarting the proxy but eventually it will happen again.

error reading from client connection: error reading batch: invalid packet checksum: d6f4aaa48ed69500 should be 228fc984d0749b49

This error message can be either from listener.go or dial.go since it's the same for both. I found out it's from there

So either the server is not encrypting properly (and i don't think so since it works without proxy) or the proxy is doing something wrong.

Sandertv commented 5 years ago

This might be fixed on the latest commit thanks to the RakNet changes. Please try it and let me know.

gioiann commented 5 years ago

The problem is still there, it just happened again. Also, I don't think the last changes to RakNet affect encryption at all. Packets order affects encryption and that has nothing to do with the latest RakNet changes.

Sandertv commented 5 years ago

I figured if something was wrong with resending, it could affect this. I also am unable to reproduce it. Do you have a high latency to the server?

gioiann commented 5 years ago

There is no way to reproduce it, just randomly happens. I made more tests and only happened once on lbsg when I had a delay of about 450ms (450/3 = 150ms ACK average RTT) But during the tests the delay ranged from 200 to even 500ms at some point and everything was just fine.

By delay i mean the recoveryQueue.AvgDelay * 3

Sandertv commented 5 years ago

How frequently does this happen at this time?

gioiann commented 5 years ago

It isn't happening anymore. I guess it's fixed but I'm not sure as there wasn't a way to reproduce it. I think you can close this issue for now

Sandertv commented 5 years ago

Alright, thank you. Please do let me know if it happens again!