azalea-rs / azalea

A collection of Rust crates for making Minecraft bots, clients, and tools.

Home Page:https://azalea.matdoes.dev

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Random `UnknownPacketId` errors after `ServerboundKeyPacket` is sent

Sculas opened this issue · comments

After this is called:
https://github.com/mat-1/azalea/blob/cb001fa341636d1fa6cc186bfd372f092088270c/azalea-client/src/client.rs#L176-L185

azalea panics with errors such as:
Error: UnknownPacketId { state_name: "LoginPacket", id: 9455 }
Error: UnknownPacketId { state_name: "LoginPacket", id: 19 }
Error: UnknownPacketId { state_name: "LoginPacket", id: 94 }

Go to https://www.microsoft.com/link and enter the code AAAAAAAA
2022-10-16T21:55:26.956408Z DEBUG azalea_client::client: Got encryption request
... 10-15 seconds of no activity
thread 'tokio-runtime-worker' panicked at 'Error: UnknownPacketId { state_name: "LoginPacket", id: 94 }', azalea-client/src/client.rs:204:21

The id is always different.
While collecting errors, I also got Error: ConnectionClosed sometimes.

My bad, I should've tested before. I cannot reproduce this on master with offline authentication.
This only happens when using PR #29 and Microsoft authentication, which as of writing is a draft PR.

I'll close this issue since it's invalid.