Page MenuHomePhabricator

Argument 4 passed to GoogleCloudVisionHandler must be an instance of WikidataDepictsSetter
Closed, ResolvedPublicPRODUCTION ERROR

Description

Error

MediaWiki version: 1.35.0-wmf.16

message
Argument 4 passed to MediaWiki\Extension\MachineVision\Handler\GoogleCloudVisionHandler::__construct() must be an instance of MediaWiki\Extension\MachineVision\Handler\WikidataDepictsSetter, instance of MediaWiki\Extension\MachineVision\Handler\LabelResolver given, called in /srv/mediawiki/php-1.35.0-wmf.16/vendor/wikimedia/object-factory/src/ObjectFactory.php on line 184
exception.trace
#0 /srv/mediawiki/php-1.35.0-wmf.16/vendor/wikimedia/object-factory/src/ObjectFactory.php(184): MediaWiki\Extension\MachineVision\Handler\GoogleCloudVisionHandler->__construct(MediaWiki\Extension\MachineVision\Job\FetchGoogleCloudVisionAnnotationsJobFactory, MediaWiki\Extension\MachineVision\Repository, RepoGroup, MediaWiki\Extension\MachineVision\Handler\LabelResolver)
#1 /srv/mediawiki/php-1.35.0-wmf.16/vendor/wikimedia/object-factory/src/ObjectFactory.php(102): Wikimedia\ObjectFactory::getObjectFromSpec(array, array)
#2 /srv/mediawiki/php-1.35.0-wmf.16/extensions/MachineVision/src/Handler/Registry.php(52): Wikimedia\ObjectFactory->createObject(array, array)
#3 /srv/mediawiki/php-1.35.0-wmf.16/extensions/MachineVision/src/Handler/Registry.php(41): MediaWiki\Extension\MachineVision\Handler\Registry->getAllHandlers()
#4 /srv/mediawiki/php-1.35.0-wmf.16/extensions/MachineVision/src/Hooks.php(58): MediaWiki\Extension\MachineVision\Handler\Registry->getHandlers(LocalFile)
#5 /srv/mediawiki/php-1.35.0-wmf.16/includes/Hooks.php(174): MediaWiki\Extension\MachineVision\Hooks::onUploadComplete(UploadFromStash)
#6 /srv/mediawiki/php-1.35.0-wmf.16/includes/Hooks.php(202): Hooks::callHook(string, array, array, NULL)
#7 /srv/mediawiki/php-1.35.0-wmf.16/includes/upload/UploadBase.php(932): Hooks::run(string, array)
#8 /srv/mediawiki/php-1.35.0-wmf.16/includes/api/ApiUpload.php(828): UploadBase->performUpload(string, string, boolean, User, array)
#9 /srv/mediawiki/php-1.35.0-wmf.16/includes/api/ApiUpload.php(147): ApiUpload->performUpload(array)
#10 /srv/mediawiki/php-1.35.0-wmf.16/includes/api/ApiUpload.php(104): ApiUpload->getContextResult()
#11 /srv/mediawiki/php-1.35.0-wmf.16/includes/api/ApiMain.php(1603): ApiUpload->execute()
#12 /srv/mediawiki/php-1.35.0-wmf.16/includes/api/ApiMain.php(539): ApiMain->executeAction()
#13 /srv/mediawiki/php-1.35.0-wmf.16/includes/api/ApiMain.php(510): ApiMain->executeActionWithErrorHandling()
#14 /srv/mediawiki/php-1.35.0-wmf.16/api.php(78): ApiMain->execute()
#15 /srv/mediawiki/w/api.php(3): require(string)
#16 {main}

Impact

Notes

800 instances of this error in the past hour, it wasn't seen before then.

Details

Request ID
Xj2f@wpAMDgAACDFLvMAAACF
Request URL
https://commons.wikimedia.org/w/api.php

Event Timeline

Restricted Application added a subscriber: Aklapper. · View Herald Transcript
Mholloway lowered the priority of this task from Unbreak Now! to High.Feb 7 2020, 6:01 PM
Mholloway subscribed.

This is already resolved. The config change at issue was reverted.

As a follow-up, we'll backport the relevant code change to wmf.16 and re-deploy the config change so it's one less thing to trip over when wmf.18 rolls forward. We'll coordinate with Greg for an appropriate time.

Mholloway claimed this task.

The change was backported to wmf.16 earlier this morning.