Page MenuHomePhabricator

Internal error from MachineVision on action=info for files: argument to RandomWikidataIdHandler must be WikidataDepictsSetter, LabelResolver given
Closed, ResolvedPublic

Description

On the Beta Cluster, I get this error when accessing the page information for any file (regardless of whether it has structured data or not):

[XYii-6wQBHcAAE0x4u8AAABK] /w/index.php?title=File:Eglise_Coll%C3%A9giale_%C3%A0_Saint-Emilion_-_J-A_Brutails_-_Universit%C3%A9_Bordeaux_Montaigne_-_0012.jpg&action=info TypeError from line 25 of /srv/mediawiki/php-master/extensions/MachineVision/src/Handler/RandomWikidataIdHandler.php: Argument 3 passed to MediaWiki\Extension\MachineVision\Handler\RandomWikidataIdHandler::__construct() must be an instance of MediaWiki\Extension\MachineVision\Handler\WikidataDepictsSetter, instance of MediaWiki\Extension\MachineVision\Handler\LabelResolver given, called in /srv/mediawiki/php-master/vendor/wikimedia/object-factory/src/ObjectFactory.php on line 184

Backtrace:

#0 /srv/mediawiki/php-master/vendor/wikimedia/object-factory/src/ObjectFactory.php(184): MediaWiki\Extension\MachineVision\Handler\RandomWikidataIdHandler->__construct(MediaWiki\Extension\MachineVision\Client, MediaWiki\Extension\MachineVision\Repository, MediaWiki\Extension\MachineVision\Handler\LabelResolver, string)
#1 /srv/mediawiki/php-master/vendor/wikimedia/object-factory/src/ObjectFactory.php(102): Wikimedia\ObjectFactory::getObjectFromSpec(array, array)
#2 /srv/mediawiki/php-master/extensions/MachineVision/src/Handler/Registry.php(51): Wikimedia\ObjectFactory->createObject(array, array)
#3 /srv/mediawiki/php-master/extensions/MachineVision/src/Handler/Registry.php(41): MediaWiki\Extension\MachineVision\Handler\Registry->getAllHandlers()
#4 /srv/mediawiki/php-master/extensions/MachineVision/src/Hooks.php(60): MediaWiki\Extension\MachineVision\Handler\Registry->getHandlers(LocalFile)
#5 /srv/mediawiki/php-master/includes/Hooks.php(174): MediaWiki\Extension\MachineVision\Hooks::onInfoAction(RequestContext, array)
#6 /srv/mediawiki/php-master/includes/Hooks.php(202): Hooks::callHook(string, array, array, NULL)
#7 /srv/mediawiki/php-master/includes/actions/InfoAction.php(127): Hooks::run(string, array)
#8 /srv/mediawiki/php-master/includes/actions/FormlessAction.php(43): InfoAction->onView()
#9 /srv/mediawiki/php-master/includes/MediaWiki.php(507): FormlessAction->show()
#10 /srv/mediawiki/php-master/includes/MediaWiki.php(302): MediaWiki->performAction(ImagePage, Title)
#11 /srv/mediawiki/php-master/includes/MediaWiki.php(892): MediaWiki->performRequest()
#12 /srv/mediawiki/php-master/includes/MediaWiki.php(523): MediaWiki->main()
#13 /srv/mediawiki/php-master/index.php(44): MediaWiki->run()
#14 /srv/mediawiki/w/index.php(3): require(string)
#15 {main}

Example URLs: file has structured data, file used to have structured data, file never had structured data.

I can’t find any occurrences of this error in Beta Logstash, not even my own error pasted above (presumably due to T233134: logstash-beta.wmflabs.org does not receive any mediawiki events), so I don’t know how new this error is.

Event Timeline

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

@Mholloway thoughts? Beta is pretty borked right now 😿

Sorry, pretty sure a config needs updating. Will do now.

Change 538685 had a related patch set uploaded (by Mholloway; owner: Michael Holloway):
[operations/mediawiki-config@master] MachineVision: Update active Handler config

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

Change 538685 merged by Mholloway:
[operations/mediawiki-config@master] MachineVision: Update active Handler config

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

Mentioned in SAL (#wikimedia-operations) [2019-09-23T17:54:28Z] <mholloway-shell@deploy1001> Synchronized wmf-config/InitialiseSettings-labs.php: MachineVision: Update active handler config (T233610) (duration: 00m 58s)

Change 538687 had a related patch set uploaded (by Mholloway; owner: Michael Holloway):
[operations/mediawiki-config@master] MachineVision: Update active Handler config, take 2

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

Change 538687 merged by Mholloway:
[operations/mediawiki-config@master] MachineVision: Update active Handler config, take 2

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

Mentioned in SAL (#wikimedia-operations) [2019-09-23T18:51:44Z] <mholloway-shell@deploy1001> Synchronized wmf-config/InitialiseSettings-labs.php: MachineVision: Update active handler config, take 2 (T233610) (duration: 00m 56s)

Mholloway claimed this task.