Page MenuHomePhabricator

TypeError: MediaWiki\Extension\CampaignEvents\Event\Store\EventStore::MediaWiki\Extension\CampaignEvents\Event\Store\{closure}(): Argument #1 ($oldValue) must be of type MediaWiki\Extension\CampaignEvents\Event\ExistingEventReg
Closed, ResolvedPublicPRODUCTION ERROR

Description

Error
  • service.version: 1.45.0-wmf.14
  • timestamp: 2025-08-14T18:30:28.663Z
  • labels.phpversion: 8.1.33
  • trace.id: 160e09bf-5650-4e5b-9efd-fb5f1e5c312f
  • Find trace.id in Logstash
labels.normalized_message
[{reqId}] {exception_url}   TypeError: MediaWiki\Extension\CampaignEvents\Event\Store\EventStore::MediaWiki\Extension\CampaignEvents\Event\Store\{closure}(): Argument #1 ($oldValue) must be of type MediaWiki\Extension\CampaignEvents\Event\ExistingEventReg
FrameLocationCall
from/srv/mediawiki/php-1.45.0-wmf.14/extensions/CampaignEvents/src/Event/Store/EventStore.php(125)
#0/srv/mediawiki/php-1.45.0-wmf.14/includes/libs/objectcache/WANObjectCache.php(1842)MediaWiki\Extension\CampaignEvents\Event\Store\EventStore->MediaWiki\Extension\CampaignEvents\Event\Store\{closure}(null, int, array, float, array)
#1/srv/mediawiki/php-1.45.0-wmf.14/includes/libs/objectcache/WANObjectCache.php(2605)Wikimedia\ObjectCache\WANObjectCache->fetchOrRegenerate(string, int, Closure, array, array)
#2/srv/mediawiki/php-1.45.0-wmf.14/includes/deferred/MWCallableUpdate.php(52)Wikimedia\ObjectCache\WANObjectCache->Wikimedia\ObjectCache\{closure}(string)
#3/srv/mediawiki/php-1.45.0-wmf.14/includes/deferred/DeferredUpdates.php(459)MediaWiki\Deferred\MWCallableUpdate->doUpdate()
#4/srv/mediawiki/php-1.45.0-wmf.14/includes/deferred/DeferredUpdates.php(201)MediaWiki\Deferred\DeferredUpdates::attemptUpdate(MediaWiki\Deferred\MWCallableUpdate)
#5/srv/mediawiki/php-1.45.0-wmf.14/includes/deferred/DeferredUpdates.php(288)MediaWiki\Deferred\DeferredUpdates::run(MediaWiki\Deferred\MWCallableUpdate)
#6/srv/mediawiki/php-1.45.0-wmf.14/includes/deferred/DeferredUpdatesScope.php(243)MediaWiki\Deferred\DeferredUpdates::MediaWiki\Deferred\{closure}(MediaWiki\Deferred\MWCallableUpdate, int)
#7/srv/mediawiki/php-1.45.0-wmf.14/includes/deferred/DeferredUpdatesScope.php(172)MediaWiki\Deferred\DeferredUpdatesScope->processStageQueue(int, int, Closure)
#8/srv/mediawiki/php-1.45.0-wmf.14/includes/deferred/DeferredUpdates.php(307)MediaWiki\Deferred\DeferredUpdatesScope->processUpdates(int, Closure)
#9/srv/mediawiki/php-1.45.0-wmf.14/includes/MediaWikiEntryPoint.php(670)MediaWiki\Deferred\DeferredUpdates::doUpdates()
#10/srv/mediawiki/php-1.45.0-wmf.14/includes/MediaWikiEntryPoint.php(492)MediaWiki\MediaWikiEntryPoint->restInPeace()
#11/srv/mediawiki/php-1.45.0-wmf.14/includes/MediaWikiEntryPoint.php(450)MediaWiki\MediaWikiEntryPoint->doPostOutputShutdown()
#12/srv/mediawiki/php-1.45.0-wmf.14/includes/MediaWikiEntryPoint.php(207)MediaWiki\MediaWikiEntryPoint->postOutputShutdown()
#13/srv/mediawiki/php-1.45.0-wmf.14/index.php(58)MediaWiki\MediaWikiEntryPoint->run()
#14/srv/mediawiki/w/index.php(3)require(string)
#15{main}
Impact
Notes

Details

Request URL
https://shn.wikipedia.org/wiki/%E1%80%9D%E1%80%AE%E1%82%87%E1%81%B6%E1%80%AE%E1%82%87%E1%81%BD%E1%80%AE%E1%80%B8%E1%80%90%E1%80%AE%E1%80%B8%E1%80%9A%E1%82%83%E1%80%B8:%E1%80%91%E1%80%BD%E1%82%86%E1%82%88%E1%81%B5%E1%82%82%E1%81%A2%E1%80%99%E1%80%BA%E1%80%B8
Related Changes in Gerrit:

Event Timeline

This one looks new with wmf.14, not seeing this for any other version. Tagging in @Daimona after checking out what's new in CampaignEvent this week.

Apologies, I was OOO. This was most definitely introduced in r1176696. I trusted the existing doc comment more than I should have and turned into a type declaration.

Change #1179715 had a related patch set uploaded (by Daimona Eaytoy; author: Daimona Eaytoy):

[mediawiki/extensions/CampaignEvents@master] Fix type declaration for nonexistent event cache

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

Daimona triaged this task as Unbreak Now! priority.Aug 18 2025, 2:58 PM

The error itself should be harmless from a user's perspective because it happens in a deferred update. And also from MW's perspective, the only impact is that certain values are not cached, so very minimal. However, it does result in a relatively high volume of uncaught exceptions (currently at 9151 occurrences since last week, out of ~86k total messages in the "exception" channel, so marking as UBN due to logspam (also because the fix is trivial).

Change #1179715 merged by jenkins-bot:

[mediawiki/extensions/CampaignEvents@master] Fix type declaration for nonexistent event cache

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

Change #1179725 had a related patch set uploaded (by Daimona Eaytoy; author: Daimona Eaytoy):

[mediawiki/extensions/CampaignEvents@wmf/1.45.0-wmf.14] Fix type declaration for nonexistent event cache

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

Change #1179725 merged by jenkins-bot:

[mediawiki/extensions/CampaignEvents@wmf/1.45.0-wmf.14] Fix type declaration for nonexistent event cache

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

Mentioned in SAL (#wikimedia-operations) [2025-08-18T16:06:04Z] <jdrewniak@deploy1003> Started scap sync-world: Backport for [[gerrit:1179725|Fix type declaration for nonexistent event cache (T401952)]]

Mentioned in SAL (#wikimedia-operations) [2025-08-18T16:07:55Z] <jdrewniak@deploy1003> daimona, jdrewniak: Backport for [[gerrit:1179725|Fix type declaration for nonexistent event cache (T401952)]] synced to the testservers (see https://wikitech.wikimedia.org/wiki/Mwdebug). Changes can now be verified there.

Mentioned in SAL (#wikimedia-operations) [2025-08-18T16:17:18Z] <jdrewniak@deploy1003> Finished scap sync-world: Backport for [[gerrit:1179725|Fix type declaration for nonexistent event cache (T401952)]] (duration: 11m 13s)

I confirmed that the error rate in logstash went to 0 after the deployment, hence closing!