Bug - Not A Bug IOException during data post (login.php)

Rinn

Developer
When logging in this error immediately occurs and the login process terminates. r12816 unsure when this started, I was able to login yesterday. No stacktrace was generated.

Code:
Installing default certificate validation...
Sending login request...
[COLOR=red]IOException     during data post (login.php).[/COLOR]
Skipping stale data override:     data/mallprices.txt
Requests complete.
 
Yeah, it sure sucks when KoL is down and the connection times out - or when the DNS lookup fails and it fails immediately, as you saw.

KoL has been down for the last 8 hours.
 
What would a more informative message look like, when it could be your ISP, or a proxy connection, or any number of things that mafia can't be expected to intelligently interpret?
 
I added a generic "Could not connect to the Kingdom of Loathing" abort message. There's really any number of reasons that the connection could have failed, and there's no additional information that was returned that could have provided more details in this case (the responseCode was 0, same with if you disconnected your internet connection entirely). There may be some cases where the response code is non-zero (and not 200 which signifies success) but I didn't look into it.
 
Last edited:
There may be some cases where the response code is non-zero (and not 200 which signifies success) but I didn't look into it.
If it actually submitted a request and read a reply, there would likely be a non-zero response code. But in the case of an I/O error, it either failed to open the connection, failed to write the request, or failed to read the reply, and the response code is what it was initialized to in GenericRequest.prepareConnection - zero.
 
Connected but 'Could Not Connect'

I am successfully connected, and yet...

(using r12818, which at the time of this posting is the latest)

-----
Installing naive certificate validation...
Sending login request...
Initializing session for Lxndr...
Refreshing session data...
Synchronizing moon data...
Loading character status...
Looking at item #0...
Unexpected error, debug log printed.
Retrieving character data...
Updating inventory...
Examining Meat in closet...
Updating closet...
Retrieving quest data...
Retrieving familiar data...
Familiar data retrieved.
Retrieving campground data...
Examining Meat and pulls in storage...
Updating storage...
Visiting Hot Dog Stand in clan VIP lounge
You are currently a member of Clan Xenos
Session data refreshed.
Initializing chat interface...
8 days until Labór Day, 2 days until Moxie.
Skipping stale data override: data/mallprices.txt
Could not connect to the Kingdom of Loathing.
4815 prices updated from http://kolmafia.us/scripts/updateprices.php?action=getmap
 
FWIW, prior to this discussion I never understood that "IOException during data post " could be generated by a failure to connect. The systems I am most familiar with often don't use the term "IO" until two way communication has been established.

Thanks for the clarification.
 
Back
Top