Page MenuHomePhabricator

TypeError: Argument 1 passed to GrowthExperiments\NewcomerTasks\TaskSuggester\CacheDecorator::suggest() must implement interface UserIdentity, null given
Open, HighPublicPRODUCTION ERROR

Description

Error
normalized_message
[{reqId}] {exception_url}   TypeError: Argument 1 passed to GrowthExperiments\NewcomerTasks\TaskSuggester\CacheDecorator::suggest() must implement interface MediaWiki\User\UserIdentity, null given, called in /srv/mediawiki/php-1.37.0-wmf.3/extensions/Grow
exception.trace
from /srv/mediawiki/php-1.37.0-wmf.3/extensions/GrowthExperiments/includes/NewcomerTasks/TaskSuggester/CacheDecorator.php(49)
#0 /srv/mediawiki/php-1.37.0-wmf.3/extensions/GrowthExperiments/maintenance/refreshLinkRecommendations.php(170): GrowthExperiments\NewcomerTasks\TaskSuggester\CacheDecorator->suggest(NULL, array, array, integer, integer, array)
#1 /srv/mediawiki/php-1.37.0-wmf.3/maintenance/doMaintenance.php(112): GrowthExperiments\Maintenance\RefreshLinkRecommendations->execute()
#2 /srv/mediawiki/php-1.37.0-wmf.3/extensions/GrowthExperiments/maintenance/refreshLinkRecommendations.php(501): require_once(string)
#3 /srv/mediawiki/multiversion/MWScript.php(116): require_once(string)
#4 {main}
Impact

New link recommendation tasks are not generated. Link recommendations are in stealth mode so no user impact yet.

Notes

Event Timeline

Restricted Application added a subscriber: Aklapper. · View Herald Transcript

Looks like Maintenance script is not a system user on cswiki so $this->searchUser = User::newSystemUser( 'Maintenance script' ); ends up setting it to null.

Change 684386 had a related patch set uploaded (by Gergő Tisza; author: Gergő Tisza):

[mediawiki/extensions/GrowthExperiments@master] RefreshLinkRecommendations: force getting a system user if needed

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

Tgr edited projects, added Growth-Team (Current Sprint); removed Growth-Team.
Tgr moved this task from Incoming to Code Review on the Growth-Team (Current Sprint) board.

Mentioned in SAL (#wikimedia-operations) [2021-05-03T13:10:47Z] <Urbanecm> Run User::newSystemUser( 'Maintenance script', [ 'steal' => true ] ) on cswiki to make the user a proper system user (T281703)

Change 684386 merged by jenkins-bot:

[mediawiki/extensions/GrowthExperiments@master] RefreshLinkRecommendations: force getting a system user if needed

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

kostajh triaged this task as High priority.Mon, May 3, 2:43 PM
kostajh moved this task from Backlog to QA on the Add-Link board.

Mentioned in SAL (#wikimedia-operations) [2021-05-04T11:31:40Z] <Urbanecm> Run User::newSystemUser( 'Maintenance script', [ 'steal' => true ] ); on arwiki, bnwiki, viwiki (T278710, T281703)

Krinkle renamed this task from TypeError: Argument 1 passed to GrowthExperiments\NewcomerTasks\TaskSuggester\CacheDecorator::suggest() must implement interface MediaWiki\User\UserIdentity, null given, called in /srv/mediawiki/php-1.37.0-wmf.3/extensions/GrowthExperiments/maintenance/refreshLinkRecommendations.php on line 170 to TypeError: Argument 1 passed to GrowthExperiments\NewcomerTasks\TaskSuggester\CacheDecorator::suggest() must implement interface UserIdentity, null given.Thu, May 6, 11:12 PM
Krinkle moved this task from Untriaged to May 2021 on the Wikimedia-production-error board.