| Summary: | Web Inspector: ITPDebug does not write to terminal / console | ||
|---|---|---|---|
| Product: | WebKit | Reporter: | Cory Underwood <cory> |
| Component: | Web Inspector | Assignee: | Nobody <webkit-unassigned> |
| Status: | REOPENED --- | ||
| Severity: | Normal | CC: | charliew, inspector-bugzilla-changes, webkit-bug-importer, wenson_hsieh, wilander |
| Priority: | P2 | Keywords: | InRadar |
| Version: | Safari 16 | ||
| Hardware: | Unspecified | ||
| OS: | All | ||
|
Description
Cory Underwood
2023-01-18 12:09:30 PST
Can you see if this still reproduces for you on the latest Safari? I am able to see ITP debug messages using log stream. Including the messages regarding third-party IP cookie capping. [com.apple.WebKit:ITPDebug] Capped the expiry of third-party IP address cookie named X. I am running Safari 17.0 (19616.1.27.111.16) I enabled 'Enable Intelligent Tracking Prevention debug mode' under Developer > Developer. I navigate to key.com (Key Bank - used for example purposes). Key bank uses Adobe Analytics, and it makes a Network call to metrics.key.com On the response to that request, it sets a s_ecid cookie for two years in Chrome. Safari sets this same cookie for 7 days (expected). However, Despite the fact the flag has been enabled: Executing 'log stream -info | grep ITPDebug' from Terminal prior to navigation does not find any messages upon page loading / refreshing with the debug flag enabled, even for sites I know should alert to cookie expire truncation due to CNAME record usage or coming from a known tracker source. Using Console and searching for 'ITPDebug' with info messages enabled prior to navigation does not find any messages upon page loading / refreshing with the debug flag enabled, even for sites I know should alert to cookie expire truncation due to CNAME record usage or coming from a known tracker source. In the Safari JS console the following happens I get info messages that state: [ITP] Applying cross-site tracking restrictions to: [array of domains]. [ITP] Done applying cross-site tracking restrictions The functionality of the code appears to be working. If I switch to private mode, all the various trackers are blocked as expected and the debug information writes to the console stating the tracker was blocked. It's just the log stream in normal mode appears to have an issue. This used to work for me, and I am not sure why I can't see the more detailed logs in the logstream in either method (console or terminal). Has the syntax on what I should be grepping for changed? Am I missing a step in this process? I don't see anything obvious that would explain why this logging isn't showing up for you. Do you ever see any ITP debug logging with that log stream command? You should see "Turned ITP Debug Mode on." / "Turned ITP Debug Mode off." when enabling/disabling ITP debug mode. Do you see any WebKit logging at all? You can check using "log stream --process com.apple.WebKit". Is "Prevent cross-site tracking" enabled in your Safari privacy settings? If it's relevant I have been conducting this testing on a M1 Macbook Air running macOS Sonoma 14. Testing has primarily been in Terminal running a zsh shell. The user account has Admin privileges. "Do you ever see any ITP debug logging with that log stream command? You should see "Turned ITP Debug Mode on." / "Turned ITP Debug Mode off." when enabling/disabling ITP debug mode." When enabling or disabling ITP Debug mode, I do see those messages, but only in Safari's Console. I do not see them in the Terminal Window or the Console Application Logs. "Do you see any WebKit logging at all? You can check using "log stream --process com.apple.WebKit"." When typing that command, I do see log information from Safari in Terminal. Information such as if the window is in focus, CPU usage, the memory footprint and other log information. "Is "Prevent cross-site tracking" enabled in your Safari privacy settings?" This feature is enabled. Just to check - I ran these same tests on a older iMac I have running macOS Monterey version 12.6.8 and Safari Version 16.6 (17615.3.12.11.3, 17615) with the same results. General WebKit logs do work correctly, ITPDebug log messages do not seem to be being sent to the to the log file. If this is something with my specific environment I am unable to isolate it. As far as I can tell the functionality works as expected (reduced cookie lifespan) but the logging seems to not be working. Toggling the ITPDebug feature on / off in the developer menu does cause the Activation and Deactivation messages be written to the Safari Console, but regardless of activation nothing appears in the system logs as far as I can see. |