Page MenuHomePhabricator

"We're sorry, something went wrong." on initial load of Special:SuggestedTags
Closed, ResolvedPublicBUG REPORT

Description

Occasionally, upon first loading Special:SuggestedTags, I encounter an error. The frontend displays the message:

We're sorry, something went wrong. Please check back later or contact us.

After a couple of page reloads, the page functions as expected.

This issue needs repro steps. I have only been able to induce this error in Chromium, and it seems connected to requesting the page with the #popular URL fragment present (e.g., when loading from saved browsing history). However, Ramsey has reportedly seen this when requesting the page even without including the #popular fragment in the URL.

Event Timeline

Restricted Application added a subscriber: Aklapper. · View Herald Transcript
Mholloway updated the task description. (Show Details)
Mholloway updated the task description. (Show Details)

Steps to reproduce:

  1. In Chromium or Firefox, while logged into Commons, navigate to https://commons.wikimedia.org/wiki/Special:SuggestedTags
  2. Refresh the page repeatedly until you see the error

I probably refreshed the page 15 times before the error occurred in Chromium, and when I opened Firefox it happened on the first try. I also saw the error when repeatedly going to the URL without the popular fragment, so I don't think the fragment has anything to do with it. Seems to be an internal error with the API:

{
    "error": {
        "code": "internal_api_error_Error",
        "info":"[XcxbVwpAEDYAAHVLMn0AAACX] Caught exception of type Error",
        "errorclass":"Error"
    },
    "servedby":"mw1289"
}

I was just able to reproduce this in Chrome too. It happens about every 15-20 times I load the page in any browser (Edit: and occasionally when a new API call runs after I run out of images)

Change 550749 had a related patch set uploaded (by Mholloway; owner: Michael Holloway):
[mediawiki/extensions/MachineVision@master] Handle case where entity not found for given ID

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

This is the stack trace I'm seeing in exception.log on mwlog1001 that almost certainly corresponds to this bug.

2019-11-13 19:36:55 [XcxbVwpAEDYAAHVLMn0AAACX] mw1289 commonswiki 1.35.0-wmf.5 exception ERROR: [XcxbVwpAEDYAAHVLMn0AAACX] /w/api.php?action=query&format=json&formatversion=2&generator=unreviewedimagelabels&guillimit=10&prop=imageinfo%7Cimagelabels&iiprop=url&iiurlwidth=800&ilstate=unreviewed&meta=unreviewedimagecount&uselang=en   Error from line 75 of /srv/mediawiki/php-1.35.0-wmf.5/extensions/MachineVision/src/Handler/LabelResolver.php: Call to a member function getLabels() on null {"exception_id":"XcxbVwpAEDYAAHVLMn0AAACX","exception_url":"/w/api.php?action=query&format=json&formatversion=2&generator=unreviewedimagelabels&guillimit=10&prop=imageinfo%7Cimagelabels&iiprop=url&iiurlwidth=800&ilstate=unreviewed&meta=unreviewedimagecount&uselang=en","caught_by":"mwe_handler"} 
[Error Error] (/srv/mediawiki/php-1.35.0-wmf.5/extensions/MachineVision/src/Handler/LabelResolver.php:75) Call to a member function getLabels() on null
  #0 [internal function]: MediaWiki\Extension\MachineVision\Handler\LabelResolver->MediaWiki\Extension\MachineVision\Handler\{closure}(array, string)
  #1 /srv/mediawiki/php-1.35.0-wmf.5/extensions/MachineVision/src/Handler/LabelResolver.php(79): array_reduce(array, Closure, array)
  #2 /srv/mediawiki/php-1.35.0-wmf.5/extensions/MachineVision/src/Handler/LabelResolver.php(61): MediaWiki\Extension\MachineVision\Handler\LabelResolver->resolveInternal(Wikibase\LanguageFallbackChain, array)
  #3 /srv/mediawiki/php-1.35.0-wmf.5/extensions/MachineVision/src/Api/ApiQueryImageLabels.php(114): MediaWiki\Extension\MachineVision\Handler\LabelResolver->resolve(DerivativeContext, array)
  #4 /srv/mediawiki/php-1.35.0-wmf.5/includes/api/ApiQuery.php(255): MediaWiki\Extension\MachineVision\Api\ApiQueryImageLabels->execute()

Change 550749 merged by jenkins-bot:
[mediawiki/extensions/MachineVision@master] Handle case where entity not found for given ID

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

Change 550781 had a related patch set uploaded (by Mholloway; owner: Michael Holloway):
[mediawiki/extensions/MachineVision@wmf/1.35.0-wmf.5] Handle case where entity not found for given ID

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

Change 550781 merged by jenkins-bot:
[mediawiki/extensions/MachineVision@wmf/1.35.0-wmf.5] Handle case where entity not found for given ID

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