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.
,
Apr 26 2018
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...!!
,
May 21 2018
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?
,
May 21 2018
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.
,
May 29 2018
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 |
|||||
Comment 1 by susan.boorgula@chromium.org
, Apr 23 2018