Page MenuHomePhabricator

Fatal exception of type "TypeError" when trying to import [[w:vi:Tập tin:Sơ đồ thành cổ Tân Sở.svg]]
Closed, ResolvedPublic2 Estimated Story PointsPRODUCTION ERROR

Description

Trying to import w:vi:Tập tin:Sơ đồ thành cổ Tân Sở.svg to Commons using FileImporter results in a TypeError. The FileImporter interface loads and works correctly, the error occurs when clicking the Import button.

Originally reported here: https://www.mediawiki.org/wiki/Topic:Vshev99tvd3fk5y0

Error message
[e6ab6c34-c2d3-4c77-b67f-61e2e0febd63] 2020-08-21 17:00:37: Fatal exception of type "TypeError"
Impact
  1. Notes

Details

Request ID
e6ab6c34-c2d3-4c77-b67f-61e2e0febd63
Request URL
https://commons.wikimedia.org/wiki/Special:ImportFile
Stack Trace
Argument 3 passed to FileImporter\Services\WikiRevisionFactory::newWikiRevision() must be of the type string, null given, called in /srv/mediawiki/php-1.36.0-wmf.5/extensions/FileImporter/src/Services/WikiRevisionFactory.php on line 105

#0 /srv/mediawiki/php-1.36.0-wmf.5/extensions/FileImporter/src/Services/WikiRevisionFactory.php(105): FileImporter\Services\WikiRevisionFactory->newWikiRevision(string, string, NULL)
#1 /srv/mediawiki/php-1.36.0-wmf.5/extensions/FileImporter/src/Operations/TextRevisionFromTextRevision.php(95): FileImporter\Services\WikiRevisionFactory->newFromTextRevision(FileImporter\Data\TextRevision)
#2 /srv/mediawiki/php-1.36.0-wmf.5/extensions/FileImporter/src/Data/ImportOperations.php(102): FileImporter\Operations\TextRevisionFromTextRevision->prepare()
#3 /srv/mediawiki/php-1.36.0-wmf.5/extensions/FileImporter/src/Data/ImportOperations.php(82): FileImporter\Data\ImportOperations->FileImporter\Data\{closure}(FileImporter\Operations\TextRevisionFromTextRevision)
#4 /srv/mediawiki/php-1.36.0-wmf.5/extensions/FileImporter/src/Data/ImportOperations.php(103): FileImporter\Data\ImportOperations->runOperations(integer, integer, boolean, Closure)
#5 /srv/mediawiki/php-1.36.0-wmf.5/extensions/FileImporter/src/Services/Importer.php(264): FileImporter\Data\ImportOperations->prepare()
#6 /srv/mediawiki/php-1.36.0-wmf.5/extensions/FileImporter/src/Services/Importer.php(159): FileImporter\Services\Importer->prepareImportOperations(FileImporter\Data\ImportOperations)
#7 /srv/mediawiki/php-1.36.0-wmf.5/extensions/FileImporter/src/SpecialImportFile.php(334): FileImporter\Services\Importer->import(User, FileImporter\Data\ImportPlan)
#8 /srv/mediawiki/php-1.36.0-wmf.5/extensions/FileImporter/src/SpecialImportFile.php(235): FileImporter\SpecialImportFile->doImport(FileImporter\Data\ImportPlan)
#9 /srv/mediawiki/php-1.36.0-wmf.5/extensions/FileImporter/src/SpecialImportFile.php(200): FileImporter\SpecialImportFile->handleAction(string, FileImporter\Data\ImportPlan)
#10 /srv/mediawiki/php-1.36.0-wmf.5/includes/specialpage/SpecialPage.php(600): FileImporter\SpecialImportFile->execute(NULL)
#11 /srv/mediawiki/php-1.36.0-wmf.5/includes/specialpage/SpecialPageFactory.php(681): SpecialPage->run(NULL)
#12 /srv/mediawiki/php-1.36.0-wmf.5/includes/MediaWiki.php(307): MediaWiki\SpecialPage\SpecialPageFactory->executePath(Title, RequestContext)
#13 /srv/mediawiki/php-1.36.0-wmf.5/includes/MediaWiki.php(940): MediaWiki->performRequest()
#14 /srv/mediawiki/php-1.36.0-wmf.5/includes/MediaWiki.php(543): MediaWiki->main()
#15 /srv/mediawiki/php-1.36.0-wmf.5/index.php(53): MediaWiki->run()
#16 /srv/mediawiki/php-1.36.0-wmf.5/index.php(46): wfIndexMain()
#17 /srv/mediawiki/w/index.php(3): require(string)
#18 {main}

Event Timeline

I would need a stack trace to work on this.

Here's a logstash filter for the exception, but since there's nothing private in the stack trace I'll paste it here. This was on commonswiki.

Argument 3 passed to FileImporter\Services\WikiRevisionFactory::newWikiRevision() must be of the type string, null given, called in /srv/mediawiki/php-1.36.0-wmf.5/extensions/FileImporter/src/Services/WikiRevisionFactory.php on line 105

#0 /srv/mediawiki/php-1.36.0-wmf.5/extensions/FileImporter/src/Services/WikiRevisionFactory.php(105): FileImporter\Services\WikiRevisionFactory->newWikiRevision(string, string, NULL)
#1 /srv/mediawiki/php-1.36.0-wmf.5/extensions/FileImporter/src/Operations/TextRevisionFromTextRevision.php(95): FileImporter\Services\WikiRevisionFactory->newFromTextRevision(FileImporter\Data\TextRevision)
#2 /srv/mediawiki/php-1.36.0-wmf.5/extensions/FileImporter/src/Data/ImportOperations.php(102): FileImporter\Operations\TextRevisionFromTextRevision->prepare()
#3 /srv/mediawiki/php-1.36.0-wmf.5/extensions/FileImporter/src/Data/ImportOperations.php(82): FileImporter\Data\ImportOperations->FileImporter\Data\{closure}(FileImporter\Operations\TextRevisionFromTextRevision)
#4 /srv/mediawiki/php-1.36.0-wmf.5/extensions/FileImporter/src/Data/ImportOperations.php(103): FileImporter\Data\ImportOperations->runOperations(integer, integer, boolean, Closure)
#5 /srv/mediawiki/php-1.36.0-wmf.5/extensions/FileImporter/src/Services/Importer.php(264): FileImporter\Data\ImportOperations->prepare()
#6 /srv/mediawiki/php-1.36.0-wmf.5/extensions/FileImporter/src/Services/Importer.php(159): FileImporter\Services\Importer->prepareImportOperations(FileImporter\Data\ImportOperations)
#7 /srv/mediawiki/php-1.36.0-wmf.5/extensions/FileImporter/src/SpecialImportFile.php(334): FileImporter\Services\Importer->import(User, FileImporter\Data\ImportPlan)
#8 /srv/mediawiki/php-1.36.0-wmf.5/extensions/FileImporter/src/SpecialImportFile.php(235): FileImporter\SpecialImportFile->doImport(FileImporter\Data\ImportPlan)
#9 /srv/mediawiki/php-1.36.0-wmf.5/extensions/FileImporter/src/SpecialImportFile.php(200): FileImporter\SpecialImportFile->handleAction(string, FileImporter\Data\ImportPlan)
#10 /srv/mediawiki/php-1.36.0-wmf.5/includes/specialpage/SpecialPage.php(600): FileImporter\SpecialImportFile->execute(NULL)
#11 /srv/mediawiki/php-1.36.0-wmf.5/includes/specialpage/SpecialPageFactory.php(681): SpecialPage->run(NULL)
#12 /srv/mediawiki/php-1.36.0-wmf.5/includes/MediaWiki.php(307): MediaWiki\SpecialPage\SpecialPageFactory->executePath(Title, RequestContext)
#13 /srv/mediawiki/php-1.36.0-wmf.5/includes/MediaWiki.php(940): MediaWiki->performRequest()
#14 /srv/mediawiki/php-1.36.0-wmf.5/includes/MediaWiki.php(543): MediaWiki->main()
#15 /srv/mediawiki/php-1.36.0-wmf.5/index.php(53): MediaWiki->run()
#16 /srv/mediawiki/php-1.36.0-wmf.5/index.php(46): wfIndexMain()
#17 /srv/mediawiki/w/index.php(3): require(string)
#18 {main}
JJMC89 updated the task description. (Show Details)Aug 22 2020, 9:35 AM
JJMC89 edited Stack Trace. (Show Details)
JJMC89 edited Stack Trace. (Show Details)

Change 621884 had a related patch set uploaded (by Thiemo Kreuz (WMDE); owner: Thiemo Kreuz (WMDE)):
[mediawiki/extensions/FileImporter@master] [WIP] Fix WikiRevisionFactory failing with sha1 missing

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

thiemowmde updated the task description. (Show Details)Aug 23 2020, 8:18 AM
thiemowmde moved this task from Sprint Backlog to Review on the WMDE-QWERTY-Sprint-2020-08-12 board.
thiemowmde set the point value for this task to 2.

Change 621884 merged by jenkins-bot:
[mediawiki/extensions/FileImporter@master] Fix WikiRevisionFactory failing with SHA1 missing

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

Lena_WMDE closed this task as Resolved.Aug 25 2020, 11:39 AM