Page MenuHomePhabricator

"InvalidArgumentException: $key must be a string or an array" on beta login and vote wikis
Closed, ResolvedPublicBUG REPORT

Description

What is the problem?

On https://vote.wikimedia.beta.wmflabs.org and https://login.wikimedia.beta.wmflabs.org we are seeing the error:

Original exception: [YN8KHIKRRvrNiQEtWdbNeAAAAAM] /wiki/Main_Page InvalidArgumentException: $key must be a string or an array
Backtrace:
from /srv/mediawiki/php-master/includes/language/Message.php(240)
#0 /srv/mediawiki/php-master/includes/GlobalFunctions.php(1183): Message->__construct(integer)
#1 /srv/mediawiki/php-master/includes/context/RequestContext.php(476): wfMessage(integer)
#2 /srv/mediawiki/php-master/includes/context/ContextSource.php(198): RequestContext->msg(integer)
#3 /srv/mediawiki/php-master/includes/skins/Skin.php(2362): ContextSource->msg(integer)
#4 /srv/mediawiki/php-master/includes/skins/Skin.php(2485): Skin->makeLink(integer, array, array)
#5 /srv/mediawiki/php-master/includes/skins/SkinMustache.php(85): Skin->makeListItem(string, array)
#6 /srv/mediawiki/php-master/skins/Vector/includes/SkinVector.php(536): SkinMustache->getPortletData(string, array)
#7 /srv/mediawiki/php-master/includes/skins/SkinMustache.php(244): SkinVector->getPortletData(string, array)
#8 /srv/mediawiki/php-master/includes/skins/SkinMustache.php(199): SkinMustache->getPortletsTemplateData()
#9 /srv/mediawiki/php-master/skins/Vector/includes/SkinVector.php(275): SkinMustache->getTemplateData()
#10 /srv/mediawiki/php-master/includes/skins/SkinMustache.php(137): SkinVector->getTemplateData()
#11 /srv/mediawiki/php-master/includes/skins/SkinTemplate.php(147): SkinMustache->generateHTML()
#12 /srv/mediawiki/php-master/includes/OutputPage.php(2644): SkinTemplate->outputPage()
#13 /srv/mediawiki/php-master/includes/MediaWiki.php(939): OutputPage->output(boolean)
#14 /srv/mediawiki/php-master/includes/MediaWiki.php(952): MediaWiki::{closure}()
#15 /srv/mediawiki/php-master/includes/MediaWiki.php(559): MediaWiki->main()
#16 /srv/mediawiki/php-master/index.php(53): MediaWiki->run()
#17 /srv/mediawiki/php-master/index.php(46): wfIndexMain()
#18 /srv/mediawiki/w/index.php(3): require(string)
#19 {main}

This only seems to happen when you are logged out and using the new version of the Vector skin. Therefore, tagging Desktop Improvements.

So you see the error if you go to https://vote.wikimedia.beta.wmflabs.org/wiki/Main_Page?useskin=vector&useskinversion=2 but not https://vote.wikimedia.beta.wmflabs.org/wiki/Main_Page?useskin=vector&useskinversion=1 or https://vote.wikimedia.beta.wmflabs.org/wiki/Main_Page?useskin=minerva.

Nor does it happen on other beta sites, e.g. https://en.wikipedia.beta.wmflabs.org/wiki/Main_Page

Steps to reproduce problem
  1. Go to https://vote.wikimedia.beta.wmflabs.org/wiki/Main_Page?useskin=vector&useskinversion=2 or https://login.wikimedia.beta.wmflabs.org/wiki/Main_Page?useskin=vector&useskinversion=2
Environment

Wiki(s): MediaWiki 1.37.0-alpha (780ed06) 06:20, 2 July 2021. Vector 1.0.0 (f3a4f9c) 06:32, 2 July 2021.

Event Timeline

taavi triaged this task as Unbreak Now! priority.Jul 3 2021, 4:11 PM
taavi subscribed.

(as a train blocker)

Change 704358 had a related patch set uploaded (by Jdlrobson; author: Jdlrobson):

[mediawiki/core@master] links is flat array

https://gerrit.wikimedia.org/r/704358

@bwang @Jdlrobson Checking in on status since this is a blocker for this week's train. Is anyone willing to +2 https://gerrit.wikimedia.org/r/704358 (and also make a cherry-pick for wmf.14)?

Change 704358 merged by jenkins-bot:

[mediawiki/core@master] links is flat array

https://gerrit.wikimedia.org/r/704358

Change 704368 had a related patch set uploaded (by Jdlrobson; author: Jdlrobson):

[mediawiki/core@wmf/1.37.0-wmf.14] links is flat array

https://gerrit.wikimedia.org/r/704368

Hey @dancy just back from vacation, so catching up. We've merged a patch to master and are just waiting for it to end up on the beta cluster so we can verify it addresses this problem. Have no idea why it's only impacting certain wikis though. I imagine there is something different in the configuration on the target wikis.

Jdlrobson added a subscriber: bwang.

Change 704368 merged by jenkins-bot:

[mediawiki/core@wmf/1.37.0-wmf.14] links is flat array

https://gerrit.wikimedia.org/r/704368

Jdlrobson lowered the priority of this task from Unbreak Now! to Medium.Jul 13 2021, 8:06 PM

Mentioned in SAL (#wikimedia-operations) [2021-07-13T20:30:54Z] <dancy@deploy1002> Synchronized php-1.37.0-wmf.14/includes/skins/Skin.php: Backport: [[gerrit:704368|links is flat array (T286040)]] (duration: 02m 07s)