Page MenuHomePhabricator

Report all client-side JavaScript errors
Closed, DeclinedPublic

Description

In T202026, we added the ability to intercept and report unexpected errors. However, a large body of code is executed prior to the installation of this interceptor and errors in it will not be reported. This task encompasses the work to move the error handler from Minerva to MobileFrontend's earliest executed JavaScript. For example, if throw new Error('foo') is added to View.js, the interceptor does not report it.

Developer notes

Prior to working on this it would be useful to have a comprehensive list of bugs that we are not catching right now. We should trigger bugs and verify where they are not caught. I think Nearby has been mention before.

Event Timeline

Restricted Application changed the subtype of this task from "Deadline" to "Task". · View Herald TranscriptOct 4 2018, 6:12 PM
Restricted Application added a subscriber: Aklapper. · View Herald Transcript

Change 464629 had a related patch set uploaded (by Niedzielski; owner: Stephen Niedzielski):
[mediawiki/extensions/MobileFrontend@master] Demo: example of an error that can be thrown early and missed

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

Change 464629 abandoned by Niedzielski:
Demo: example of an error that can be thrown early and missed

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

Jdlrobson lowered the priority of this task from Medium to Low.Oct 5 2018, 4:23 PM
Jdlrobson updated the task description. (Show Details)

+Sam who I believe has a personal interest in client-side error reporting.

ACK

After thinking about this a little, it'd be useful for extensions/skins to be able to register a module that'll act as an error handler. AIUI the Sentry extension will suffer from the same issue as there's no guarantee that it'll be executed before the things that it intends to monitor will.