Page MenuHomePhabricator

Invariant failed: Bad UTF-8 at start of string
Closed, ResolvedPublicPRODUCTION ERROR

Description

Error

MediaWiki version: 1.36.0-wmf.33

message
Invariant failed: Bad UTF-8 at start of string
exception.trace
from /srv/mediawiki/php-1.36.0-wmf.33/vendor/wikimedia/assert/src/Assert.php(224)
#0 /srv/mediawiki/php-1.36.0-wmf.33/vendor/wikimedia/parsoid/src/Utils/PHPUtils.php(192): Wikimedia\Assert\Assert::invariant(boolean, string)
#1 /srv/mediawiki/php-1.36.0-wmf.33/vendor/wikimedia/parsoid/src/Tokens/SourceRange.php(82): Wikimedia\Parsoid\Utils\PHPUtils::safeSubstr(string, integer, integer)
#2 /srv/mediawiki/php-1.36.0-wmf.33/vendor/wikimedia/parsoid/src/Wt2Html/PP/Processors/WrapTemplates.php(1041): Wikimedia\Parsoid\Tokens\SourceRange->substr(string)
#3 /srv/mediawiki/php-1.36.0-wmf.33/vendor/wikimedia/parsoid/src/Wt2Html/PP/Processors/WrapTemplates.php(1204): Wikimedia\Parsoid\Wt2Html\PP\Processors\WrapTemplates::encapsulateTemplates(DOMDocument, Wikimedia\Parsoid\Wt2Html\PageConfigFrame, array, array)
#4 /srv/mediawiki/php-1.36.0-wmf.33/vendor/wikimedia/parsoid/src/Wt2Html/PP/Processors/WrapTemplates.php(1217): Wikimedia\Parsoid\Wt2Html\PP\Processors\WrapTemplates::wrapTemplatesInTree(DOMDocument, Wikimedia\Parsoid\Wt2Html\PageConfigFrame, DOMElement)
#5 /srv/mediawiki/php-1.36.0-wmf.33/vendor/wikimedia/parsoid/src/Wt2Html/DOMPostProcessor.php(158): Wikimedia\Parsoid\Wt2Html\PP\Processors\WrapTemplates->run(Wikimedia\Parsoid\Config\Env, DOMElement, array, boolean)
#6 /srv/mediawiki/php-1.36.0-wmf.33/vendor/wikimedia/parsoid/src/Wt2Html/DOMPostProcessor.php(837): Wikimedia\Parsoid\Wt2Html\DOMPostProcessor->Wikimedia\Parsoid\Wt2Html\{closure}(DOMElement, array, boolean)
#7 /srv/mediawiki/php-1.36.0-wmf.33/vendor/wikimedia/parsoid/src/Wt2Html/DOMPostProcessor.php(887): Wikimedia\Parsoid\Wt2Html\DOMPostProcessor->doPostProcess(DOMElement)
#8 /srv/mediawiki/php-1.36.0-wmf.33/vendor/wikimedia/parsoid/src/Wt2Html/DOMPostProcessor.php(904): Wikimedia\Parsoid\Wt2Html\DOMPostProcessor->process(DOMElement)
#9 /srv/mediawiki/php-1.36.0-wmf.33/vendor/wikimedia/parsoid/src/Wt2Html/ParserPipeline.php(178): Wikimedia\Parsoid\Wt2Html\DOMPostProcessor->processChunkily(string, array)
#10 /srv/mediawiki/php-1.36.0-wmf.33/vendor/wikimedia/parsoid/src/Wt2Html/ParserPipelineFactory.php(310): Wikimedia\Parsoid\Wt2Html\ParserPipeline->parseChunkily(string, array)
#11 /srv/mediawiki/php-1.36.0-wmf.33/vendor/wikimedia/parsoid/src/Core/WikitextContentModelHandler.php(106): Wikimedia\Parsoid\Wt2Html\ParserPipelineFactory->parse(string)
#12 /srv/mediawiki/php-1.36.0-wmf.33/vendor/wikimedia/parsoid/src/Parsoid.php(162): Wikimedia\Parsoid\Core\WikitextContentModelHandler->toDOM(Wikimedia\Parsoid\Config\Env)
#13 /srv/mediawiki/php-1.36.0-wmf.33/vendor/wikimedia/parsoid/src/Parsoid.php(194): Wikimedia\Parsoid\Parsoid->parseWikitext(MWParsoid\Config\PageConfig, array)
#14 /srv/mediawiki/php-1.36.0-wmf.33/vendor/wikimedia/parsoid/extension/src/Rest/Handler/ParsoidHandler.php(589): Wikimedia\Parsoid\Parsoid->wikitext2html(MWParsoid\Config\PageConfig, array, NULL)
#15 /srv/mediawiki/php-1.36.0-wmf.33/vendor/wikimedia/parsoid/extension/src/Rest/Handler/PageHandler.php(88): MWParsoid\Rest\Handler\ParsoidHandler->wt2html(MWParsoid\Config\PageConfig, array)
#16 /srv/mediawiki/php-1.36.0-wmf.33/includes/Rest/Router.php(395): MWParsoid\Rest\Handler\PageHandler->execute()
#17 /srv/mediawiki/php-1.36.0-wmf.33/includes/Rest/Router.php(322): MediaWiki\Rest\Router->executeHandler(MWParsoid\Rest\Handler\PageHandler)
#18 /srv/mediawiki/php-1.36.0-wmf.33/includes/Rest/EntryPoint.php(165): MediaWiki\Rest\Router->execute(MediaWiki\Rest\RequestFromGlobals)
#19 /srv/mediawiki/php-1.36.0-wmf.33/includes/Rest/EntryPoint.php(130): MediaWiki\Rest\EntryPoint->execute()
#20 /srv/mediawiki/php-1.36.0-wmf.33/rest.php(31): MediaWiki\Rest\EntryPoint::main()
#21 /srv/mediawiki/w/rest.php(3): require(string)
#22 {main}

Impact

Unclear; not easily reproducible.

Notes

12 of these in the last 4 hours.

Details

Request ID
YEjqXQpAMKYAAArh-SgAAACF
Request URL
https://ar.wikipedia.org/w/rest.php/ar.wikipedia.org/v3/page/pagebundle/[title]/[revision id]