(Go: >> BACK << -|- >> HOME <<)

Page MenuHomePhabricator

TypeError: Argument 1 passed to MediaWiki\User\UserFactory::newFromName() must be of the type string, null given
Closed, ResolvedPublicPRODUCTION ERROR

Description

Error
normalized_message
[{reqId}] {exception_url}   TypeError: Argument 1 passed to MediaWiki\User\UserFactory::newFromName() must be of the type string, null given, called in /srv/mediawiki/php-1.39.0-wmf.16/extensions/CheckUser/src/Hooks.php on line 432
exception.trace
from /srv/mediawiki/php-1.39.0-wmf.16/includes/user/UserFactory.php(84)
#0 /srv/mediawiki/php-1.39.0-wmf.16/extensions/CheckUser/src/Hooks.php(432): MediaWiki\User\UserFactory->newFromName(NULL, string)
#1 /srv/mediawiki/php-1.39.0-wmf.16/includes/HookContainer/HookContainer.php(338): MediaWiki\CheckUser\Hooks::onAuthManagerLoginAuthenticateAudit(MediaWiki\Auth\AuthenticationResponse, NULL, NULL, array)
#2 /srv/mediawiki/php-1.39.0-wmf.16/includes/HookContainer/HookContainer.php(137): MediaWiki\HookContainer\HookContainer->callLegacyHook(string, array, array, array)
#3 /srv/mediawiki/php-1.39.0-wmf.16/includes/HookContainer/HookRunner.php(884): MediaWiki\HookContainer\HookContainer->run(string, array)
#4 /srv/mediawiki/php-1.39.0-wmf.16/includes/auth/AuthManager.php(556): MediaWiki\HookContainer\HookRunner->onAuthManagerLoginAuthenticateAudit(MediaWiki\Auth\AuthenticationResponse, NULL, NULL, array)
#5 /srv/mediawiki/php-1.39.0-wmf.16/includes/auth/AuthManager.php(462): MediaWiki\Auth\AuthManager->continueAuthentication(array)
#6 /srv/mediawiki/php-1.39.0-wmf.16/includes/specialpage/AuthManagerSpecialPage.php(372): MediaWiki\Auth\AuthManager->beginAuthentication(array, string)
#7 /srv/mediawiki/php-1.39.0-wmf.16/includes/specialpage/AuthManagerSpecialPage.php(502): AuthManagerSpecialPage->performAuthenticationStep(string, array)
#8 /srv/mediawiki/php-1.39.0-wmf.16/includes/htmlform/HTMLForm.php(725): AuthManagerSpecialPage->handleFormSubmit(array, VFormHTMLForm)
#9 /srv/mediawiki/php-1.39.0-wmf.16/includes/specialpage/AuthManagerSpecialPage.php(435): HTMLForm->trySubmit()
#10 /srv/mediawiki/php-1.39.0-wmf.16/includes/specialpage/LoginSignupSpecialPage.php(320): AuthManagerSpecialPage->trySubmit()
#11 /srv/mediawiki/php-1.39.0-wmf.16/includes/specialpage/SpecialPage.php(688): LoginSignupSpecialPage->execute(NULL)
#12 /srv/mediawiki/php-1.39.0-wmf.16/includes/specialpage/SpecialPageFactory.php(1418): SpecialPage->run(NULL)
#13 /srv/mediawiki/php-1.39.0-wmf.16/includes/MediaWiki.php(316): MediaWiki\SpecialPage\SpecialPageFactory->executePath(string, RequestContext)
#14 /srv/mediawiki/php-1.39.0-wmf.16/includes/MediaWiki.php(916): MediaWiki->performRequest()
#15 /srv/mediawiki/php-1.39.0-wmf.16/includes/MediaWiki.php(570): MediaWiki->main()
#16 /srv/mediawiki/php-1.39.0-wmf.16/index.php(50): MediaWiki->run()
#17 /srv/mediawiki/php-1.39.0-wmf.16/index.php(46): wfIndexMain()
#18 /srv/mediawiki/w/index.php(3): require(string)
#19 {main}
Impact
Notes

A handful of these since deploy of 1.39.0-wmf.16 (T308069) to group1.

Event Timeline

Change 805913 had a related patch set uploaded (by Zabe; author: Zabe):

[mediawiki/extensions/CheckUser@master] Only try to create User object if username is not null

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

Change 805913 merged by jenkins-bot:

[mediawiki/extensions/CheckUser@master] Only try to create User object if username is not null

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

Change 806246 had a related patch set uploaded (by Krinkle; author: Zabe):

[mediawiki/extensions/CheckUser@wmf/1.39.0-wmf.16] Only try to create User object if username is not null

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

Krinkle triaged this task as High priority.Jun 16 2022, 4:01 PM
Krinkle moved this task from Untriaged to Jun 2022 on the Wikimedia-production-error board.

Change 806246 merged by jenkins-bot:

[mediawiki/extensions/CheckUser@wmf/1.39.0-wmf.16] Only try to create User object if username is not null

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

Mentioned in SAL (#wikimedia-operations) [2022-06-16T18:42:06Z] <brennen@deploy1002> Synchronized php-1.39.0-wmf.16/extensions/CheckUser/src/Hooks.php: Backport: [[gerrit:806246|Only try to create User object if username is not null (T310747)]] (duration: 03m 23s)

brennen assigned this task to Zabe.

Thanks for fix!