Last Comment Bug 435025 - [meta] Make Mozilla Error Messages Better
: [meta] Make Mozilla Error Messages Better
Status: NEW
: meta
Product: Firefox
Classification: Client Software
Component: Developer Tools: Console (show other bugs)
: Trunk
: All All
-- normal with 3 votes (vote)
: ---
Assigned To: Nobody; OK to take it and work on it
: (Unavailable until Apr 3) [:bgrins]
Depends on: 11240 228205 261337 266373 307984 311756 329026 389002 418346 442489 443424 445355 465672 jserror 862153 862529 930397 107491 228304 253127 312448 332176 344517 389631 408412 416108 423890 434522 435896 445280 463122 477311 483672 486229 495176 499568 515051 928250 931720
  Show dependency treegraph
Reported: 2008-05-21 08:20 PDT by John J. Barton
Modified: 2016-06-27 19:15 PDT (History)
29 users (show)
See Also:
Crash Signature:
QA Whiteboard:
Iteration: ---
Points: ---
Has Regression Range: ---
Has STR: ---


Description User image John J. Barton 2008-05-21 08:20:07 PDT
This is tracking bug report to consolidate error message information.

Please put bugzilla reports related to better error messages on the 'depends on' list. 

Please elaborate on specific error messages in their own bug report.

See also
Comment 1 User image Philip Chee 2008-05-21 08:37:10 PDT
Um, John, why WindowsXP only? Don't you care about error messages on linux and OSX?
Comment 2 User image John J. Barton 2008-05-21 10:08:11 PDT
Philip I think someone already fixed this oversight, thanks, John
Comment 3 User image John J. Barton 2008-06-03 21:00:13 PDT
Here is a poster child for errors that puzzle a developer.

I get an exception with these properties:

[QueryInterface]=function QueryInterface() {
    [native code]
[message]=Component is not available
[location]=JS frame :: file:///C:/bartonjj/projects/fireclipse/trunk/FireclipseExtensions/firebug/branches/firebug1.2/components/firebug-service.js :: anonymous :: line 1603
[initialize]=function initialize() {
    [native code]

1603 is the call to ddd:

var url = sourceFile.href;
var urlBreakpoints = breakpoints[url];
if (fbs.DBG_FBS_BP)
  ddd("resetBreakpoints: breakpoints["+sourceFile.href+"]="+urlBreakpoints+"\n");

So I have already accessed sourceFile.href and breakpoints is just one of my objects.  So what could Component is not available really mean? (this code is in a component).
Comment 4 User image John J. Barton 2008-09-29 22:36:50 PDT
I found Bug 389002 and 228304 by search on
Security Error 1000

Clearly 228304 should have said 
"For security reasons, we don't allow setting the value of a file input." But "1000" is close enough?

In my case the  error is
Exception... "Security error" code: "1000" nsresult: "0x805303e8 (NS_ERROR_DOM_SECURITY_ERR)" location: "XPCSafeJSObjectWrapper.cpp Line: 445"]"
Comment 5 User image John J. Barton 2008-11-18 22:04:24 PST
445280 - was Firebug problem.
416508 - was 'resolved', but the test case on that report shows how pathetic the error messages are.
434522 - I got so sick of this one I delete them rather than show in Firebug. 
408512 - was fixed because it affected platform developers.

465672 - jsd error processing looks broken
Comment 6 User image John J. Barton 2008-12-13 21:17:08 PST
"you can set the boolean preference 
If this preference is true, all exceptions from inner frames will be logged."
Comment 7 User image John J. Barton 2009-02-06 13:31:03 PST
Here's another nice one:

Error: uncaught exception: 2147942487

No file or line info. In fact that's the entire message.
Comment 8 User image Brendan Eich [:brendan] 2009-02-06 13:34:16 PST
$ bc
bc 1.06
Copyright 1991-1994, 1997, 1998, 2000 Free Software Foundation, Inc.
This is free software with ABSOLUTELY NO WARRANTY.
For details type `warranty'. 
$ grep 057 ../../xpcom/*/nsError.h
#define NS_ERROR_ILLEGAL_VALUE             ((nsresult) 0x80070057L)

Still opaque as hell, but that's how you start to track down such bugs. Problem now is that many places return that nsresult. Which DOM or JSD or other XPCOM method was called that might have returned this code?

Comment 9 User image John J. Barton 2009-02-06 14:05:38 PST
see also Bug 477311
Comment 10 User image nemo 2009-04-01 10:33:13 PDT
I totally agree on this front.
I was browsing Google Chrome's "inspector"
chrome-resource://inspector/inspector.html  Developer->Javascript Console

It gave me some excellent informational/warning messages as it parsed a page.

XML self-closing tag syntax used on <a>. The tag will not be closed. http://testserver/badlywrittenapp/somepage (line 26)
<a> misnested or not properly closed.  Cloning <a> in order to preserve the styles applied by it. http://testserver/badlywrittenapp/somepage (line 36)

I have no idea at what level that chatty text comes from (the parser or some reasonable error message by the parser that is interpreted by the tool) but from my perspective it is awesome for figuring out how a quirky page ended up running the way it did.
Comment 11 User image John J. Barton 2009-06-16 07:15:58 PDT
Spent a couple of more days rediscovering comment 9.
Comment 12 User image John J. Barton 2009-10-05 12:55:54 PDT
Bug 515051 appears to be caused by xpconnect discarding errors from JS components.
jsd.onError() gets called (correct), but no error is posted to the consoleService(bug)
Bug 499568 jsd.onError() gets called but no Error Console entry is created.
jsd.OnError() gets called (bug), but no error is posted to the ConsoleService (correct).
Comment 13 User image ISHIKAWA, Chiaki 2013-10-28 21:26:16 PDT
(In reply to John J. Barton from comment #0)
> This is tracking bug report to consolidate error message information.
> Please put bugzilla reports related to better error messages on the 'depends
> on' list. 
> Please elaborate on specific error messages in their own bug report.
> See also

Is this only for DOM scripting error messages?
If so, is there a meta entry for TB messages?

Comment 14 User image (Unavailable until Apr 3) [:bgrins] 2016-06-27 07:47:15 PDT
The Error Console has been removed in favor of the Browser Console (see Bug 1278368), and the component is going to be removed.  If this bug is also relevant in the Browser Console, please reopen and move this into Firefox -> Developer Tools: Console.
Comment 15 User image Zack Weinberg (:zwol) 2016-06-27 09:43:32 PDT
I am mass-reopening and re-componenting every single one of the Toolkit:Error Console bugs that appear to have been closed without anyone even *glancing* at whether they were relevant to the Browser Console.

If you want to close a whole bunch of old bugs -- FOR ANY REASON -- it is YOUR RESPONSIBILITY to check EVERY SINGLE ONE OF THEM and make sure they are no longer valid.  Do not push that work onto the bug reporters.

(It's okay to close bugs that haven't been touched in years when they don't have enough information for you to figure out whether the problem is still relevant to the current software - the reporter probably isn't coming back to clarify.  But that is the ONLY situation where it is okay.)

(I'm going to have to do this in two steps because of the way the "change several bugs at once" form works.  Apologies for the extra bugspam.)

Note You need to log in before you can comment on or make changes to this bug.