Bug - Fixed Changes to URL handling in KoL broke KoLmafia

Opassa

New member
Kingdom of Loathing just underwent a silent update, it now loads a bunch of stuff from the subdomain images.kingdomofloathing.com instead of kingdomofloathing.com. Somehow KoLmafia needs to track these requests and which domain they're going to and rewrite them to go through KoLmafia instead of rewriting them to https://images/. Hopefully it's simple to fix, but I have no idea how to handle that. Maybe by rewriting the URL to include http://127.0.0.1:60080/images/*.php or something like that? I know some stuff comes from cloudflare and it seems to relay those requests just fine, so there must be some mechanism that can handle different domains.
 
The problem cascades from there (AFAIK it's not just images but also css and javascript? so not having it removes/breaks a lot of native functionality), and doesn't seem to be limited to relay browser. Most of my "start of day" scripts ran, but then I got exceptions from buying or eating karma shawarma, for example - still in gCLI.
 
There's ... a lot of things that aren't working for me right now. Combat action bar is completely non-functional, and while I can run combats with "adv" in the CLI, if I use "adv1" or if it's a combat started from an item, mafia doesn't register that a combat has started. At least until I load the page in relay browser. Don't know where to begin looking for what causes *that*.
 
People in my clan are saying r29223 fixed things.
People in the Games and Newbie channels say it fixed most of it, but there's still reports of lag for things like inventory. But that seems to be inconsistent. 3 seconds, 5 seconds, 15-45 seconds, 1 minute are all times I've seen reported before tonight's rollover.
 
My inventory took very long time to finish loading the first time (but I also cleared my mafia cache yesterday), but not the second time (all images cached in browser). Next check is ... I don't know when, I can't tell how long the browser caches them.
Next suspect would be the change from http to https, SSL adds some processing on its own and who knows what the protocol changes can cause.
Another suspect is browser addons, especially adblockers (I have ublock origin/umatrix/privacy badger) - AFAIK and IIUIC on firefox they hook into the request in such way that it serializes them (the images come in one after another instead of in batches). It is possible that the issue already existed for this reason, but we are noticing it because there was a bigger change.
 
Howdy y'all! I'm popping in to mention that my relay browser experience is still unusable on the latest build, with all adblockers and VPNs turned off. Tested in three different browsers (all Chromium-based, though). Every time I request a page, it's a tossup whether I get the page load (after a longer than usual delay), a blank white page (also after a delay), or a "connection reset" error (no delay). Any links that trigger content that loads in-page are almost guaranteed to fail. I first noticed this three days ago when I went to play my turns after a month or so of not playing. Have been trying to debug but I am at a loss.

Most of the pages also had a lot of broken images, but after half a dozen or so "Reload Frame"s most of them loaded and were cached successfully.

I see that this bug was marked fixed. Am I the only one still experiencing this? What info can I provide to help debug this? Relay was my preferred way to play but it's not really possible right now.
 
I do not have any of these problems.
Have you tried clearing your browser cache? Or trying a clean install of Mafia as a test?
 
One of the browsers I tested was a recent install of Vivaldi, which I'd never played KoL on before.

Just tried a clean KoLmafia (nothing but the jar file in a new folder) and the problem continues.

Since I'm in Korea getting "connection reset" errors, on a lark I tried setting my VPN to a US address. Unfortunately (and fortunately, because I wouldn't have been happy if that was the issue) the errors continued.

If it helps, it seems page requests that contain POST requests are much more likely to fail.

All the non-relay stuff seems to be working fine, without any noticeable lag. My routine scripts still run and take the normal amount of time.
 
This bug was solely the change in the image server; your bug sounds more serious.

I assume https://www.kingdomofloathing.com itself works fine?

I know there have been PHP changes (they upgraded from 5 to 8), but I haven't heard anyone else having such serious issues. Also, as normal scripts work fine, that indicates that requests proxied through Mafia also work fine, as otherwise we wouldn't be able to e.g. parse fight pages.

You could try running "debug on" in the CLI, running some requests, and posting the debug log in here to see if we can get anything from it. Perhaps your browser is sending something in the request headers? Korean language encoding?
 
Back
Top