Page MenuHomePhabricator

Unsupported time zone specified UTC
Closed, ResolvedPublicPRODUCTION ERROR

Description

Error
normalized_message
Unsupported time zone specified UTC
exception.trace
at module.exports.computed.lastEdited  https://commons.wikimedia.org/w/load.php?lang=en&modules=jquery%2Cmediasearch&skin=vector&version=m27cs:198:657
at fn.get  <anonymous>:327:628
at fn.evaluate  <anonymous>:328:778
at null.lastEdited  <anonymous>:330:682
at eval  eval at Ya (unknown source), <anonymous>:8:160
at e._render  <anonymous>:336:348
at r  <anonymous>:369:746
at fn.get  <anonymous>:327:628
at new fn  <anonymous>:327:546
Impact

Currently one of the more frequently-occurring client-side errors in MediaSearch.

Notes

This error is being produced from the computed lastEdited property in PageResult.vue.

According to the MDN docs for Date.prototype.toLocaleString, locales and options for toLocaleString are not supported in all browsers. When a locale is not supported, a RangeError will be thrown.

This seems to be what is happening here. I assume that we're seeing these errors from legacy Android browsers that don't support the UTC timezone, which we're trying to use to format the dates displayed.

Adding a try/catch handler and simply displaying no lastEdited value to browsers that can't do the formatting seems like a reasonable solution here.

Event Timeline

egardner updated the task description. (Show Details)
egardner updated the task description. (Show Details)

Change 721064 had a related patch set uploaded (by Eric Gardner; author: Eric Gardner):

[mediawiki/extensions/MediaSearch@master] Handle possible unsupported timezone errors

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

Change 721064 merged by jenkins-bot:

[mediawiki/extensions/MediaSearch@master] Handle possible unsupported timezone errors

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

Etonkovidova subscribed.

There are no errors reported in the last 24 hours (as of Sep 24/e error 2021 12:11 AM UTC).

The last timestamp for the error: Sep 22, 2021 @ 12:36:06.810.