Page MenuHomePhabricator

[Bug] Precondition failed: Trying to get token image at offset -1
Closed, ResolvedPublic

Description

10 exceptions have been logged in Logstash:

https://logstash.wikimedia.org/app/kibana#/dashboard/Reading-Web?_g=h@8525ade&_a=h@00a40e0
/w/api.php?format=json&formatversion=2&action=query&redirects=&converttitles=&prop=description|pageimages&piprop=thumbnail&pilicense=any&generator=prefixsearch&gpsnamespace=0&list=search&srnamespace=0&srwhat=text&srinfo=suggestion&srprop=&sroffset=0&srlimit=1&pithumbsize=320&gpssearch=NOT&gpslimit=20&srsearch=NOT   Wikimedia\Assert\PreconditionException from line 43 of /srv/mediawiki/php-1.33.0-wmf.3/vendor/wikimedia/assert/src/Assert.php: Precondition failed: Trying to get token image at offset -1

#0 /srv/mediawiki/php-1.33.0-wmf.3/extensions/CirrusSearch/includes/Parser/QueryStringRegex/Token.php(102): Wikimedia\Assert\Assert::precondition(boolean, string)
#1 /srv/mediawiki/php-1.33.0-wmf.3/extensions/CirrusSearch/includes/Parser/QueryStringRegex/QueryStringRegexParser.php(484): CirrusSearch\Parser\QueryStringRegex\Token->getImage()
#2 /srv/mediawiki/php-1.33.0-wmf.3/extensions/CirrusSearch/includes/Parser/QueryStringRegex/QueryStringRegexParser.php(544): CirrusSearch\Parser\QueryStringRegex\QueryStringRegexParser->fallbackToWord(array)
#3 /srv/mediawiki/php-1.33.0-wmf.3/extensions/CirrusSearch/includes/Parser/QueryStringRegex/QueryStringRegexParser.php(510): CirrusSearch\Parser\QueryStringRegex\QueryStringRegexParser->explicitlyNegatedNode()
#4 /srv/mediawiki/php-1.33.0-wmf.3/extensions/CirrusSearch/includes/Parser/QueryStringRegex/QueryStringRegexParser.php(341): CirrusSearch\Parser\QueryStringRegex\QueryStringRegexParser->negatedLeaf()
#5 /srv/mediawiki/php-1.33.0-wmf.3/extensions/CirrusSearch/includes/Parser/QueryStringRegex/QueryStringRegexParser.php(293): CirrusSearch\Parser\QueryStringRegex\QueryStringRegexParser->expression()
#6 /srv/mediawiki/php-1.33.0-wmf.3/extensions/CirrusSearch/includes/Search/SearchQueryBuilder.php(107): CirrusSearch\Parser\QueryStringRegex\QueryStringRegexParser->parse(string)
#7 /srv/mediawiki/php-1.33.0-wmf.3/extensions/CirrusSearch/includes/CirrusSearch.php(167): CirrusSearch\Search\SearchQueryBuilder::newFTSearchQueryBuilder(CirrusSearch\SearchConfig, string)
#8 /srv/mediawiki/php-1.33.0-wmf.3/includes/search/SearchEngine.php(83): CirrusSearch->doSearchText(string)
#9 /srv/mediawiki/php-1.33.0-wmf.3/includes/search/SearchEngine.php(169): Closure$SearchEngine::searchText()
#10 /srv/mediawiki/php-1.33.0-wmf.3/includes/search/SearchEngine.php(84): SearchEngine->maybePaginate(Closure$SearchEngine::searchText;639)
#11 /srv/mediawiki/php-1.33.0-wmf.3/includes/api/ApiQuerySearch.php(85): SearchEngine->searchText(string)
#12 /srv/mediawiki/php-1.33.0-wmf.3/includes/api/ApiQuerySearch.php(41): ApiQuerySearch->run()
#13 /srv/mediawiki/php-1.33.0-wmf.3/includes/api/ApiQuery.php(249): ApiQuerySearch->execute()
#14 /srv/mediawiki/php-1.33.0-wmf.3/includes/api/ApiMain.php(1570): ApiQuery->execute()
#15 /srv/mediawiki/php-1.33.0-wmf.3/includes/api/ApiMain.php(531): ApiMain->executeAction()
#16 /srv/mediawiki/php-1.33.0-wmf.3/includes/api/ApiMain.php(502): ApiMain->executeActionWithErrorHandling()
#17 /srv/mediawiki/php-1.33.0-wmf.3/api.php(87): ApiMain->execute()
#18 /srv/mediawiki/w/api.php(3): include(string)
#19 {main}

Event Timeline

Restricted Application added a project: Discovery-Search. · View Herald TranscriptNov 12 2018, 5:22 PM
Restricted Application changed the subtype of this task from "Deadline" to "Task". · View Herald Transcript
Restricted Application added a subscriber: Aklapper. · View Herald Transcript

Change 473086 had a related patch set uploaded (by DCausse; owner: DCausse):
[mediawiki/extensions/CirrusSearch@master] Fix missing return in new query parser

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

Change 473086 merged by jenkins-bot:
[mediawiki/extensions/CirrusSearch@master] Fix missing return in new query parser

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

debt closed this task as Resolved.Nov 29 2018, 7:55 PM