New issue
Advanced search Search tips

Issue 835841 link

Starred by 2 users

Issue metadata

Status: Duplicate
Merged: issue 682916
Owner:
Closed: May 2018
Components:
EstimatedDays: ----
NextAction: ----
OS: Linux , Windows , Mac
Pri: 2
Type: Bug



Sign in to add a comment

Can't view objects in console.log due to console.clear with Preserve Log enabled

Reported by sber...@50onred.com, Apr 23 2018

Issue description

UserAgent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_13_4) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/65.0.3325.181 Safari/537.36

Steps to reproduce the problem:
1. Turn on Preserve Log in the console's settings.
2. console.log({an:{object:{deep:{properties:[1,2,3]}}}})
3. Open the object by clicking on it, you'll see it expand typically.
4. console.log({an:{object:{deep:{properties:[1,2,3]}}}})
5. console.clear()
6. Open the object by clicking on it, it will not expand.

What is the expected behavior?
console.clear() should have no effect on console logs.

What went wrong?
console.clear() makes objects that were logged to no longer be expandable.

Did this work before? N/A 

Chrome version: 65.0.3325.181  Channel: n/a
OS Version: OS X 10.13.4
Flash Version: 

Advertisers abuse console.clear() by clearing on an interval to make it harder to tell wtf they are doing. Preserve Log mostly neuters this malicious behavior, but it currently is making it impossible to view objects at this time since the objects no longer are viewable in the console without pausing the javascript interpreter, something that shouldn't need be done.
 
Labels: Needs-Triage-M65
Labels: Triaged-ET M-68 FoundIn-68 Target-68 OS-Linux OS-Windows
Status: Untriaged (was: Unconfirmed)
Able to reproduce the issue on Mac 10.13.3, Win-10 and Ubuntu 14.04 using chrome latest stable #66.0.3359.117 and latest canary #68.0.3406.0.
This is a non-regression issue as it is observed from M62 old builds. From M61 and lower builds, on clearing console using console.clear() command, console get cleared even on turning on preserve log in the console's settings and unable to check the issue.

Hence, marking it as untriaged to get more inputs from dev team.

Thanks...!!
Owner: l...@chromium.org
Status: Assigned (was: Untriaged)
That's a valid concern, thanks for filing. Would this be a problem if console.clear() would only clear console logs from the frame which issues console.clear()? I imagine that most ads run in an iframe, while you do console.log() in the main frame. WDYT?

Comment 4 by l...@chromium.org, May 21 2018

Labels: -Needs-Triage-M65 Needs-Feedback
OP: are the console.clear's in your case generated in a separate frame?  If so, we can merge this with crbug.com/682916 which is tracking the same issue.

Comment 5 by l...@chromium.org, May 29 2018

Mergedinto: 682916
Status: Duplicate (was: Assigned)
It has been over a month since the OP's last comment, I'm duping this report with the other crbug, which tracks progress on localizing console.clear per frame.

Sign in to add a comment