From a2064e2901afc08cc95eeaa3fc8cd3aac92807be Mon Sep 17 00:00:00 2001 From: simoleo89 Date: Tue, 9 Jun 2026 20:53:48 +0200 Subject: [PATCH] fix(handshake): send UniqueID (machine fingerprint) before the SSO ticket Arcturus' Habbo.connect() runs when the SSOTicket packet is handled and needs the machineId, which is set by the UniqueID packet. Sending the SSO ticket first made such servers reject the login (WS closed with "Bye") because the fingerprint hadn't arrived yet. Send UniqueID before the SSO ticket so the machineId is available when the server processes the login. --- packages/communication/src/CommunicationManager.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/packages/communication/src/CommunicationManager.ts b/packages/communication/src/CommunicationManager.ts index c783183..e51e320 100644 --- a/packages/communication/src/CommunicationManager.ts +++ b/packages/communication/src/CommunicationManager.ts @@ -45,8 +45,10 @@ export class CommunicationManager implements ICommunicationManager const machineId = await this._machineIdPromise; this._connection.send(new ClientHelloMessageComposer(null, null, null, null)); - this._connection.send(new SSOTicketMessageComposer(GetConfiguration().getValue('sso.ticket', null), GetTickerTime())); + // Send the machine fingerprint (UniqueID) BEFORE the SSO ticket so the server + // has the machineId available when it processes the login in Habbo.connect(). this._connection.send(new UniqueIDMessageComposer(machineId, '', '')); + this._connection.send(new SSOTicketMessageComposer(GetConfiguration().getValue('sso.ticket', null), GetTickerTime())); } constructor()