Page MenuHomePhabricator

Cannot use 'in' operator to search for 'filemime' in undefined at getMediaFilters
Closed, DeclinedPublicPRODUCTION ERROR

Description

Error

https://logstash.wikimedia.org/app/dashboards#/doc/logstash-*/logstash-2021.04.05?id=dlaco3gBWKe2MTdRIEWX

MediaWiki version: n/a

message
Cannot use 'in' operator to search for 'filemime' in undefined

Impact

Notes

Details

Request URL
n/a
Stack Trace
exception.trace
at addFilter  URL1:530:979
at getMediaFilters  URL1:531:80
at a.search  URL1:532:334
at Array.<anonymous>  <anonymous>:510:746
at a.dispatch  <anonymous>:512:459
at a.dispatch  <anonymous>:508:122
at a.n.<computed>  <anonymous>:514:777
at a.performNewSearch  URL1:491:674
at a.term  URL1:492:540
at fn.run  <anonymous>:543:609

URL1: https://commons.wikimedia.org/w/load.php?lang=de&modules=jquery%7Cjquery.ui%7Cwikibase.mediainfo.mediasearch.vue&skin=vector&version=4k75l

Event Timeline

Krinkle moved this task from Untriaged to Apr 2021 on the Wikimedia-production-error board.
Krinkle subscribed.

Not logspam since there's a steward for this code.

I'm only seeing two occurrences of this error in the last 24 hours. If I zoom out to the last 7 days the count is more like 25.

In all incidents I looked at, the user had the older type=bitmap parameter in their search URL (we recently changed this to image in our code before the public launch of the new feature). The users here are likely early adopters who are trying to use old links to search results.

The front-end code is designed to throw errors (and display messages to the user) if users arrive on the page with invalid search parameters in their URL. But we don't want to spam the logs here of course.

@Jdlrobson I'm not an expert in the logstash UI, but is there an easy way to look for all client side errors that:

  1. happen on the Special:MediaSearch page on Commons, and
  2. include the type=bitmap url parameter

If this is a large number of errors, we could either suppress these from the logs with a filter, or potentially change how such errors get handled in our code if it's a big enough problem. I do expect these kinds of errors to go away over time as users stop using older, invalid URLs from the prototype stage of this product.

happen on the Special:MediaSearch page on Commons, and

I've setup a new dashboard for you here - https://logstash.wikimedia.org/app/dashboards#/view/100fa6f0-9e22-11eb-ad54-8bb5fcb640c0?_g=h@8d2360f&_a=h@74d4372

If you feel like you've done everything you can investigating this, feel free to resolve this, and we can filter out any remaining issues.

happen on the Special:MediaSearch page on Commons, and

I've setup a new dashboard for you here - https://logstash.wikimedia.org/app/dashboards#/view/100fa6f0-9e22-11eb-ad54-8bb5fcb640c0?_g=h@8d2360f&_a=h@74d4372

If you feel like you've done everything you can investigating this, feel free to resolve this, and we can filter out any remaining issues.

This is great, thanks!