HAR log generated by chrome.devtools.network.getHAR is missing startedDateTime
Reported by
xmh...@gmail.com,
May 10 2017
|
||||||||
Issue descriptionUserAgent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:45.0) Gecko/20100101 Firefox/45.0 Steps to reproduce the problem: 1. Call interface "chrome.devtools.network.getHAR" from devtools_page to dump the HAR log. 2. View the startedDateTime fields(request start time). What is the expected behavior? The HAR log exported by "chrome.devtools.network.getHAR" should conform to HAR 1.2 Spec. For pages: startedDateTime [string] - Date and time stamp for the beginning of the page load (ISO 8601 - YYYY-MM-DDThh:mm:ss.sTZD, e.g. 2009-07-24T19:20:30.45+01:00). or For entries: startedDateTime [string] - Date and time stamp of the request start (ISO 8601 - YYYY-MM-DDThh:mm:ss.sTZD). What went wrong? The startedDataTime in HAR log exported by "chrome.devtools.network.getHAR" is not a string, but an empty JSON object without any time stamp information. Did this work before? No Does this work in other browsers? Yes Chrome version: 58.0.3029.96 (Official Build) (64-bit) Channel: stable OS Version: Windows 7 Flash Version: Shockwave Flash 24.0.0.189
,
May 11 2017
I'm not able to view the issue https://bugs.chromium.org/p/chromium/issues/detail?id=714301 Reason: User is not allowed to view this issue The issue described in "https://bugs.chromium.org/p/chromium/issues/detail?id=716167" is not the same as what I reported here. We are developing a Chrome extension to get HAR log once after a page is loaded. This issue is blocking us from analyzing the result. During the period of developers from chromium project investigate this issue, is there any workaround? Can I use chrome.debugger.* API to achieve the some goal? I searched about this API, some guys said it is low level APIs with limited documentation, I hesitate to try it... Thanks!
,
May 11 2017
,
May 15 2017
,
May 18 2017
Thanks for the report. When I do "chrome.devtools.network.getHAR(x => console.log(x.entries[0].startedDateTime))" in console, it looks like the result is a Date object, not a string. The HAR log spec does indicate it should be a string value. As for a workaround, your callback to getHAR could call .toString() on the startedDateTime field, and JSON.stringify() should still correctly show the date in ISO format. allada@, could you please take a look? cc'ing caseq@ for DevTools extension knowledge.
,
May 18 2017
,
May 22 2017
luoe, Thanks for the workaround! I use toISOString() on the field in the callback, works! Not sure why I observed an empty object, may be it lose its content on the way when devtools.js post message to background.js then to content.js. Anyway, thanks again!
,
Jul 6 2017
,
Jul 11 2017
,
Jul 20 2017
This should have been fixed. |
||||||||
►
Sign in to add a comment |
||||||||
Comment 1 by ligim...@chromium.org
, May 10 2017Labels: Needs-Triage-M58