Page MenuHomePhabricator

[M] TypeError: searchOptions[this.currentTab] is not an Object. (evaluating 'key in searchOptions[this.currentTab]')
Closed, ResolvedPublicPRODUCTION ERROR

Description

Error
normalized_message
TypeError: searchOptions[this.currentTab] is not an Object. (evaluating 'key in searchOptions[this.currentTab]')
exception.trace
at https://commons.m.wikimedia.org/w/load.php?lang=en&modules=jquery%7Cwikibase.mediainfo.mediasearch.vue&skin=minerva&version=1s3fi:206:475
at onPopState https://commons.m.wikimedia.org/w/load.php?lang=en&modules=jquery%7Cwikibase.mediainfo.mediasearch.vue&skin=minerva&version=1s3fi:206:450
Impact

Error seems limited to Mobile Safari on iOS.
Roughly 50 occurrences per day, seems more or less constant over the last few weeks.

Notes

This seems to be happening inside the clearFilterQueryParams in App.vue, but the outer layer of the callstack is the onPopState handler. This implies that some previous history state is not being stored correctly when the user navigates "back" to a previous search state.

Event Timeline

CBogen renamed this task from TypeError: searchOptions[this.currentTab] is not an Object. (evaluating 'key in searchOptions[this.currentTab]') to [M] TypeError: searchOptions[this.currentTab] is not an Object. (evaluating 'key in searchOptions[this.currentTab]').Jul 14 2021, 4:22 PM

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

[mediawiki/extensions/MediaSearch@master] Check for null \"searchOptions\" when restoring filter state

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

Change 713917 merged by jenkins-bot:

[mediawiki/extensions/MediaSearch@master] Check for null \"searchOptions\" when restoring filter state

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

@egardner - on commons wmf.23 there are similar looking errors (59 errors for the last 24 hours), Is it a related or a separate bug?

normalized_message
undefined is not an object (evaluating 'this.tabs[tabName].disabled')
stack_trace
at selectTab https://commons.m.wikimedia.org/w/load.php?lang=en&modules=jquery%2Cmediasearch&skin=minerva&version=o2iwd:188:93
at active https://commons.m.wikimedia.org/w/load.php?lang=en&modules=jquery%2Cmediasearch&skin=minerva&version=o2iwd:189:347
at https://commons.m.wikimedia.org/w/index.php?search=Crowd&title=Special%3AMediaSearch:222:613
at un https://commons.m.wikimedia.org/w/index.php?search=Crowd&title=Special%3AMediaSearch:220:621
at https://commons.m.wikimedia.org/w/index.php?search=Crowd&title=Special%3AMediaSearch:207:317
at qe https://commons.m.wikimedia.org/w/index.php?search=Crowd&title=Special%3AMediaSearch:206:714
SimoneThisDot subscribed.

I can confirm that the above error is not happening anymore since being deployed as shown by the attached image from logstash

image.png (476×1 px, 92 KB)