Page MenuHomePhabricator

Sorry toast doesn't show for mobile editor on pages you can't edit (Uncaught TypeError: m.show is not a function, Uncaught TypeError: Cannot read property 'show' of undefined)
Closed, ResolvedPublic

Description

These account for the majority of errors that show up in logstash and are obscuring many other errors. Given that I think we should prioritize identifying and fixing or at the very least handling the error more gracefully. I suspect this may also be related to the large amount of errors we currently see logged in WebClientError.

https://logstash.wikimedia.org/goto/a04196f9b5e466d5a4ea82ebaa442bb2

The error is showing up in various forms about 610 a day on mediawiki.org (likely much higher on bigger wikis)

Event Timeline

Jdlrobson renamed this task from Uncaught TypeError: m.show is not a function, self.hide is not a function, Uncaught TypeError: Cannot read property 'show' of undefined to Sorry toast doesn't show for mobile editor on pages you can't edit (Uncaught TypeError: m.show is not a function, Uncaught TypeError: Cannot read property 'show' of undefined).Jun 17 2020, 9:41 PM

Change 606275 had a related patch set uploaded (by Jdlrobson; owner: Jdlrobson):
[mediawiki/extensions/MobileFrontend@master] m.show is not a function

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

m.show points to MobileFrontend. In the dist that's equivalent to:

s.on("click",(function(t){m.show(e),t.preventDefault()})),t.route(f,(function(){m.show(e)})),

which points to src/mobile.init/editor.js
Meaning that when editing is disabled, the sorry toast is not showing.

The hide issue is: T253045

Change 606277 had a related patch set uploaded (by Jdlrobson; owner: Jdlrobson):
[mediawiki/extensions/Echo@master] self.hide is not a function

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

Change 606275 merged by jenkins-bot:
[mediawiki/extensions/MobileFrontend@master] m.show is not a function

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

Change 606277 merged by jenkins-bot:
[mediawiki/extensions/Echo@master] self.hide is not a function

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

No more errors in production logged in the last 24hrs w00t!