Wikimedia Developer Support

[MediaWiki-l] UnexpectedValueException from line 961 of /var/www/html/.../loadbalancer/LoadBalancer.php

Hi Everyone,

We just upgraded from MediaWiki 1.31.1 to 1.31.2. Upon restart we
countered (

    [XPoMh74trMB6BmTtXzPnBgAAAAY] /wiki/ UnexpectedValueException from
    line 961 of
    Got connection to 'my_wiki-wikicryptopp_', but expected local domain

According to, 1.31.2 is the
latest download. I'm guessing is sidesteps the typos discussed at,
so there were no maintenance releases afterwards. (Or is there a
1.31.3 somewhere?)

# grep -i -E 'my|cryptopp' LocalSettings.php
$wgServer = '//';
$wgEmergencyContact = "";
$wgPasswordSender = "";
$wgDBtype = "mysql";
$wgDBname = "my_wiki";
$wgDBprefix = "wikicryptopp_";

How should we proceed?

Thanks in advance.

The immediate maintenance release for 1.27 was due to an issue that only
affected that version, hence no release of 1.31.3 (or any other version)

I'd like to try and clear up some confusion in your post.

Line 961 in 1.31.2 isn't a line that gives the error that you're claiming,
nor does anywhere in that file [1] throw that error.

However, in 1.32.2 it does [2].

It looks like you've upgraded from 1.31.1 to 1.32.2, not to 1.31.2 as you
claim. This seems to be confirmed on [3], but your wiki also seems to be ok
from a cursory browse around.

Are you still having issues? Or have they resolved themselves? If so, can
you tell me when and where you see the error when using your wiki, and we
can try and help you work out where to proceed.






The two my_wiki prefixes came from $wgDBmwschema:

    # Schemas for Postgres
    $wgDBmwschema = $wgDBname;
    $wgDBts2schema = "public";

We run MySQL. It was fine in 1.31.1 and below, but it started getting
parsed after the 1.31.1 update.


Are you still having problems?

As above, you're not running 1.31.1, you're running 1.32.1...

Are you still having problems?


As above, you're not running 1.31.1, you're running 1.32.1...

We tried 1.31.2, and then 1.32.2 hoping it would fix it. We stayed at 1.32.2.

There was one more error after that, but I don't recall the message.


The other thing we had to add was:

    $wgResourceLoaderLESSVars = false;

It surfaced from .


Would you remind removing it again, and telling us where it's broken/what the
actual error message is?

$wgResourceLoaderLESSVars was removed in 1.32, but I'm guessing there's some
extension you're using that still has a usage of it, and should be fixed

As I understand things, it is needed for Mobile FrontEnd.


Did you update the extension when you updated MediaWiki core? There is usages
of that variable in the 1.31 version of MobileFrontend, but they've been
removed in the 1.32 version.

The version of the extension should match the version of MediaWiki core
you're using, else you might get errors like this

$ git clone
Cloning into 'MobileFrontend'...
remote: Counting objects: 2291, done
remote: Finding sources: 100% (92/92)
remote: Getting sizes: 100% (67/67)
remote: Compressing objects: 100% (673532/673532)
remote: Total 107395 (delta 28), reused 107334 (delta 9)
Receiving objects: 100% (107395/107395), 25.05 MiB | 4.82 MiB/s, done.
Resolving deltas: 100% (86465/86465), done.
$ cd MobileFrontend/
$ git checkout REL1_32
Branch 'REL1_32' set up to track remote branch 'REL1_32' from 'origin'.
Switched to a new branch 'REL1_32'
$ grep -R git clone
$ grep -R ResourceLoaderLESSVars *
$ git checkout REL1_31
Branch 'REL1_31' set up to track remote branch 'REL1_31' from 'origin'.
Switched to a new branch 'REL1_31'
$ grep -R ResourceLoaderLESSVars *
includes/MobileFrontend.hooks.php: $lessVars = $config->get(
'ResourceLoaderLESSVars' );
includes/MobileFrontend.hooks.php: $lessVars = $config->get(
'ResourceLoaderLESSVars' );