Page MenuHomePhabricator

TypeError: Argument 1 passed to LanguageConverter::__construct() must be an instance of Language, instance of StubUserLang given, called in /srv/mediawiki/php-1.37.0-wmf.9/includes/language/LanguageConverterFactory.php on line 132
Closed, ResolvedPublicPRODUCTION ERROR

Description

Error
normalized_message
[{reqId}] {exception_url}   TypeError: Argument 1 passed to LanguageConverter::__construct() must be an instance of Language, instance of StubUserLang given, called in /srv/mediawiki/php-1.37.0-wmf.9/includes/language/LanguageConverterFactory.php on line
exception.trace
from /srv/mediawiki/php-1.37.0-wmf.9/includes/language/LanguageConverter.php(84)
#0 /srv/mediawiki/php-1.37.0-wmf.9/includes/language/LanguageConverterFactory.php(132): LanguageConverter->__construct(StubUserLang)
#1 /srv/mediawiki/php-1.37.0-wmf.9/includes/OutputPage.php(2341): MediaWiki\Languages\LanguageConverterFactory->getLanguageConverter(StubUserLang)
#2 /srv/mediawiki/php-1.37.0-wmf.9/includes/OutputPage.php(2448): OutputPage->addAcceptLanguage()
#3 /srv/mediawiki/php-1.37.0-wmf.9/includes/OutputPage.php(2568): OutputPage->sendCacheControl()
#4 /srv/mediawiki/php-1.37.0-wmf.9/includes/MediaWiki.php(931): OutputPage->output(boolean)
#5 /srv/mediawiki/php-1.37.0-wmf.9/includes/MediaWiki.php(944): MediaWiki::{closure}()
#6 /srv/mediawiki/php-1.37.0-wmf.9/includes/MediaWiki.php(551): MediaWiki->main()
#7 /srv/mediawiki/php-1.37.0-wmf.9/index.php(53): MediaWiki->run()
#8 /srv/mediawiki/php-1.37.0-wmf.9/index.php(46): wfIndexMain()
#9 /srv/mediawiki/w/index.php(3): require(string)
#10 {main}
Impact
  • A dozen in the past 4 hours or so
  • Only happening in wmf.9
Notes

Event Timeline

Change 699012 had a related patch set uploaded (by DannyS712; author: DannyS712):

[mediawiki/core@master] Revert "Add type hint to constructor of LanguageConverter"

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

Change 699013 had a related patch set uploaded (by DannyS712; author: DannyS712):

[mediawiki/core@master] LanguageConverter: document accepting StubUserLang

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

Sorry, thats my bad - forgot about StubUserLang. Just +2'ed the revert, @thcipriani does it warrant backporting to the train?

This is happening more since I deployed to group1, so I think a backport would be good @DannyS712

Change 699012 merged by jenkins-bot:

[mediawiki/core@master] Revert "Add type hint to constructor of LanguageConverter"

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

Change 699014 had a related patch set uploaded (by DannyS712; author: DannyS712):

[mediawiki/core@wmf/1.37.0-wmf.9] Revert "Add type hint to constructor of LanguageConverter"

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

This is happening more since I deployed to group1, so I think a backport would be good @DannyS712

Sent https://gerrit.wikimedia.org/r/c/mediawiki/core/+/699014 for the backport, marking as a blocker

DannyS712 triaged this task as Unbreak Now! priority.Wed, Jun 9, 7:47 PM
DannyS712 added a project: User-DannyS712.
DannyS712 moved this task from Unsorted to Awaiting review and deployment on the User-DannyS712 board.

Change 699014 merged by jenkins-bot:

[mediawiki/core@wmf/1.37.0-wmf.9] Revert "Add type hint to constructor of LanguageConverter"

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

Mentioned in SAL (#wikimedia-operations) [2021-06-09T21:40:43Z] <ladsgroup@deploy1002> Synchronized php-1.37.0-wmf.9/includes/language/LanguageConverter.php: Backport: [[gerrit:699014|Revert "Add type hint to constructor of LanguageConverter" (T284685)]] (duration: 01m 24s)

Ladsgroup assigned this task to DannyS712.