Group anti-tracking warnings in the console

RESOLVED FIXED in Firefox 68

Status

()

defect
P1
normal
RESOLVED FIXED
5 months ago
21 days ago

People

(Reporter: Ehsan, Assigned: nchevobbe, NeedInfo)

Tracking

(Blocks 2 bugs)

unspecified
mozilla67
Points:
---
Dependency tree / graph
Bug Flags:
qe-verify +

Firefox Tracking Flags

(firefox68 fixed)

Details

(Whiteboard: [console-grouping])

Attachments

(5 attachments, 1 obsolete attachment)

Reporter

Description

5 months ago

See this page for example: https://atitude32.blogspot.com/. Just visiting the page causes hundreds of "Request to access cookie or storage..." warnings to appear on the console.

Assignee

Comment 1

5 months ago

Thanks for filing Ehsan.
We do have plans to have similar warning messages grouped (See Bug 1522396).
The work will start in a couple weeks, and I guess I'll start with tracking protection messages :)

Assignee

Updated

5 months ago
Whiteboard: [console-unclutter]
Assignee

Updated

5 months ago
Summary: The anti-tracking web console warnings can be too spammy → Group anti-tracking warnings in the console
Component: Tracking Protection → Privacy: Anti-Tracking
Priority: -- → P2
Product: Firefox → Core
Target Milestone: --- → mozilla67
Whiteboard: [console-unclutter] → [console-grouping]
Assignee

Updated

4 months ago
Assignee: nobody → nchevobbe
Status: NEW → ASSIGNED
Priority: P2 → P1
Assignee

Updated

3 months ago
Blocks: 1534927
Assignee

Updated

3 months ago
Blocks: 1534932
Assignee

Comment 2

3 months ago

Hello Ehsan, as you can see in the screenshot attached, this patch is almost done :)

I'm not really satisfied with the group label though (Tracking protection message might not be the best for devs).
Would you have a better idea than mine? Thanks!

Flags: needinfo?(ehsan)
Assignee

Comment 3

3 months ago

This file will be used in the client to group
related messages, so it needs to be in the
shared folder.

Assignee

Comment 4

3 months ago

This will be used to group similar messages together.
Stubs are updated.

Depends on D23547

Assignee

Comment 5

3 months ago

This will be used to enable groups of warning messages (Tracking Protection,
CSP, CORS, …).

Depends on D23549

Reporter

Comment 6

3 months ago

Looks great, thanks Nicolas. This is a copy question, so I'll forward it to Michelle for a final opinion. We call these features Content Blocking in the preferences UI so perhaps we want to call them something similar here too.

Flags: needinfo?(ehsan) → needinfo?(mheubusch)
Assignee

Comment 7

3 months ago

This component will be used to render warning groups messages.
We also add a inWarningGroup prop to the Message component
so warnings that will be displayed in such warningGroup can
be styled differently (no warning icon, a different color for
the indent).

Depends on D23550

Assignee

Comment 8

3 months ago

If there's at least 2 tracking protection messages displayed
for a given page navigation, we display a tracking protection
warning group containing the messages, collapsed by default.
This means we need to move or insert those warning messages
at the right position in visibleMessages, either when they're
added, or when we expand a group.
We also need to style those messages inside the group differently,
using the inWarningGroup prop.
A mochitest is added to make sure this works as expected, and
a mocha test case as well to make sure the WarningGroup for
tracking protection messages looks like it should.

The grouping won't occur unless the groupWarnings preferences
is on.

Depends on D23551

Attachment #9051054 - Attachment description: Bug 1524276 - Group tracking protection messages. r=bgrins. → Bug 1524276 - Group content blocking messages. r=bgrins.
Attachment #9051054 - Attachment description: Bug 1524276 - Group content blocking messages. r=bgrins. → Bug 1524276 - Group content blocking messages. r=bgrins, Honza!.
Attachment #9051047 - Attachment is obsolete: true
Attachment #9051054 - Attachment description: Bug 1524276 - Group content blocking messages. r=bgrins, Honza!. → Bug 1524276 - Group content blocking messages. r=bgrins,Honza!.

Comment 9

3 months ago
Pushed by nchevobbe@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/d21159afd969
Expose `category` and `innerWindowID` properties in ConsoleMessage. r=bgrins.
https://hg.mozilla.org/integration/autoland/rev/8bbe3e4f5a54
Add groupWarnings preference in console redux state. r=bgrins.
https://hg.mozilla.org/integration/autoland/rev/1fee0c357772
Add WarningGroup message component. r=bgrins.
https://hg.mozilla.org/integration/autoland/rev/47363a80ef6d
Group content blocking messages. r=bgrins,Honza.

Backed out 4 changesets (Bug 1524276) for mochitest-devtools failure at devtools/client/webconsole/test/fixtures/stub-generators/browser_webconsole_check_stubs_console_api.js. On a CLOSED TREE

Push with failures: https://treeherder.mozilla.org/#/jobs?repo=autoland&resultStatus=testfailed%2Cbusted%2Cexception&classifiedState=unclassified&selectedJob=236851695&revision=47363a80ef6d1e7a43a2325d32fe024c205cd001

Failure log: https://treeherder.mozilla.org/logviewer.html#/jobs?job_id=236845888&repo=autoland&lineNumber=3206

Backout link: https://treeherder.mozilla.org/#/jobs?repo=autoland&resultStatus=testfailed%2Cbusted%2Cexception&classifiedState=unclassified&selectedJob=236851695&revision=e365c225e26ae4c06d3346939b0c1ec9333d727a

[task 2019-03-29T09:14:22.048Z] 09:14:22 INFO - TEST-PASS | devtools/client/webconsole/test/fixtures/stub-generators/browser_webconsole_check_stubs_console_api.js | wrapper exists -
[task 2019-03-29T09:14:22.049Z] 09:14:22 INFO - Console message: [JavaScript Warning: "Array.map is deprecated; use Array.prototype.map instead" {file: "resource://devtools/server/actors/webconsole.js" line: 1711}]
[task 2019-03-29T09:14:22.049Z] 09:14:22 INFO - Buffered messages logged at 09:14:17
[task 2019-03-29T09:14:22.049Z] 09:14:22 INFO - Console message: [JavaScript Warning: "onmozfullscreenchange is deprecated." {file: "http://example.com/browser/devtools/client/webconsole/test/fixtures/stub-generators/test-console-api.html" line: 0}]
[task 2019-03-29T09:14:22.051Z] 09:14:22 INFO - Console message: [JavaScript Warning: "onmozfullscreenerror is deprecated." {file: "http://example.com/browser/devtools/client/webconsole/test/fixtures/stub-generators/test-console-api.html" line: 0}]
[task 2019-03-29T09:14:22.053Z] 09:14:22 INFO - Buffered messages logged at 09:14:21
[task 2019-03-29T09:14:22.054Z] 09:14:22 INFO - Removing tab.
[task 2019-03-29T09:14:22.054Z] 09:14:22 INFO - Waiting for event: 'TabClose' on [object XULElement].
[task 2019-03-29T09:14:22.054Z] 09:14:22 INFO - Got event: 'TabClose' on [object XULElement].
[task 2019-03-29T09:14:22.055Z] 09:14:22 INFO - Tab removed and finished closing
[task 2019-03-29T09:14:22.059Z] 09:14:22 INFO - Buffered messages finished
[task 2019-03-29T09:14:22.060Z] 09:14:22 INFO - TEST-UNEXPECTED-FAIL | devtools/client/webconsole/test/fixtures/stub-generators/browser_webconsole_check_stubs_console_api.js | The consoleApi stubs file needs to be updated by running mach test devtools/client/webconsole/test/fixtures/stub-generators/browser_webconsole_update_stubs_console_api.js -
[task 2019-03-29T09:14:22.060Z] 09:14:22 INFO - Stack trace:
[task 2019-03-29T09:14:22.062Z] 09:14:22 INFO - chrome://mochikit/content/browser-test.js:test_ok:1304
[task 2019-03-29T09:14:22.063Z] 09:14:22 INFO - chrome://mochitests/content/browser/devtools/client/webconsole/test/fixtures/stub-generators/browser_webconsole_check_stubs_console_api.js:null:17
[task 2019-03-29T09:14:22.063Z] 09:14:22 INFO - chrome://mochikit/content/browser-test.js:Tester_execTest/<:1106
[task 2019-03-29T09:14:22.063Z] 09:14:22 INFO - chrome://mochikit/content/browser-test.js:Tester_execTest:1134
[task 2019-03-29T09:14:22.063Z] 09:14:22 INFO - chrome://mochikit/content/browser-test.js:nextTest/<:995
[task 2019-03-29T09:14:22.063Z] 09:14:22 INFO - chrome://mochikit/content/tests/SimpleTest/SimpleTest.js:SimpleTest.waitForFocus/waitForFocusInner/focusedOrLoaded/<:803
[task 2019-03-29T09:14:22.063Z] 09:14:22 INFO - Leaving test bound

Flags: needinfo?(nchevobbe)
Assignee

Comment 11

3 months ago

Not sure what happened, I rebased, generated stubs again and pushed to try https://treeherder.mozilla.org/#/jobs?repo=try&revision=16cb74c9b88600dc6222b77fee3eb31849b6901c to make sure everything is okay (but maybe there's a patch on autoland messing with this?)

Flags: needinfo?(nchevobbe)

Comment 13

3 months ago
Pushed by nchevobbe@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/6f1c417146be
Expose `category` and `innerWindowID` properties in ConsoleMessage. r=bgrins.
https://hg.mozilla.org/integration/autoland/rev/9476f9253c9c
Add groupWarnings preference in console redux state. r=bgrins.
https://hg.mozilla.org/integration/autoland/rev/30570673a894
Add WarningGroup message component. r=bgrins.
https://hg.mozilla.org/integration/autoland/rev/78fb95dc20e3
Group content blocking messages. r=bgrins,Honza.

Backed out 4 changesets (Bug 1524276) for mochitest-devtools at devtools/client/webconsole/test/fixtures/stub-generators/browser_webconsole_check_stubs_console_api.js. On a CLOSED TREE

Push with failures: https://treeherder.mozilla.org/#/jobs?repo=autoland&resultStatus=testfailed%2Cbusted%2Cexception&classifiedState=unclassified&searchStr=dt2&revision=78fb95dc20e388a616adf8ec31c9dd652a0c8b55

Failure log: https://treeherder.mozilla.org/logviewer.html#/jobs?job_id=236919615&repo=autoland&lineNumber=3201

Backout link: https://treeherder.mozilla.org/#/jobs?repo=autoland&resultStatus=testfailed%2Cbusted%2Cexception&classifiedState=unclassified&searchStr=dt2&revision=7f9e2ce2bf14b4be1ab91cc0f72159ed5f3c7328

task 2019-03-29T15:30:33.809Z] 15:30:33 INFO - Tab removed and finished closing
[task 2019-03-29T15:30:33.810Z] 15:30:33 INFO - Buffered messages finished
[task 2019-03-29T15:30:33.812Z] 15:30:33 INFO - TEST-UNEXPECTED-FAIL | devtools/client/webconsole/test/fixtures/stub-generators/browser_webconsole_check_stubs_console_api.js | The consoleApi stubs file needs to be updated by running mach test devtools/client/webconsole/test/fixtures/stub-generators/browser_webconsole_update_stubs_console_api.js -
[task 2019-03-29T15:30:33.813Z] 15:30:33 INFO - Stack trace:
[task 2019-03-29T15:30:33.813Z] 15:30:33 INFO - chrome://mochikit/content/browser-test.js:test_ok:1304
[task 2019-03-29T15:30:33.814Z] 15:30:33 INFO - chrome://mochitests/content/browser/devtools/client/webconsole/test/fixtures/stub-generators/browser_webconsole_check_stubs_console_api.js:null:17
[task 2019-03-29T15:30:33.815Z] 15:30:33 INFO - chrome://mochikit/content/browser-test.js:Tester_execTest/<:1106
[task 2019-03-29T15:30:33.815Z] 15:30:33 INFO - chrome://mochikit/content/browser-test.js:Tester_execTest:1134
[task 2019-03-29T15:30:33.815Z] 15:30:33 INFO - chrome://mochikit/content/browser-test.js:nextTest/<:995
[task 2019-03-29T15:30:33.815Z] 15:30:33 INFO - chrome://mochikit/content/tests/SimpleTest/SimpleTest.js:SimpleTest.waitForFocus/waitForFocusInner/focusedOrLoaded/<:803
[task 2019-03-29T15:30:33.815Z] 15:30:33 INFO - Leaving test bound
[task 2019-03-29T15:30:33.815Z] 15:30:33 INFO - GECKO(2025) | MEMORY STAT vsizeMaxContiguous not supported in this build configuration.
[task 2019-03-29T15:30:33.815Z] 15:30:33 INFO - GECKO(2025) | MEMORY STAT heapAllocated not supported in this build configuration.
[task 2019-03-29T15:30:33.816Z] 15:30:33 INFO - GECKO(2025) | MEMORY STAT | vsize 20973941MB | residentFast 1168MB
[task 2019-03-29T15:30:33.816Z] 15:30:33 INFO - TEST-OK | devtools/client/webconsole/test/fixtures/stub-generators/browser_webconsole_check_stubs_console_api.js | took 8379ms
[task 2019-03-29T15:30:33.816Z] 15:30:33 INFO - checking window state
[task 2019-03-29T15:30:33.816Z] 15:30:33 INFO - TEST-START | devtools/client/webconsole/test/fixtures/stub-generators/browser_webconsole_check_stubs_css_message.js
[task 2019-03-29T15:30:35.424Z] 15:30:35 INFO - GECKO(2025) | console.warn: "Error while detaching the thread front: 'detach' request packet to 'server1.conn1.child1/context18' can't be sent as the connection is closed."
[task 2019-03-29T15:30:35.863Z] 15:30:35 INFO - GECKO(2025) | MEMORY STAT | vsize 20973962MB | residentFast 1164MB
[task 2019-03-29T15:30:35.863Z] 15:30:35 INFO - TEST-OK | devtools/client/webconsole/test/fixtures/stub-generators/browser_webconsole_check_stubs_css_message.js | took 2278ms
[task 2019-03-29T15:30:35.904Z] 15:30:35 INFO - checking window state
[task 2019-03-29T15:30:35.932Z] 15:30:35 INFO - TEST-START | devtools/client/webconsole/test/fixtures/stub-generators/browser_webconsole_check_stubs_evaluation_result.js
[task 2019-03-29T15:30:37.433Z] 15:30:37 INFO - GECKO(2025) | console.warn: "Error while detaching the thread front: 'detach' request packet to 'server1.conn2.child1/context18' can't be sent as the connection is closed."
[task 2019-03-29T15:30:37.812Z] 15:30:37 INFO - GECKO(2025) | MEMORY STAT | vsize 20973996MB | residentFast 1186MB
[task 2019-03-29T15:30:37.812Z] 15:30:37 INFO - TEST-OK | devtools/client/webconsole/test/fixtures/stub-generators/browser_webconsole_check_stubs_evaluation_result.js | took 1874ms
[task 2019-03-29T15:30:37.851Z] 15:30:37 INFO - checking window state

Flags: needinfo?(nchevobbe)
Assignee

Comment 15

3 months ago

Erf, sorry about that. TRY was fine :/
I'll try to debug that

Flags: needinfo?(nchevobbe)

Comment 16

3 months ago
Pushed by nchevobbe@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/a4510b32d7cf
Expose `category` and `innerWindowID` properties in ConsoleMessage. r=bgrins.
https://hg.mozilla.org/integration/autoland/rev/86c8bac38c31
Add groupWarnings preference in console redux state. r=bgrins.
https://hg.mozilla.org/integration/autoland/rev/7601da9b8556
Add WarningGroup message component. r=bgrins.
https://hg.mozilla.org/integration/autoland/rev/70bb5bea489c
Group content blocking messages. r=bgrins,Honza.
Depends on: 1540546
You need to log in before you can comment on or make changes to this bug.