Bug - Not A Bug Password Hash Mismatch

jhusdhui

New member
Hi,

I have been having this problem for a few weeks and I don't believe it is isolated to me, or at least chatting with some folks on a talkie channel another fellow said he was having a similar issue. But while I am logged in, I am getting a password hash mismatch error and I have to exit chat and sign back in. Here is what the CLI reports (Note I have obfuscated my password for obvious reasons and the chat command is different depending on what I may have said)

Password hash mismatch
Path: "/submitnewchat.php?playerid=234419&pwd=[REDACTED]&graf=%2Fclan+%2Fbuy+bowl+of+scorp&j=1"

I am on build 17.4r17216

I have tried clearing temps and browser cookies to no avail.
 

lostcalpolydude

Developer
Staff member
If you scroll up a bit in the CLI, you'll probably see a message about logging back in, like:
Loading character status...
Installing default certificate validation...
Sending login request...
Synchronizing moon data...
Requests complete.
Since you got logged out, your password hash changed and you need to reload chat (like you did) to submit anything. That would be the real issue (or non-issue, possibly).
 

jhusdhui

New member
If you scroll up a bit in the CLI, you'll probably see a message about logging back in, like:

Since you got logged out, your password hash changed and you need to reload chat (like you did) to submit anything. That would be the real issue (or non-issue, possibly).

I see this in the CLI

Installing default certificate validation...
Sending login request...
Requests complete.

But I do not see the first two lines.


Edit:
I have attached the debug logs that I found. Looking at the time stamp and the stack trace, I am not sure it corresponds with the errors that I was seeing, but I would assume more info is better than less. Please let me know if there are any additional steps to troubleshoot\capture this error. I haven't found a pattern to the problem as of yet, so I have no other steps to reproduce.
 

Attachments

  • DEBUG_20160924.txt
    2.6 KB · Views: 19
  • DEBUG_20160923.txt
    5.3 KB · Views: 22
  • DEBUG_20160919.txt
    2.1 KB · Views: 17
Last edited:

pithlit

New member
Any resolution to this forthcoming? It's not just about issuing chat commands. This happens to me after a timeout no matter what I try. I have to log off and then log back in again. Which isn't that painful other than loosing your Results pane contents. More of an annoyance, but still...

Build 17904
 

Theraze

Active member
After you time out, you'll need to load a new relay and/or new chat window. I tend to do so through the gCLI by running text main.php a few times until it's fully sorted. But the bottom line is that this is not really a bug, it's just letting you know a fact. You have a window with a different password hash. That is a fact.
 

Veracity

Developer
Staff member
Whenever KoL times out, we time you back in and everything in your GUI should continue to work perfectly. That's the way it works for me. Every time. I don't need to "log out and log in again" after a timeout because KoLmafia has already logged me back in. If it doesn't work that way for you, I am puzzled, since you are, near as I can tell, the only one for whom it does not work.

The sole exception is in the browser where the old password hash might be saved. The only place I know that that happens is chat. Therefore, you have to close your chat window in the browser and open it again. Since the browser is executing Javascript with the old password hash, there is nothing we can do to make the browser refresh that.

I don't know for sure about KoLmafia's GUI chat. I would hope that would refresh automatically with the new password hash after a timein, like every other GUI element, but I haven't tried it.
 

pithlit

New member
Following Theraze's advice worked. It's just a bit disconcerting to watch this constantly scroll in the gCLI:

Password hash mismatch
Path: "/KoLmafia/messageUpdate?pwd=[REDACTED]"
 

Bale

Minion
I don't think that's a good idea. When I see that it is helpful to me because it means I need to start a new browser session in order to reply in chat. If I don't restart the session I see my messages disappearing without any information about why.

Edit: Wait. Was that a joke?
 

Veracity

Developer
Staff member
You don't actually need to start a new browser session. You just need to exit from chat in the browser and open chat again.

I wasn't actually serious. If we suppress the message, we'll start getting bugs reports about how KoLmafia is breaking chat because, as you say, your messages will disappear without notice. As you pointed out. :)
 
This bookmarklet works quite well for me (to not have to reload chat).

Code:
javascript:(function(){var%20x=new%20XMLHttpRequest();x.open('GET','hash.php',true);x.onreadystatechange=function(){if(x.readyState==4){top.chatpane.pwdhash=x.responseText;}};x.send(null);})();

I am not the author of this bookmarklet.
 
Last edited:
I'm kinda used to the relay chat failing, but it confused me for quite a while that my Chateau Mantegna link also wouldn't work properly whenever this happened. (All the other top menu buttons seem to work fine, it's just that one, and no, it doesn't include the password, it simply calls /go Chateau Mantegna). So yeah, removing the error messages from the gCLI would make (or have made) me even more confused.
 
Top