Reduce the default set of warnings we display in console

VERIFIED FIXED in Firefox 30

Status

defect
P3
normal
VERIFIED FIXED
5 years ago
10 months ago

People

(Reporter: anton, Assigned: rcampbell)

Tracking

(Depends on 1 bug)

Trunk
Firefox 30
x86
All
Dependency tree / graph

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment, 2 obsolete attachments)

(Reporter)

Description

5 years ago
When you open NYTimes (for example) on a default profile you easily get overwhelmed with messages. I think we should reduce the default set of messages we display to show only the necessities i.e. stuff that can prevent your page from working correctly.
+1. I wish that css and JS warnings were more meaningful and less common, but the platform is messy enough that any site using jQuery (which is nearly everyone) vomits warnings into the console.

Strawman for a new default behaviour:

* remove the net category
* all security warnings
* CSS errors only
* JS errors only
* all security messages
* all log levels
> * CSS errors only

Is there such a thing?
(In reply to Paul Rouget [:paul] from comment #2)
> > * CSS errors only
> 
> Is there such a thing?

We have an Error category in CSS filter, but yeah, I have never seen CSS errors. Everything is just warning
I meant bug 720343.
(In reply to Jeff Griffiths (:canuckistani) from comment #1)
> +1. I wish that css and JS warnings were more meaningful and less common,
> but the platform is messy enough that any site using jQuery (which is nearly
> everyone) vomits warnings into the console.
> 
> Strawman for a new default behaviour:
> 
> * remove the net category
> * all security warnings
> * CSS errors only
> * JS errors only
> * all security messages
> * all log levels

Currently, by default we show:

- all network logs,
- CSS errors only,
- JS errors and warnings,
- all security messages,
- all log levels (console API messages from the page).

The only change that makes sense, in my opinion, is to turn off Network > Log messages, while keeping network errors and warnings visible - I believe these are important enough to be shown by default. With this change I only see 4 messages in the web console when nytimes.com loads. cnn.com is similarly quiet.

We may also turn off JS warnings by default.
(Assignee)

Comment 7

5 years ago
+1, I agree and this matches my own settings.

I would also consider disabling Security Warnings.
(Reporter)

Comment 8

5 years ago
> I would also consider disabling Security Warnings.

I'm not sure if we separate security warnings from security errors. If we don't I think we should. For example, when we don't load fonts because of SOP this should be an error and, IMHO, should appear in the console by default since it breaks the website.
(Assignee)

Comment 9

5 years ago
Posted patch prefs (obsolete) — Splinter Review
here are some updated prefs
Assignee: nobody → rcampbell
Status: NEW → ASSIGNED
Attachment #8374896 - Flags: review?(mihai.sucan)
Comment on attachment 8374896 [details] [diff] [review]
prefs

Review of attachment 8374896 [details] [diff] [review]:
-----------------------------------------------------------------

r+, with one comment below. I leave the final choice to you.

::: browser/app/profile/firefox.js
@@ +1203,5 @@
>  pref("devtools.webconsole.filter.warn", true);
>  pref("devtools.webconsole.filter.info", true);
>  pref("devtools.webconsole.filter.log", true);
>  pref("devtools.webconsole.filter.secerror", true);
> +pref("devtools.webconsole.filter.secwarn", false);

I would suggest keeping security warnings on. Let's disable them when they become a problem. For now, I believe security is important enough to be visible by default - and we don't have many messages in this category.
Attachment #8374896 - Flags: review?(mihai.sucan) → review+
(Assignee)

Comment 11

5 years ago
Posted patch prefs (obsolete) — Splinter Review
Attachment #8374896 - Attachment is obsolete: true
Attachment #8375637 - Flags: review+
Attachment #8375637 - Flags: checkin?
(Assignee)

Comment 12

5 years ago
updated. Added security warnings back into the file. Ready for landing.
Keywords: checkin-needed
Whiteboard: [land-in-fx-team]
Comment on attachment 8375637 [details] [diff] [review]
prefs

Please stick to just checkin-needed.
Attachment #8375637 - Flags: checkin?
https://hg.mozilla.org/integration/fx-team/rev/c4aba8973e0f
Keywords: checkin-needed
Whiteboard: [land-in-fx-team] → [fixed-in-fx-team]
(Assignee)

Comment 16

5 years ago
of course there are test failures with this. My bad. fixing...
(Assignee)

Comment 17

5 years ago
Posted patch prefsSplinter Review
reverted security.warnings setting and fixed tests.
Attachment #8375637 - Attachment is obsolete: true
Comment on attachment 8379345 [details] [diff] [review]
prefs

Review of attachment 8379345 [details] [diff] [review]:
-----------------------------------------------------------------

Thanks for the update!

::: browser/devtools/webconsole/test/browser_bug_638949_copy_link_location.js
@@ +17,2 @@
>    registerCleanupFunction(() => {
> +    Services.prefs.setBoolPref("devtools.webconsole.filter.networkinfo", originalNetPref);

You can use clearUserPref() to reset the pref.
This is a patch that would be nice in aurora. What do you think?
(Assignee)

Updated

5 years ago
Whiteboard: [fixed-in-fx-team] → [backed-out]
(Assignee)

Comment 22

5 years ago
failure:

chrome://mochitests/content/browser/browser/devtools/webconsole/test/browser_webconsole_dont_navigate_on_doubleclick.js | Test timed out
Blocks: 977288
(Assignee)

Comment 23

5 years ago
third time's the charm!
https://hg.mozilla.org/integration/fx-team/rev/b76d4126d9fe
Whiteboard: [backed-out] → [fixed-in-fx-team]
https://hg.mozilla.org/mozilla-central/rev/b76d4126d9fe
Status: ASSIGNED → RESOLVED
Last Resolved: 5 years ago
Resolution: --- → FIXED
Whiteboard: [fixed-in-fx-team]
Target Milestone: --- → Firefox 30
Keywords: verifyme
Depends on: 988652
I really wish we'd gone with the proposal in comment 6 instead...  I filed 991734 to get sorted out some of the working-at-cross-purposes issues here.  :(
Depends on: 991734
This issue is verified fixed on Firefox 30 Beta 3 (Build ID: 20140508121358) [1].

[1] Mozilla/5.0 (Windows NT 6.1; WOW64; rv:30.0) Gecko/20100101 Firefox/30.0
Status: RESOLVED → VERIFIED
Keywords: verifyme

Updated

10 months ago
Product: Firefox → DevTools
You need to log in before you can comment on or make changes to this bug.