Bug - Fixed kolmafia failing to login/open

Status
Not open for further replies.

baethan

New member
I'm using 15.2 r11169 on a mac (snow leopard). Mafia opens, but when I try to log in, it hangs for a bit on the "synchronizing moons" message, eventually flashes through some other messages too fast to read, and then the process quits.
 
can't log in with r11171

I have the following options selected:
Stealth Login (turned off too, no change)
Switch to HTTPS for login (turned off too, no change)

It hangs for a long time on Synchronizing Moon Data
and then it logs out


=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
KoLmafia v15.2 r11171, Mac OS X, Java 1.6.0_33
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
Please note: do not post this log in the KoLmafia thread. If you
would like the dev team to look at it, please write a bug report
at kolmafia.us. Include specific information about what you were
doing when you made this and include the log as an attachment.
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
Timestamp: Tue Jun 19 23:55:16 EDT 2012
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=


topmenu.php => login.php?notloggedin=1
class java.lang.Exception: topmenu.php => login.php?notloggedin=1
java.lang.Exception: topmenu.php => login.php?notloggedin=1
at net.sourceforge.kolmafia.StaticEntity.printStackTrace(StaticEntity.java:389)
at net.sourceforge.kolmafia.request.LoginRequest.executeTimeInRequest(LoginRequest.java:350)
at net.sourceforge.kolmafia.request.GenericRequest.handleServerRedirect(GenericRequest.java:1856)
at net.sourceforge.kolmafia.request.GenericRequest.retrieveServerReply(GenericRequest.java:1714)
at net.sourceforge.kolmafia.request.GenericRequest.execute(GenericRequest.java:1420)
at net.sourceforge.kolmafia.request.GenericRequest.run(GenericRequest.java:1313)
at net.sourceforge.kolmafia.request.MoonPhaseRequest.run(MoonPhaseRequest.java:80)
at net.sourceforge.kolmafia.RequestThread.postRequest(RequestThread.java:222)
at net.sourceforge.kolmafia.RequestThread.postRequest(RequestThread.java:185)
at net.sourceforge.kolmafia.KoLmafia.refreshSessionData(KoLmafia.java:846)
at net.sourceforge.kolmafia.KoLmafia.refreshSession(KoLmafia.java:798)
at net.sourceforge.kolmafia.session.LoginManager.initialize(LoginManager.java:182)
at net.sourceforge.kolmafia.session.LoginManager.doLogin(LoginManager.java:87)
at net.sourceforge.kolmafia.session.LoginManager.login(LoginManager.java:71)
at net.sourceforge.kolmafia.request.LoginRequest.processLoginRequest(LoginRequest.java:423)
at net.sourceforge.kolmafia.request.GenericRequest.handleServerRedirect(GenericRequest.java:1818)
at net.sourceforge.kolmafia.request.GenericRequest.retrieveServerReply(GenericRequest.java:1714)
at net.sourceforge.kolmafia.request.GenericRequest.execute(GenericRequest.java:1420)
at net.sourceforge.kolmafia.request.GenericRequest.run(GenericRequest.java:1313)
at net.sourceforge.kolmafia.request.LoginRequest.run(LoginRequest.java:272)
at net.sourceforge.kolmafia.RequestThread.postRequest(RequestThread.java:222)
at net.sourceforge.kolmafia.RequestThread.postRequest(RequestThread.java:185)
at net.sourceforge.kolmafia.swingui.LoginFrame$LoginPanel.doLogin(LoginFrame.java:344)
at net.sourceforge.kolmafia.swingui.LoginFrame$LoginPanel.actionConfirmed(LoginFrame.java:302)
at net.sourceforge.kolmafia.swingui.panel.GenericPanel$ConfirmedListener.execute(GenericPanel.java:610)
at net.sourceforge.kolmafia.swingui.listener.ThreadedListener.run(ThreadedListener.java:239)
at net.sourceforge.kolmafia.RequestThread$ThreadWrappedRunnable.run(RequestThread.java:342)
topmenu.php => login.php?notloggedin=1
 

lostcalpolydude

Developer
Staff member
Some stuff was changed with the servers. I was forwarded this:

[dev] CDMoyer: just needs to deal with the appserver cookie along with the PHPSESSID cookie

I'll try to figure it out, but I'm starting from not really knowing how it works, so if someone beats me to it that won't be a problem.
 

cahavathra

New member
Mafia forcibly logs out after login

after rollover, mafia suddenly starts logging me out immediately after logging in. Was working right yesterday. Just updated to the latest build, running on OSX 10.4.1, posting debug log.
 

Attachments

  • DEBUG_20120620.txt
    70.7 KB · Views: 64

roippi

Developer
Merged. This is a server-side change, so you'll have to wait for a dev to get to it.

I won't have time to look at this tonight.
 

Veracity

Developer
Staff member
I actually logged in, changed to my PVP outfit, did this and that, and then I was forcibly logged out. This was a post-rollover server-side change.

I wish I knew what "[dev] CDMoyer: just needs to deal with the appserver cookie along with the PHPSESSID cookie" means.
I wish I had time to look at it tonight.

Sure would have been nice to get some advance warning.
 
CDMoyer said:
Just a minor change to the way the load balancer works. I imagine it'll be a quick fix, just need mafia to also send back the appserver cookie that's set when you load login.php
 

Catch-22

Active member
KoLmafia currently only handles (edit: actually truncates the extra cookies so it wouldn't have handled it) multiple cookies if they're folded into a single set-cookie header. This could've been avoided if CDMoyer folded the cookie header, but RFC 6265 recommends against it.

I'll see if I can fix this...
 
Last edited:

lostcalpolydude

Developer
Staff member
I think the load balancer is based on IP address or something location-based. For some people, this could change mid-session, so they were sent to a different web server, and since that web server didn't have their session info they would get logged out (I had to deal with this from a hotel once, and the only thing that let me accomplish anything was mafia constantly logging back in while playing turns). The change appears to let the client say which web server to use so it won't get switched mid-session.
 
Yeah, broadly the issue is it's two separate Set-Cookie header lines now, and the call to getHeaderField returns the last one (which doesn't have the PHPSESSID, which means kol doesn't know who we are). I'm writing a patch to parse out both cookies and set them properly. :) We'll see if I get there first, or Catch-22 (or someone else) does.
 

Veracity

Developer
Staff member
It's a race! I'm also working on it. Considering that I can actually submit my code when I'm done, I bet I win. ;)
 

Bale

Minion
I'm glad that two people are working on this. That improves the chance that I'll get to start mafia soonish. Hopefully someone with commit access will still be awake when that happens.

Edit: NInja'ed by Veracity. It's definitely gonna be working tonight! Hi Veracity! I thought you didn't have time tonight. ;)
 

Catch-22

Active member
Haha, well if you guys are working on it I'm giving up. Seems like the Java URLConnection class has poor support for multiple headers of the same name. Looks like you'd have to iterate through the collection and check each header name one by one.

Good luck :)
 
Status
Not open for further replies.
Top