Page MenuHomePhabricator

TypeError: MediaWiki\Rest\Module\ModuleManager::__construct(): Argument #4 ($jsonLocalizer) must be of type MediaWiki\Rest\JsonLocalizer, MediaWiki\Rest\ResponseFactory given, called in /srv/mediawiki/php-1.47.0-wmf.20/extensio
Closed, ResolvedPublicPRODUCTION ERROR

Description

Error
  • service.version: 1.47.0-wmf.20
  • timestamp: 2026-09-15T07:48:39.198Z
  • labels.phpversion: 8.3.33
  • trace.id: ba2505af-7869-4e23-99d6-6f0787a3e33c
  • Find trace.id in Logstash
labels.normalized_message
[{reqId}] {exception_url}   TypeError: MediaWiki\Rest\Module\ModuleManager::__construct(): Argument #4 ($jsonLocalizer) must be of type MediaWiki\Rest\JsonLocalizer, MediaWiki\Rest\ResponseFactory given, called in /srv/mediawiki/php-1.47.0-wmf.20/extensio
FrameLocationCall
from/srv/mediawiki/php-1.47.0-wmf.20/includes/Rest/Module/ModuleManager.php(78)
#0/srv/mediawiki/php-1.47.0-wmf.20/extensions/WikimediaCustomizations/src/RestSandbox/SpecialRestSandbox.php(41)MediaWiki\Rest\Module\ModuleManager->__construct(MediaWiki\Config\ServiceOptions, array, Wikimedia\ObjectCache\APCUBagOStuff, MediaWiki\Rest\ResponseFactory)
#1/srv/mediawiki/php-1.47.0-wmf.20/vendor/wikimedia/object-factory/src/ObjectFactory.php(220)MediaWiki\Extension\WikimediaCustomizations\RestSandbox\SpecialRestSandbox->__construct(MediaWiki\Utils\UrlUtils, MediaWiki\Message\MessageFormatterFactory, Wikimedia\ObjectCache\APCUBagOStuff)
#2/srv/mediawiki/php-1.47.0-wmf.20/vendor/wikimedia/object-factory/src/ObjectFactory.php(130)Wikimedia\ObjectFactory\ObjectFactory::getObjectFromSpec(array, array)
#3/srv/mediawiki/php-1.47.0-wmf.20/includes/SpecialPage/SpecialPageFactory.php(1569)Wikimedia\ObjectFactory\ObjectFactory->createObject(array, array)
#4/srv/mediawiki/php-1.47.0-wmf.20/includes/SpecialPage/SpecialPageFactory.php(1609)MediaWiki\SpecialPage\SpecialPageFactory->getPage(string)
#5/srv/mediawiki/php-1.47.0-wmf.20/includes/Specials/SpecialSpecialPages.php(47)MediaWiki\SpecialPage\SpecialPageFactory->getUsablePages(MediaWiki\User\User, MediaWiki\Context\RequestContext)
#6/srv/mediawiki/php-1.47.0-wmf.20/includes/Specials/SpecialSpecialPages.php(35)MediaWiki\Specials\SpecialSpecialPages->getPageGroups()
#7/srv/mediawiki/php-1.47.0-wmf.20/includes/SpecialPage/SpecialPage.php(727)MediaWiki\Specials\SpecialSpecialPages->execute(null)
#8/srv/mediawiki/php-1.47.0-wmf.20/includes/SpecialPage/SpecialPageFactory.php(1727)MediaWiki\SpecialPage\SpecialPage->run(null)
#9/srv/mediawiki/php-1.47.0-wmf.20/includes/Actions/ActionEntryPoint.php(505)MediaWiki\SpecialPage\SpecialPageFactory->executePath(string, MediaWiki\Context\RequestContext)
#10/srv/mediawiki/php-1.47.0-wmf.20/includes/Actions/ActionEntryPoint.php(145)MediaWiki\Actions\ActionEntryPoint->performRequest()
#11/srv/mediawiki/php-1.47.0-wmf.20/includes/MediaWikiEntryPoint.php(180)MediaWiki\Actions\ActionEntryPoint->execute()
#12/srv/mediawiki/php-1.47.0-wmf.20/index.php(44)MediaWiki\MediaWikiEntryPoint->run()
#13/srv/mediawiki/w/index.php(3)require(string)
#14{main}
Notes

testwikis already showing the issue: https://test.wikipedia.org/wiki/Special:SpecialPages

httpbb tests detect the problem during rollout.

Error points as cause/trigger at https://gerrit.wikimedia.org/r/c/mediawiki/core/+/1337858. Tagging the folks there and marking as blocker

Event Timeline

jnuche triaged this task as Unbreak Now! priority.

Change #1341695 had a related patch set uploaded (by Aghirelli; author: Aghirelli):

[mediawiki/extensions/WikimediaCustomizations@master] RestSandbox: Pass JsonLocalizer instead of ResponseFactory to ModuleManager

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

Hey @jnuche, I just pushed a fix, tested locally and it's working. It was a leftover from a refactor we did.

Change #1341698 had a related patch set uploaded (by Jaime Nuche; author: Aghirelli):

[mediawiki/extensions/WikimediaCustomizations@wmf/1.47.0-wmf.20] RestSandbox: Pass JsonLocalizer instead of ResponseFactory to ModuleManager

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

Thanks for the patch! I'll backport to .20

Change #1341698 merged by jenkins-bot:

[mediawiki/extensions/WikimediaCustomizations@wmf/1.47.0-wmf.20] RestSandbox: Pass JsonLocalizer instead of ResponseFactory to ModuleManager

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

Mentioned in SAL (#wikimedia-operations) [2026-09-15T08:47:33Z] <jnuche@deploy1003> Started scap sync-world: Backport for [[gerrit:1341698|RestSandbox: Pass JsonLocalizer instead of ResponseFactory to ModuleManager (T437982)]]

Change #1341695 merged by jenkins-bot:

[mediawiki/extensions/WikimediaCustomizations@master] RestSandbox: Pass JsonLocalizer instead of ResponseFactory to ModuleManager

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

Mentioned in SAL (#wikimedia-operations) [2026-09-15T08:52:17Z] <jnuche@deploy1003> jnuche: Backport for [[gerrit:1341698|RestSandbox: Pass JsonLocalizer instead of ResponseFactory to ModuleManager (T437982)]] synced to the testservers (see https://wikitech.wikimedia.org/wiki/Mwdebug). Changes can now be verified there.

Mentioned in SAL (#wikimedia-operations) [2026-09-15T08:59:36Z] <jnuche@deploy1003> Finished scap sync-world: Backport for [[gerrit:1341698|RestSandbox: Pass JsonLocalizer instead of ResponseFactory to ModuleManager (T437982)]] (duration: 12m 03s)

jnuche lowered the priority of this task from Unbreak Now! to Needs Triage.Tue, Sep 15, 9:02 AM

Problem is fixed on testwikis. I'm removing this as a blocker and monitoring it during the week. I will then close it once the train is done

jnuche claimed this task.