Page MenuHomePhabricator

Publishing a translation fails with Error converting HTML to wikitext: docserver-http: HTTP 500: {"type":"https://mediawiki.org/wiki/HyperSwitch/errors/unknown_error
Closed, ResolvedPublic

Description

A Hebrew Wikipedia user cannot publish a CX article. When he pushes "Publish", he gets "cx-publish-error-unknown" ("Unknown unrecoverable error has occurred"), and the details are:

Error converting HTML to wikitext: docserver-http: HTTP 500: {"type":"https://mediawiki.org/wiki/HyperSwitch/errors/unknown_error

It's a translation of [[Harry Babasin]] from English to Hebrew (הארי באבאסין).

Event Timeline

Amire80 created this task.May 13 2020, 11:05 AM
Restricted Application added a subscriber: Aklapper. · View Herald TranscriptMay 13 2020, 11:05 AM

Restbase 500 is logged in https://logstash.wikimedia.org/app/kibana#/doc/logstash-*/logstash-restbase-2020.05.13/restbase?id=AXINe6OLV09SQyy6ROAq&_g=h@44136fa

In the response page source I can see:

<div id="mw-content-text"><div class="errorbox mw-content-ltr">[bf7efa90-9500-11ea-83ca-f13dd46edb09] 2020-05-13 10:01:43: שגיאה חמורה מסוג &quot;ArgumentCountError&quot;</div>
<!-- Set $wgShowExceptionDetails = true; at the bottom
of LocalSettings.php to show detailed debugging
information. -->

Searching with the id I find this log item: https://logstash.wikimedia.org/app/kibana#/doc/logstash-*/logstash-2020.05.13/parsoid-php?id=AXINe6OLV09SQyy6ROAT&_g=h@97fe121

t exception.file	/srv/mediawiki/php-1.35.0-wmf.31/vendor/wikimedia/parsoid/src/Html2Wt/DOMNormalizer.php:67
t exception.message	Too few arguments to function Wikimedia\Parsoid\Html2Wt\DOMNormalizer::Wikimedia\Parsoid\Html2Wt\{closure}(), 4 passed in /srv/mediawiki/php-1.35.0-wmf.31/vendor/wikimedia/parsoid/src/Html2Wt/DiffUtils.php on line 248 and exactly 5 expected
t exception.trace	#0 /srv/mediawiki/php-1.35.0-wmf.31/vendor/wikimedia/parsoid/src/Html2Wt/DiffUtils.php(248): Wikimedia\Parsoid\Html2Wt\DOMNormalizer->Wikimedia\Parsoid\Html2Wt\{closure}(DOMElement, stdClass, DOMElement, stdClass)
#1 /srv/mediawiki/php-1.35.0-wmf.31/vendor/wikimedia/parsoid/src/Html2Wt/DOMNormalizer.php(89): Wikimedia\Parsoid\Html2Wt\DiffUtils::attribsEquals(DOMElement, DOMElement, array, array)
#2 /srv/mediawiki/php-1.35.0-wmf.31/vendor/wikimedia/parsoid/src/Html2Wt/DOMNormalizer.php(114): Wikimedia\Parsoid\Html2Wt\DOMNormalizer::similar(DOMElement, DOMElement)
#3 /srv/mediawiki/php-1.35.0-wmf.31/vendor/wikimedia/parsoid/src/Html2Wt/DOMNormalizer.php(720): Wikimedia\Parsoid\Html2Wt\DOMNormalizer::mergable(DOMElement, DOMElement)
#4 /srv/mediawiki/php-1.35.0-wmf.31/vendor/wikimedia/parsoid/src/Html2Wt/DOMNormalizer.php(485): Wikimedia\Parsoid\Html2Wt\DOMNormalizer->normalizeSiblingPair(DOMElement, DOMElement)
#5 /srv/mediawiki/php-1.35.0-wmf.31/vendor/wikimedia/parsoid/src/Html2Wt/DOMNormalizer.php(623): Wikimedia\Parsoid\Html2Wt\DOMNormalizer->moveFormatTagOutsideATag(DOMElement)
#6 /srv/mediawiki/php-1.35.0-wmf.31/vendor/wikimedia/parsoid/src/Html2Wt/DOMNormalizer.php(840): Wikimedia\Parsoid\Html2Wt\DOMNormalizer->normalizeNode(DOMElement)
#7 /srv/mediawiki/php-1.35.0-wmf.31/vendor/wikimedia/parsoid/src/Html2Wt/DOMNormalizer.php(774): Wikimedia\Parsoid\Html2Wt\DOMNormalizer->processNode(DOMElement, boolean)
#8 /srv/mediawiki/php-1.35.0-wmf.31/vendor/wikimedia/parsoid/src/Html2Wt/DOMNormalizer.php(837): Wikimedia\Parsoid\Html2Wt\DOMNormalizer->processSubtree(DOMElement, boolean)
#9 /srv/mediawiki/php-1.35.0-wmf.31/vendor/wikimedia/parsoid/src/Html2Wt/DOMNormalizer.php(774): Wikimedia\Parsoid\Html2Wt\DOMNormalizer->processNode(DOMElement, boolean)
#10 /srv/mediawiki/php-1.35.0-wmf.31/vendor/wikimedia/parsoid/src/Html2Wt/DOMNormalizer.php(837): Wikimedia\Parsoid\Html2Wt\DOMNormalizer->processSubtree(DOMElement, boolean)
#11 /srv/mediawiki/php-1.35.0-wmf.31/vendor/wikimedia/parsoid/src/Html2Wt/DOMNormalizer.php(774): Wikimedia\Parsoid\Html2Wt\DOMNormalizer->processNode(DOMElement, boolean)
#12 /srv/mediawiki/php-1.35.0-wmf.31/vendor/wikimedia/parsoid/src/Html2Wt/DOMNormalizer.php(837): Wikimedia\Parsoid\Html2Wt\DOMNormalizer->processSubtree(DOMElement, boolean)
#13 /srv/mediawiki/php-1.35.0-wmf.31/vendor/wikimedia/parsoid/src/Html2Wt/DOMNormalizer.php(863): Wikimedia\Parsoid\Html2Wt\DOMNormalizer->processNode(DOMElement, boolean)
#14 /srv/mediawiki/php-1.35.0-wmf.31/vendor/wikimedia/parsoid/src/Html2Wt/WikitextSerializer.php(1647): Wikimedia\Parsoid\Html2Wt\DOMNormalizer->normalize(DOMElement)
#15 /srv/mediawiki/php-1.35.0-wmf.31/vendor/wikimedia/parsoid/src/Core/WikitextContentModelHandler.php(107): Wikimedia\Parsoid\Html2Wt\WikitextSerializer->serializeDOM(DOMElement)
#16 /srv/mediawiki/php-1.35.0-wmf.31/vendor/wikimedia/parsoid/src/Parsoid.php(267): Wikimedia\Parsoid\Core\WikitextContentModelHandler->fromDOM(Wikimedia\Parsoid\Config\Env, DOMDocument, NULL)
#17 /srv/mediawiki/php-1.35.0-wmf.31/vendor/wikimedia/parsoid/extension/src/Rest/Handler/ParsoidHandler.php(785): Wikimedia\Parsoid\Parsoid->html2wikitext(MWParsoid\Config\PageConfig, string, array, NULL)
#18 /srv/mediawiki/php-1.35.0-wmf.31/vendor/wikimedia/parsoid/extension/src/Rest/Handler/TransformHandler.php(95): MWParsoid\Rest\Handler\ParsoidHandler->html2wt(MWParsoid\Config\PageConfig, array, string)
#19 /srv/mediawiki/php-1.35.0-wmf.31/includes/Rest/Router.php(353): MWParsoid\Rest\Handler\TransformHandler->execute()
#20 /srv/mediawiki/php-1.35.0-wmf.31/includes/Rest/Router.php(308): MediaWiki\Rest\Router->executeHandler(MWParsoid\Rest\Handler\TransformHandler)
#21 /srv/mediawiki/php-1.35.0-wmf.31/includes/Rest/EntryPoint.php(138): MediaWiki\Rest\Router->execute(MediaWiki\Rest\RequestFromGlobals)
#22 /srv/mediawiki/php-1.35.0-wmf.31/includes/Rest/EntryPoint.php(105): MediaWiki\Rest\EntryPoint->execute()
#23 /srv/mediawiki/php-1.35.0-wmf.31/rest.php(31): MediaWiki\Rest\EntryPoint::main()
#24 /srv/mediawiki/w/rest.php(3): require(string)
#25 {main}
t exception_id	bf7efa90-9500-11ea-83ca-f13dd46edb09
t exception_url	/w/rest.php/he.wikipedia.org/v3/transform/html/to/wikitext/%D7%94%D7%90%D7%A8%D7%99_%D7%91%D7%90%D7%91%D7%90%D7%A1%D7%99%D7%9F

Less than 10 instances of this error in past 7 days, mostly from he.wikipedia.org.

Adding parsing because I don't know how to debug further.

Change 596246 had a related patch set uploaded (by Subramanya Sastry; owner: Subramanya Sastry):
[mediawiki/services/parsoid@master] DOMNormalizer: Fix method signature causing production crashers

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

ssastry claimed this task.May 13 2020, 4:09 PM
ssastry triaged this task as Medium priority.
ssastry removed a project: Parsing-Team--ARCHIVED.

Change 596246 merged by jenkins-bot:
[mediawiki/services/parsoid@master] DOMNormalizer: Fix method signature causing production crashers

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

ssastry closed this task as Resolved.May 13 2020, 7:30 PM

This will go out next week.

Change 598567 had a related patch set uploaded (by Subramanya Sastry; owner: Subramanya Sastry):
[mediawiki/vendor@master] Bump Parsoid to 0.12.0-a14

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

Change 598567 merged by jenkins-bot:
[mediawiki/vendor@master] Bump Parsoid to 0.12.0-a14

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