Bug 203864 - Web Inspector: Console cleared late after page load
Summary: Web Inspector: Console cleared late after page load
Status: NEW
Alias: None
Product: WebKit
Classification: Unclassified
Component: Web Inspector (show other bugs)
Version: Safari 13
Hardware: Mac macOS 10.14
: P2 Normal
Assignee: Nobody
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2019-11-05 14:10 PST by Jeff Johnson
Modified: 2019-11-06 11:30 PST (History)
3 users (show)

See Also:


Attachments
Reproducible test case (261 bytes, text/html)
2019-11-05 14:10 PST, Jeff Johnson
no flags Details
Screenshot 1 (97.36 KB, image/jpeg)
2019-11-05 14:10 PST, Jeff Johnson
no flags Details
Screenshot 2 (86.24 KB, image/jpeg)
2019-11-05 14:11 PST, Jeff Johnson
no flags Details
Screenshot 3 (142.00 KB, image/jpeg)
2019-11-05 14:11 PST, Jeff Johnson
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Jeff Johnson 2019-11-05 14:10:08 PST
Created attachment 382846 [details]
Reproducible test case

When "Preserve Log" is disabled in the Console, the Console is cleared late after a page is loaded. This can cause log messages to be lost. This problem does not occur when "Preserve Log" is enabled.

I discovered this bug because my Safari app extension was logging the window.href on load, but I wasn't always seeing the log message as I was navigating the web and clicking on links. I was able to find an easily reproducible test case, attached as "test.html", which simply logs to the console at various times during page load. You can see in the attached screenshots how the log messages get lost when the page is reloaded and "Preserve Log" is disabled.

The expected behavior is that the log is cleared before the page starts loading, so that all log messages on the page would be displayed.
Comment 1 Jeff Johnson 2019-11-05 14:10:52 PST
Created attachment 382847 [details]
Screenshot 1
Comment 2 Jeff Johnson 2019-11-05 14:11:15 PST
Created attachment 382848 [details]
Screenshot 2
Comment 3 Jeff Johnson 2019-11-05 14:11:42 PST
Created attachment 382849 [details]
Screenshot 3
Comment 4 Jeff Johnson 2019-11-05 14:16:39 PST
I'm reproducing this bug on macOS 10.14.6 (18G1012) using Safari Version 13.0.3 (14608.3.10.10.1) and Safari Technology Preview Release 95 (Safari 13.1, WebKit 14609.1.7)

(By the way, the bug also occurs with all Safari extensions disabled.)
Comment 5 Radar WebKit Bug Importer 2019-11-06 11:30:19 PST
<rdar://problem/56951808>