Skip to content

Instantly share code, notes, and snippets.

@ashfire908
Last active October 9, 2015 22:05
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ashfire908/a021065ac02ad0d26a25 to your computer and use it in GitHub Desktop.
Save ashfire908/a021065ac02ad0d26a25 to your computer and use it in GitHub Desktop.
Guide to fixing chat lag in Hawken

An ongoing problem in Hawken for some time now has been a progressive chat lag, caused by accumulation of party invites and messages. This is a guide for manually detecting and fixing chat lag on a Hawken account.

Background

For those unaware, a bit of background. Hawken's chat and party system uses XMPP. It's had a lot of stability issues (see crashes, outages, and wiping of friends lists), but one that has gone unrepaired for a long time is a progressive chat lag issues. Upon connect, the Hawken client will attempt to retrieve all stored messages on the server (via XEP-0136) and... do nothing with them. But it downloads them anyway. This would not be a problem, except for that the server for some odd reason is recording party invites and messages (specifically, invites to parties and any messages sent in the party if the invite is accepted). This, coupled with that when the client downloads the messages it blocks all other XMPP traffic, causes varying degrees of issues upon login, from message delivery lag for the first X seconds of connecting, up to causing disconnects (which result in a reconnect loop). I have reported this issue to Meteor Entertainment in June 2014 (and have been aware since fall 2013), but it has not yet been fixed. However, there is a workaround, and that is what this guide will solve.

Tools

First, you will need a IM client with a XMPP console. I recommend Pidgin.

Get chat login info

Before you can login to the chat system, you will need your account's XMPP credentials. They are not your email and password, but those will be needed to get them.

I have created a tool to retrieve them for you. Visit https://hawkentools.herokuapp.com/chat/login and enter in your email and password, and it will return your XMPP login info. Do this, then move onto the next section.

Setup chat client

If you have not already, install Pidgin and start it up. You will be greeted by the following screen:

[image]

Click "Add". Select the XMPP protocol and enter in the information from the chat login tool you used in the last section. For "Resource", you can set it to anything (except for "HawkenGame") - I used "Pidgin". The settings screen should look like this:

[image]

Click "Add". Pidgin will connect to the Hawken chat server. You may get a certificate warning - if so, click "Accept". If you get a disconnect, click "Reconnect". From here, we need to open the XMPP Console in Pidgin so we can run the commands to check for and fix the chat lag issue. First we will need to enable it. Open the plugins screen from the menu: Tools -> Plugins. Find "XMPP Console" in the list and check it.

[image]

Now close the plugins list and open the XMPP console from the menu: Tools -> XMPP Console -> XMPP Console. You should be greeted by the following screen:

[image]

Check for chat lag issue

Now that we have everything setup, we can check the account for the issue. Copy the following command into the text box on the console and press enter:

<iq id='initialMailRequest' type='get' xmlns='jabber:client'><list end='2025-10-24T16:38:56.000000Z' xmlns='http://www.xmpp.org/extensions/xep-0136.html#ns'/></iq>

You should receive a response along the following lines:

<iq from='ef189781-89b2-480d-8add-e59097c93df7@xmpp.live.hawken.meteor-ent.com' to='ef189781-89b2-480d-8add-e59097c93df7@xmpp.live.hawken.meteor-ent.com/Pidgin' id='initialMailRequest' type='result'>
  <list xmlns='http://www.xmpp.org/extensions/xep-0136.html#ns'>
    <chat with='0483cbee-2cfd-41e3-b8a8-454d16aa64da@party.xmpp.live.hawken.meteor-ent.com' start='2014-01-29T16:19:12.000000Z'/>
    <chat with='f2d572a3-35ef-448f-986e-bf48f95feb8d@party.xmpp.live.hawken.meteor-ent.com' start='2014-01-29T16:20:06.000000Z'/>
    <chat with='13c7adfb-44c9-4113-936f-d968de43fa78@party.xmpp.live.hawken.meteor-ent.com' start='2014-01-29T16:21:03.000000Z'/>
    <chat with='c66cf46b-41d6-415e-b9b7-e843147a7a8e@party.xmpp.live.hawken.meteor-ent.com' start='2014-01-29T16:22:15.000000Z'/>
    <chat with='2caa84f4-9bd6-436d-bb9c-f12d93cbb169@party.xmpp.live.hawken.meteor-ent.com' start='2014-01-29T16:29:24.000000Z'/>
    <chat with='d671a187-f733-47fa-9383-786c8b863a87@party.xmpp.live.hawken.meteor-ent.com' start='2014-01-29T16:43:58.000000Z'/>
    <chat with='6d5f83df-9ab7-4b83-a827-50390e916e4f@party.xmpp.live.hawken.meteor-ent.com' start='2014-01-29T16:47:07.000000Z'/>
    <chat with='3e8bb9fd-8eee-424f-ac93-2e2100a93614@party.xmpp.live.hawken.meteor-ent.com' start='2014-01-29T16:52:17.000000Z'/>
    <chat with='ab4c6980-00d6-4f78-ab94-ca487b8b24b9@party.xmpp.live.hawken.meteor-ent.com' start='2014-01-29T16:53:11.000000Z'/>
    <chat with='55fbe4f8-823c-4084-995b-d2ea37d6ed91@party.xmpp.live.hawken.meteor-ent.com' start='2014-01-29T16:56:49.000000Z'/>
    <chat with='7c2dec6d-0b58-485c-8303-dfabea816063@party.xmpp.live.hawken.meteor-ent.com' start='2014-01-30T00:34:53.000000Z'/>
    <chat with='b279d1e7-f581-45e3-ae7e-9ebb23262fd1@party.xmpp.live.hawken.meteor-ent.com' start='2014-01-30T00:41:32.000000Z'/>
    <chat with='cb15a2b4-8684-447f-b463-b3baebf99105@party.xmpp.live.hawken.meteor-ent.com' start='2014-01-30T00:47:20.000000Z'/>
    <chat with='09405e7c-6331-42ec-8d93-f68fa5f7ba19@party.xmpp.live.hawken.meteor-ent.com' start='2014-01-30T00:51:07.000000Z'/>
    <chat with='120aa19f-84c9-4f5c-a953-c7d02a267db0@party.xmpp.live.hawken.meteor-ent.com' start='2014-01-30T00:54:54.000000Z'/>
    <chat with='aa477c7f-9249-4cfc-a904-6696a6654617@party.xmpp.live.hawken.meteor-ent.com' start='2014-01-30T00:56:49.000000Z'/>
    <chat with='aa477c7f-9249-4cfc-a904-6696a6654617@party.xmpp.live.hawken.meteor-ent.com' start='2014-01-30T00:57:02.000000Z'/>
    <chat with='5ee13429-4a93-4405-9d85-3b550ce2547a@party.xmpp.live.hawken.meteor-ent.com' start='2014-01-30T02:05:03.000000Z'/>
    <chat with='aa5d2cd6-d4d6-4e2e-b1aa-1cb9ad31ac2e@party.xmpp.live.hawken.meteor-ent.com' start='2014-01-30T02:06:42.000000Z'/>
    <chat with='0da0194b-39c5-4c83-978d-3e6e9f468bdd@party.xmpp.live.hawken.meteor-ent.com' start='2014-01-30T02:14:07.000000Z'/>
    <chat with='ac55ddb5-8b8e-4ac1-8dc3-cd83c4a9cf55@party.xmpp.live.hawken.meteor-ent.com' start='2014-01-30T18:36:27.000000Z'/>
    <chat with='9cf346b4-bb5a-47dc-8877-f480d626e232@party.xmpp.live.hawken.meteor-ent.com' start='2014-01-30T18:39:27.000000Z'/>
    <chat with='0e7e3fab-504b-4736-9f97-1f03b9a13b46@party.xmpp.live.hawken.meteor-ent.com' start='2014-01-30T18:41:44.000000Z'/>
    <chat with='474413b2-6eff-4b8c-b68a-c8ac7d3f05bc@party.xmpp.live.hawken.meteor-ent.com' start='2014-01-30T18:44:54.000000Z'/>
    <chat with='28b70f95-de60-4d6b-afe2-d89bc728bd81@party.xmpp.live.hawken.meteor-ent.com' start='2014-01-30T18:47:03.000000Z'/>
    <chat with='5eaf8412-983b-45da-b322-edc5e0acec56@party.xmpp.live.hawken.meteor-ent.com' start='2014-01-30T18:49:05.000000Z'/>
    <chat with='30ec5dea-f49b-4432-8c11-d2353112ee3e@party.xmpp.live.hawken.meteor-ent.com' start='2014-01-30T18:50:18.000000Z'/>
    <chat with='c12ffb50-b53e-4429-8644-4f2aa780729b@party.xmpp.live.hawken.meteor-ent.com' start='2014-01-30T18:53:01.000000Z'/>
    <chat with='b9c41c0c-e327-4704-b115-ea4d9a724657@party.xmpp.live.hawken.meteor-ent.com' start='2014-01-30T18:54:15.000000Z'/>
    <chat with='d22f4c98-f7c7-46ee-8c0f-94a235899f17@party.xmpp.live.hawken.meteor-ent.com' start='2014-01-30T18:57:53.000000Z'/>
    <chat with='5364d85f-3074-400a-bc73-0a2ea731a946@party.xmpp.live.hawken.meteor-ent.com' start='2014-01-30T19:00:06.000000Z'/>
    <chat with='ee12fd29-5579-4a67-bd41-880f60f3928d@party.xmpp.live.hawken.meteor-ent.com' start='2014-01-30T20:28:36.000000Z'/>
    <chat with='1b272a92-5c97-4e45-ae45-6144974dcd43@party.xmpp.live.hawken.meteor-ent.com' start='2014-01-30T20:31:11.000000Z'/>
    <chat with='14264d9f-115b-4f6f-8090-233daf6a9b36@party.xmpp.live.hawken.meteor-ent.com' start='2014-01-30T23:30:55.000000Z'/>
    <chat with='8703f16b-0483-49fc-b2c7-3a1e602b5493@party.xmpp.live.hawken.meteor-ent.com' start='2014-01-30T23:31:09.000000Z'/>
    <chat with='5d84c9c9-afc7-4144-a54c-dea6cdb48969@party.xmpp.live.hawken.meteor-ent.com' start='2014-01-30T23:33:49.000000Z'/>
    <chat with='93e05d23-a865-4c72-b30f-fa66b02f7748@party.xmpp.live.hawken.meteor-ent.com' start='2014-01-31T00:00:36.000000Z'/>
    <chat with='67497ccd-ae19-4158-a597-ad6f7d0fe532@party.xmpp.live.hawken.meteor-ent.com' start='2014-01-31T03:43:39.000000Z'/>
    <chat with='8e9711e9-fa93-4ba0-8983-e800fe2c4e22@party.xmpp.live.hawken.meteor-ent.com' start='2014-01-31T04:27:50.000000Z'/>
    <set xmlns='http://jabber.org/protocol/rsm'>
      <first index='0'>63558231552@417755</first>
      <last>63558361670@422494</last>
      <changed>2014-01-31T04:28:18.000000Z</changed>
      <count>39</count>
    </set>
  </list>
</iq>

What we want to look for here is the <count> value. Here, it's 39, meaning there is 39 different conversations logged (with 1 or more messages in each). Basically, anything above 0 is a symptom of the issue, but it only becomes a problem at "large" values - what "large" means varies on your computer and connection to if it will cause an issue on login. I typically consider anything above 100 to require a fix (though I have seen issues down at 49).

Clear recorded messages

Now that we have confirmed there to be an issue, we can proceed to wipe the recorded messages. Copy the following command into the text box on the console and press enter:

<iq id='mailRemove' type='set' xmlns='jabber:client'><remove xmlns='http://www.xmpp.org/extensions/xep-0136.html#ns'/></iq>

You should receive a response along the following lines:

<iq from='ef189781-89b2-480d-8add-e59097c93df7@xmpp.live.hawken.meteor-ent.com' to='ef189781-89b2-480d-8add-e59097c93df7@xmpp.live.hawken.meteor-ent.com/Pidgin' id='mailRemove' type='result'/>

This confirms the fix. I recommend now disconnecting from chat in Pidgin to avoid issues with the client (while Pidgin is connected it will receive messages instead of the game client, including game invites). You can do so by simply selecting quit from the menu: Buddies -> Quit.

Congrats! You should now no longer suffer from chat lag in Hawken! You may need to repeat this progress periodically if you encounter issues again.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment