Page MenuHomePhabricator

FileImporter: PHP Notice: Undefined index: size
Closed, ResolvedPublic1 Estimated Story PointsPRODUCTION ERROR

Description

Error
normalized_message
[{reqId}] {exception_url}   PHP Notice: Undefined index: size
exception.trace
from /srv/mediawiki/php-1.37.0-wmf.19/extensions/FileImporter/src/Remote/MediaWiki/ApiDetailRetriever.php(329)
#0 /srv/mediawiki/php-1.37.0-wmf.19/extensions/FileImporter/src/Remote/MediaWiki/ApiDetailRetriever.php(329): MWExceptionHandler::handleError(integer, string, string, integer, array)
#1 /srv/mediawiki/php-1.37.0-wmf.19/extensions/FileImporter/src/Remote/MediaWiki/ApiDetailRetriever.php(176): FileImporter\Remote\MediaWiki\ApiDetailRetriever->checkMaxRevisionAggregatedBytes(array)
#2 /srv/mediawiki/php-1.37.0-wmf.19/extensions/FileImporter/src/Services/SourceSite.php(81): FileImporter\Remote\MediaWiki\ApiDetailRetriever->getImportDetails(FileImporter\Data\SourceUrl)
#3 /srv/mediawiki/php-1.37.0-wmf.19/extensions/FileImporter/src/SpecialImportFile.php(311): FileImporter\Services\SourceSite->retrieveImportDetails(FileImporter\Data\SourceUrl)
#4 /srv/mediawiki/php-1.37.0-wmf.19/extensions/FileImporter/src/SpecialImportFile.php(229): FileImporter\SpecialImportFile->makeImportPlan(WebRequest)
#5 /srv/mediawiki/php-1.37.0-wmf.19/includes/specialpage/SpecialPage.php(646): FileImporter\SpecialImportFile->execute(NULL)
#6 /srv/mediawiki/php-1.37.0-wmf.19/includes/specialpage/SpecialPageFactory.php(1365): SpecialPage->run(NULL)
#7 /srv/mediawiki/php-1.37.0-wmf.19/includes/MediaWiki.php(314): MediaWiki\SpecialPage\SpecialPageFactory->executePath(string, RequestContext)
#8 /srv/mediawiki/php-1.37.0-wmf.19/includes/MediaWiki.php(925): MediaWiki->performRequest()
#9 /srv/mediawiki/php-1.37.0-wmf.19/includes/MediaWiki.php(559): MediaWiki->main()
#10 /srv/mediawiki/php-1.37.0-wmf.19/index.php(53): MediaWiki->run()
#11 /srv/mediawiki/php-1.37.0-wmf.19/index.php(46): wfIndexMain()
#12 /srv/mediawiki/w/index.php(3): require(string)
#13 {main}
Impact

Unclear.

Notes

These are happening at a very low rate - I looked back 2 weeks in logstash and found 8 instances.

Details

Request URL
https://commons.wikimedia.org/wiki/Special:ImportFile?clientUrl=*&importSource=*

Event Timeline

brennen renamed this task from PHP Notice: Undefined index: size to FileImporter: PHP Notice: Undefined index: size.Aug 19 2021, 6:57 PM
brennen created this task.
WMDE-Fisch triaged this task as Medium priority.Aug 20 2021, 9:47 AM

Thanks for the report!

For context: This is coming from the preview step of a planed import. The only thing that should happen here is, that the preview can not be seen and the import can not be started. So no dramatic effects and no unrecoverable inconsistencies.

We will look into this but not with the highest priority.

Change 714028 had a related patch set uploaded (by Thiemo Kreuz (WMDE); author: Thiemo Kreuz (WMDE)):

[mediawiki/extensions/FileImporter@master] Fix possible index error in ApiDetailRetriever

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

thiemowmde set the point value for this task to 1.
thiemowmde moved this task from Backlog to Tickets in sprint on the Move-Files-To-Commons board.

Turned out to be more trivial than expected. I don't think this needs further investigation.

Looks like this was intended to go into the current sprint.

Change 714028 merged by jenkins-bot:

[mediawiki/extensions/FileImporter@master] Fix possible index error in ApiDetailRetriever

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

thiemowmde moved this task from Demo to Done on the WMDE-TechWish-Sprint-2021-08-18 board.