Page MenuHomePhabricator

RuntimeException: Too many accounts found to block.
Open, Needs TriagePublicPRODUCTION ERROR

Description

What is the problem?

On Special:Block, if a temporary account has more than 15 associated temp accounts the Block all associated temporary accounts checkbox is disabled. However, after creating a new block, editing an existing block or removing a block the checkbox becomes enabled. If you check it and try to create a block you get an exception [e3af9d2f64329f8f6e390171] Exception caught: Too many accounts found to block.

Full exception from API:

{"errors":[{"code":"internal_api_error_RuntimeException","html":"[9e933aba3fc24a02edb014af] Exception caught: Too many accounts found to block.","data":{"errorclass":"RuntimeException"}}],"trace":"RuntimeException at /var/www/html/w/extensions/CheckUser/src/HookHandler/BlockConnectedAccounts.php(74)\nfrom /var/www/html/w/extensions/CheckUser/src/HookHandler/BlockConnectedAccounts.php(74)\n#0 /var/www/html/w/includes/HookContainer/HookContainer.php(135): MediaWiki\\Extension\\CheckUser\\HookHandler\\BlockConnectedAccounts->onApiBlockSucceeded()\n#1 /var/www/html/w/includes/Api/ApiHookRunner.php(85): MediaWiki\\HookContainer\\HookContainer->run()\n#2 /var/www/html/w/includes/Api/ApiBlock.php(120): MediaWiki\\Api\\ApiHookRunner->onApiBlockSucceeded()\n#3 /var/www/html/w/includes/Api/ApiMain.php(2059): MediaWiki\\Api\\ApiBlock->execute()\n#4 /var/www/html/w/includes/Api/ApiMain.php(964): MediaWiki\\Api\\ApiMain->executeAction()\n#5 /var/www/html/w/includes/Api/ApiMain.php(935): MediaWiki\\Api\\ApiMain->executeActionWithErrorHandling()\n#6 /var/www/html/w/includes/Api/ApiEntryPoint.php(138): MediaWiki\\Api\\ApiMain->execute()\n#7 /var/www/html/w/includes/MediaWikiEntryPoint.php(180): MediaWiki\\Api\\ApiEntryPoint->execute()\n#8 /var/www/html/w/api.php(30): MediaWiki\\MediaWikiEntryPoint->run()\n#9 {main}","servedby":"ee04981fa12e"}
Steps to reproduce problem
  1. Login as a user who can see associated temporary accounts (having the checkuser-temporary-account right(?))
  2. Find a temporary account with more than 15 associated temporary accounts
  3. Go to Special:Block/<temp account> for the temp account you found in step 2
  4. Create a new block

Expected behaviour: The Block all associated temporary accounts checkbox remains disabled and the yellow warning There are too many associated temporary accounts to add to this block...
Observed behaviour: The Block all associated temporary accounts checkbox is enabled and the yellow warning This will apply the block to n accounts...

Environment

Browser: Firefox 140
Wiki(s): local docker MediaWiki 1.46.0-alpha (922490d) 07:34, 9 April 2026. CheckUser 2.5 (dc5c690) 07:50, 9 April 2026.

Event Timeline

Aklapper renamed this task from Exception caught: Too many accounts found to block to RuntimeException: Too many accounts found to block..May 13 2026, 4:25 PM
Aklapper changed the subtype of this task from "Bug Report" to "Production Error".

This shows up in Logstash; I assume this is the same problem:

Error
  • service.version: 1.47.0-wmf.1
  • timestamp: 2026-05-13T10:19:34.255Z
  • labels.phpversion: 8.3.30
  • trace.id: a7e3f329-04dc-4ffe-ac11-a107be413d4b
  • Find trace.id in Logstash
labels.normalized_message
[{reqId}] {exception_url}   RuntimeException: Too many accounts found to block.
FrameLocationCall
from/srv/mediawiki/php-1.47.0-wmf.1/extensions/CheckUser/src/HookHandler/BlockConnectedAccounts.php(75)
#0/srv/mediawiki/php-1.47.0-wmf.1/includes/HookContainer/HookContainer.php(127)MediaWiki\Extension\CheckUser\HookHandler\BlockConnectedAccounts->onApiBlockSucceeded(MediaWiki\Api\ApiBlock, MediaWiki\User\User, MediaWiki\User\UserIdentityValue, array, array)
#1/srv/mediawiki/php-1.47.0-wmf.1/includes/Api/ApiHookRunner.php(85)MediaWiki\HookContainer\HookContainer->run(string, array)
#2/srv/mediawiki/php-1.47.0-wmf.1/includes/Api/ApiBlock.php(120)MediaWiki\Api\ApiHookRunner->onApiBlockSucceeded(MediaWiki\Api\ApiBlock, MediaWiki\User\User, MediaWiki\User\UserIdentityValue, array, array)
#3/srv/mediawiki/php-1.47.0-wmf.1/includes/Api/ApiMain.php(2045)MediaWiki\Api\ApiBlock->execute()
#4/srv/mediawiki/php-1.47.0-wmf.1/includes/Api/ApiMain.php(949)MediaWiki\Api\ApiMain->executeAction()
#5/srv/mediawiki/php-1.47.0-wmf.1/includes/Api/ApiMain.php(920)MediaWiki\Api\ApiMain->executeActionWithErrorHandling()
#6/srv/mediawiki/php-1.47.0-wmf.1/includes/Api/ApiEntryPoint.php(138)MediaWiki\Api\ApiMain->execute()
#7/srv/mediawiki/php-1.47.0-wmf.1/includes/MediaWikiEntryPoint.php(180)MediaWiki\Api\ApiEntryPoint->execute()
#8/srv/mediawiki/php-1.47.0-wmf.1/api.php(30)MediaWiki\MediaWikiEntryPoint->run()
#9/srv/mediawiki/w/api.php(3)require(string)
#10{main}

Change #1287938 had a related patch set uploaded (by Kosta Harlan; author: Kosta Harlan):

[mediawiki/extensions/CheckUser@master] blockConnectedTempAccountsField: Keep limit warning after form reset

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

Change #1287938 merged by jenkins-bot:

[mediawiki/extensions/CheckUser@master] blockConnectedTempAccountsField: Keep limit warning after form reset

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