Page MenuHomePhabricator

InvalidArgumentException: $usertalk must be provided if block target is not a user/IP
Closed, ResolvedPublicPRODUCTION ERROR

Description

Error
  • mwversion: 1.45.0-wmf.15
  • timestamp: 2025-08-26T11:30:24.873Z
  • phpversion: 8.1.33
  • reqId: 4ac892ce-2e72-4c19-a86d-cb166b0947c1
  • Find reqId in Logstash
normalized_message
[{reqId}] {exception_url}   InvalidArgumentException: $usertalk must be provided if block target is not a user/IP
FrameLocationCall
from/srv/mediawiki/php-1.45.0-wmf.15/includes/block/AbstractBlock.php(478)
#0/srv/mediawiki/php-1.45.0-wmf.15/includes/auth/AuthManager.php(1927)MediaWiki\Block\AbstractBlock->appliesToUsertalk()
#1/srv/mediawiki/php-1.45.0-wmf.15/includes/auth/AuthManager.php(2061)MediaWiki\Auth\AuthManager->autocreatingTempUserToAppealBlock(MediaWiki\Permissions\PermissionStatus, string, MediaWiki\User\User)
#2/srv/mediawiki/php-1.45.0-wmf.15/includes/user/TempUser/TempUserCreator.php(209)MediaWiki\Auth\AuthManager->autoCreateUser(MediaWiki\User\User, string, bool)
#3/srv/mediawiki/php-1.45.0-wmf.15/includes/user/TempUser/TempUserCreator.php(127)MediaWiki\User\TempUser\TempUserCreator->attemptAutoCreate(string)
#4/srv/mediawiki/php-1.45.0-wmf.15/includes/specials/redirects/SpecialMytalk.php(113)MediaWiki\User\TempUser\TempUserCreator->create(string, MediaWiki\Request\WebRequest)
#5/srv/mediawiki/php-1.45.0-wmf.15/includes/htmlform/HTMLForm.php(825)MediaWiki\Specials\Redirects\SpecialMytalk->onSubmit(array, MediaWiki\HTMLForm\OOUIHTMLForm)
#6/srv/mediawiki/php-1.45.0-wmf.15/includes/htmlform/HTMLForm.php(706)MediaWiki\HTMLForm\HTMLForm->trySubmit()
#7/srv/mediawiki/php-1.45.0-wmf.15/includes/htmlform/HTMLForm.php(722)MediaWiki\HTMLForm\HTMLForm->tryAuthorizedSubmit()
#8/srv/mediawiki/php-1.45.0-wmf.15/includes/specials/redirects/SpecialMytalk.php(74)MediaWiki\HTMLForm\HTMLForm->show()
#9/srv/mediawiki/php-1.45.0-wmf.15/includes/specialpage/SpecialPage.php(725)MediaWiki\Specials\Redirects\SpecialMytalk->execute(null)
#10/srv/mediawiki/php-1.45.0-wmf.15/includes/specialpage/SpecialPageFactory.php(1732)MediaWiki\SpecialPage\SpecialPage->run(null)
#11/srv/mediawiki/php-1.45.0-wmf.15/includes/actions/ActionEntryPoint.php(499)MediaWiki\SpecialPage\SpecialPageFactory->executePath(string, MediaWiki\Context\RequestContext)
#12/srv/mediawiki/php-1.45.0-wmf.15/includes/actions/ActionEntryPoint.php(143)MediaWiki\Actions\ActionEntryPoint->performRequest()
#13/srv/mediawiki/php-1.45.0-wmf.15/includes/MediaWikiEntryPoint.php(198)MediaWiki\Actions\ActionEntryPoint->execute()
#14/srv/mediawiki/php-1.45.0-wmf.15/index.php(58)MediaWiki\MediaWikiEntryPoint->run()
#15/srv/mediawiki/w/index.php(3)require(string)
#16{main}
Impact
Notes

Details

Request URL
https://ja.wikipedia.org/wiki/%E7%89%B9%E5%88%A5:%E3%83%88%E3%83%BC%E3%82%AF%E3%83%9A%E3%83%BC%E3%82%B8
Related Changes in Gerrit:

Event Timeline

I may be wrong, but I feel like this error might be preventing the patch for T398673: Unregistered editors on blocked ranges need a way to interact on-wiki to appeal a block from working as intended (rather than the error (e.g.) just being a side effect that doesn't impact the new feature itself).
Testing at https://3387e46cc4.catalyst.wmcloud.org/wiki/Special:MyTalk, the error seems to appear after pressing "Continue", without a temporary account being created in the process (judging by Special:Log/newusers).

I can reproduce this locally if the block target is an IP range, so it is affecting how the feature works for users affected by a range block.

It's happening a few times a day, and will increase as we deploy temp accounts to larger wikis: https://logstash.wikimedia.org/goto/eb688a4df049330828fb1c78fd271be8

Change #1192558 had a related patch set uploaded (by Tchanders; author: Tchanders):

[mediawiki/core@master] Pass user talk page when autocreating temp user to appeal block

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

@STran I made this patch before I saw this task was picked up - feel free to expand it if it's helpful.

Change #1192571 had a related patch set uploaded (by STran; author: STran):

[mediawiki/core@master] Pass through a user talk page in ip reveal temp account creation

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

Oh whoops I just saw this. No yours looks better I can abandon.

Change #1192571 abandoned by STran:

[mediawiki/core@master] Pass through a user talk page in ip reveal temp account creation

Reason:

prefer Iab61cd5d85937e4f88c240e0a2615c20e474d8b2

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

Change #1192558 merged by jenkins-bot:

[mediawiki/core@master] Pass user talk page when autocreating temp user to appeal block

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

Still appearing as the fix didn't make the train

Error
  • mwversion: 1.45.0-wmf.21
  • timestamp: 2025-10-02T09:24:31.341Z
  • phpversion: 8.1.33
  • reqId: 5acfe2b5-43dd-4739-9c50-e4f84103b351
  • Find reqId in Logstash
normalized_message
[{reqId}] {exception_url}   InvalidArgumentException: $usertalk must be provided if block target is not a user/IP
FrameLocationCall
from/srv/mediawiki/php-1.45.0-wmf.21/includes/block/AbstractBlock.php(478)
#0/srv/mediawiki/php-1.45.0-wmf.21/includes/auth/AuthManager.php(1925)MediaWiki\Block\AbstractBlock->appliesToUsertalk()
#1/srv/mediawiki/php-1.45.0-wmf.21/includes/auth/AuthManager.php(2059)MediaWiki\Auth\AuthManager->autocreatingTempUserToAppealBlock(MediaWiki\Permissions\PermissionStatus, string, MediaWiki\User\User)
#2/srv/mediawiki/php-1.45.0-wmf.21/includes/user/TempUser/TempUserCreator.php(209)MediaWiki\Auth\AuthManager->autoCreateUser(MediaWiki\User\User, string, bool)
#3/srv/mediawiki/php-1.45.0-wmf.21/includes/user/TempUser/TempUserCreator.php(127)MediaWiki\User\TempUser\TempUserCreator->attemptAutoCreate(string)
#4/srv/mediawiki/php-1.45.0-wmf.21/includes/specials/redirects/SpecialMytalk.php(113)MediaWiki\User\TempUser\TempUserCreator->create(string, MediaWiki\Request\WebRequest)
#5/srv/mediawiki/php-1.45.0-wmf.21/includes/htmlform/HTMLForm.php(825)MediaWiki\Specials\Redirects\SpecialMytalk->onSubmit(array, MediaWiki\HTMLForm\OOUIHTMLForm)
#6/srv/mediawiki/php-1.45.0-wmf.21/includes/htmlform/HTMLForm.php(706)MediaWiki\HTMLForm\HTMLForm->trySubmit()
#7/srv/mediawiki/php-1.45.0-wmf.21/includes/htmlform/HTMLForm.php(722)MediaWiki\HTMLForm\HTMLForm->tryAuthorizedSubmit()
#8/srv/mediawiki/php-1.45.0-wmf.21/includes/specials/redirects/SpecialMytalk.php(74)MediaWiki\HTMLForm\HTMLForm->show()
#9/srv/mediawiki/php-1.45.0-wmf.21/includes/specialpage/SpecialPage.php(725)MediaWiki\Specials\Redirects\SpecialMytalk->execute(null)
#10/srv/mediawiki/php-1.45.0-wmf.21/includes/specialpage/SpecialPageFactory.php(1744)MediaWiki\SpecialPage\SpecialPage->run(null)
#11/srv/mediawiki/php-1.45.0-wmf.21/includes/actions/ActionEntryPoint.php(499)MediaWiki\SpecialPage\SpecialPageFactory->executePath(string, MediaWiki\Context\RequestContext)
#12/srv/mediawiki/php-1.45.0-wmf.21/includes/actions/ActionEntryPoint.php(143)MediaWiki\Actions\ActionEntryPoint->performRequest()
#13/srv/mediawiki/php-1.45.0-wmf.21/includes/MediaWikiEntryPoint.php(198)MediaWiki\Actions\ActionEntryPoint->execute()
#14/srv/mediawiki/php-1.45.0-wmf.21/index.php(58)MediaWiki\MediaWikiEntryPoint->run()
#15/srv/mediawiki/w/index.php(3)require(string)
#16{main}
Impact
Notes

@Tchanders can this be moved tentatively to Done or In Progress? I'm not seeing anything left to review for this ticket (correct me if I am wrong though)

(Boldly resolving this task, as the patch was merged, and the task is in the 'Done' column of a now-archived sprint workboard. Please reopen if e.g. this is incorrect :))

If we add the filter for autocreatingTempUserToAppealBlock in the stack trace, there are no longer any errors: https://logstash.wikimedia.org/goto/c58eb54fe0d7da37826b3c139e62f606

However, other code paths are still attempting to check if a block applies to user talk without properly passing the user talk page - filed separately as T411242.