Closed Bug 857843 Opened 7 years ago Closed 3 years ago
Gather Gaia error report information for Mozilla apps (e
.g . about:gaia-errors similar to about:crashes)
+++ This bug was initially created as a clone of Bug #811299 +++ MattN, nbp and I had a discussion about Gaia crashes - currently they are likely to be JS exceptions and we exit to home screen (or something equivalent). Shall we have a location to consolidate all Gaia crashes, instead of having to grep "E/GeckoConsole" on `adb logcat` now? Crash Reports in /data/b2g/Crash\ Reports/ (or a similar path, can't remember the exact one off the top of my head) seem to only be Gecko crashes. We could also have a way to submit them.
Summary: Gather Gaia crash report information → Gather Gaia error report information for Mozilla apps (e.g. about:gaia-errors similar to about:crashes)
I'm not sure how you can differentiate a "gaia crash" from other crashes. Not all exceptions are crashes either.
I think every unhandled exception within a gaia application should be considered as a "gaia crash", like uncaught throw in Java, or SEGV in Gecko. Any other exception should be handled properly. One option (*) would be to add an event listener for 'error' on the window object of every gaia application. The listener will then forward this error to the b2g process with an ipc message, such as we can produce a "JS crash report". The other option would be to do that automatically for every mozbrowser iframe, such as such instrumentation cannot be left behind. (*) Thanks to :pauljt for hacking around to understand how crashes & errors were reported.
Yes, we could do that.
What we need as a prerequisite is an ability to report a "JS Crash Report" to crash-stats in a generic way, which is what I filed bug 811299 for. Once we have that, we hopefully can hook up Gaia apps and anything else that uses JS to use those facilities (may mean to call some kind of generic mechanism from a global onerror function or something, I'm a bit too weak on details). Oh, and we'll also need the capability of crash-stats (Socorro) to deal with those reports, but AFAIK that's actually in the plans for the webtools/Socorro team for this year.
(In reply to Nicolas B. Pierron [:nbp] from comment #2) > One option (*) would be to add an event listener for 'error' on the window > object of every gaia application. The listener will then forward this error > to the b2g process with an ipc message, such as we can produce a "JS crash > report". We've looked into this, and it turns out that window.onerror kind of sucks for this purpose. There's no stack available, which is the biggest flaw (bug 355430). I'm sure this wouldn't be terribly hard to fix for someone who knows JS+DOM things. I have half of a patch floating around somewhere.
This looks like a great idea but also a feature that is in the early stages so not tracking now but please renom when an implementation (and associated risks for uplifting) are more clear.
Socorro has been prototyping the necessary features for collecting and processing unhandled JS errors. In the near future, submitting them like crashes could be viable. I don't know enough about how Firefox is organized internally but the developer tools debugger has a wealth of information that could be useful for this, if that data is available.
Not sure what's needed to move this forward but nominating for blocking-b2g:koi?. This will be immensely useful for Stability / QA / fuzzing folks in the future.
blocking-b2g: --- → koi?
Pretty late for 1.2, hence minus.
blocking-b2g: koi? → -
Not a committed feature, so not a blocker for 1.3.
blocking-b2g: 1.3? → -
Status: NEW → RESOLVED
Closed: 3 years ago
Resolution: --- → WONTFIX
You need to log in before you can comment on or make changes to this bug.