Issue metadata
Sign in to add a comment
|
chrome.devtools.network.getHAR() is not working
Reported by
weiting....@openx.com,
Apr 3 2018
|
||||||||||||||||||||||
Issue description
UserAgent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_12_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/64.0.3282.140 Safari/537.36
Steps to reproduce the problem:
1. use chrome.devtools.network.getHAR()
What is the expected behavior?
Should return harLog
What went wrong?
Uncaught TypeError: targetDate.getTime is not a function
at SDK.Cookie.expiresDate (inspector.js:3603)
at NetworkLog.HAREntry._buildCookie (inspector.js:6023)
at Array.map (<anonymous>)
at NetworkLog.HAREntry._buildCookies (inspector.js:6022)
at NetworkLog.HAREntry._buildResponse (inspector.js:6009)
at NetworkLog.HAREntry.build (inspector.js:6003)
at NetworkLog.HARLog._convertResource (inspector.js:6039)
at Array.map (<anonymous>)
at NetworkLog.HARLog.build (inspector.js:6033)
at Extensions.ExtensionServer._onGetHAR (inspector.js:7380)
Did this work before? Yes 64
Chrome version: 65.0.3325.181 Channel: stable
OS Version: OS X 10.12.6
Flash Version:
,
Apr 4 2018
,
Apr 4 2018
,
Apr 4 2018
Thanks for filing the issue! Checked the issue on reported chrome version 65.0.3325.181 and on 64.0.3282.186 using Mac 10.12.6 with the below mentioned steps. 1. launched Chrome 2. Navigated to weather.com 3. Inspected the page -> Console 4. Pasted "chrome.devtools.network.getHAR()" We observed similar error in both above mentioned Chrome versions i.e., Uncaught TypeError: Cannot read property 'network' of undefined at <anonymous>:1:17. Attaching the screen shot of the same. @weiting.cheng: Could you please have a look at the screen shot and let us know if we have missed any steps in the process. Any further inputs from your end may help us.
,
Apr 4 2018
,
Apr 4 2018
Hi Vamshi, Thanks for your quick reply, and I don't think chrome.devtools is exposed in console. To better reproduce my problem, you can simply make a chrome devtools and add chrome.devtools.network.getHAR() to it. or 1. Clone the code from https://github.com/angular/batarang, it's a simple devtools extension 2. add chrome.devtools.network.getHAR(), for example, added it in https://github.com/angular/batarang/blob/master/panel/hints/hints.js, which means when you click on Hint tab, it will execute getHAR 3. yarn install, yarn build 4. tried it on chrome, load unpacked, tested it on weather.com. Looks like it related to cookie expire date of request(I guess), and it cannot build.
,
Apr 4 2018
And the error should be TypeError: targetDate.getTime is not a function
,
Apr 4 2018
,
Apr 5 2018
And this used to be worked before 64(include), 65 isn't work.
,
Apr 7 2018
or I found easier way to reproduce it. 1. Go to weather.com and wait to it to load 2. Go to network tab and save har file with content 3. openx console of your devtool, you could see the error mentioned above.
,
Apr 7 2018
Not sure if it is related to recent merge https://chromium-review.googlesource.com/c/chromium/src/+/947255
,
Apr 9 2018
,
Apr 9 2018
upload a gif to demo how to reproduce this bug without any setup.
,
Apr 12 2018
targetDate looks like a string and not a Date. chrome-devtools://devtools/bundled/inspector.html?remoteBase=https://chrome-devtools-frontend.appspot.com/serve_file/@dc3469be277cc962ba01d9c0cb5bb1a265676c36/&can_dock=true&dockSide=undocked
,
Apr 12 2018
If I use a breakpoint to set targetDate = new Date(targetDate) the next error is:
,
Apr 17 2018
,
Apr 17 2018
This may be related to #817970
,
Apr 18 2018
Unable to reproduce the issue on reported chrome version 65.0.3325.181 using Mac 10.13.1 with the below mentioned steps(From comment#10). 1. Launched chrome 2. Navigated to weather.com 3. Inspected the page after it's loading is complete. 3. -> Network tab and saved har file with content 4. Moved to console. We didn't observe any error in console. Attaching the screen cast of the same. @Reporter: Could you please have a look at the screen cast and let us know if we have missed anything in the process. Any further inputs from your end may be helpful. @Eugene Ostroukhov: Could you please let us know if this issue is related to Issue 817970 and help in triaging it further. Thanks!
,
Apr 18 2018
After an upgrade from 65.0.3325.181 (Official Build) (64-bit) to Chrome 66.0.3359.117 (Official Build) (64-bit) [both Windows 10], the date error seems to have gone - I see no errors in the console. But sometimes now the HAR saved is corrupted, the data just ends abruptly. Example included. This doesn't happen consistently.
,
Apr 30 2018
Delete comment ⚐ Same here, After upgrade to chrome66 (MAC), I don't see it happens. but @vamshi, for your question, I guess you don't have enough requests in your network tab. so maybe open devtools then refresh and wait for a while, so you should see more request. Then do the export har action(chrome 65) and the error is not in the console, I saw the error in the console of devtools(undock devtools into separate window, target on devtools, then do option+command+j to open devtools of devtools )
,
May 10 2018
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/56b8dabc3fb627039d9babbaa4707e8b038db4bc commit 56b8dabc3fb627039d9babbaa4707e8b038db4bc Author: Eugene Ostroukhov <eostroukhov@chromium.org> Date: Thu May 10 22:21:57 2018 DevTools: use base64 for files with Unicode characters Bug: 828601 Change-Id: Ia90474edd65f80e432533974ff12d08c4a149ba8 Reviewed-on: https://chromium-review.googlesource.com/1053060 Reviewed-by: Andrey Kosyakov <caseq@chromium.org> Commit-Queue: Eugene Ostroukhov <eostroukhov@chromium.org> Cr-Commit-Position: refs/heads/master@{#557694} [modify] https://crrev.com/56b8dabc3fb627039d9babbaa4707e8b038db4bc/third_party/blink/renderer/devtools/front_end/network/HARWriter.js
,
May 10 2018
Comment #20 had been fixed.
,
May 11 2018
Verified the fix on Mac 10.13.1 using Chrome version #68.0.3427.0 as per the comment #0. Attaching screen shot for reference. Observed that the console didn't show any error message. Hence, the fix is working as expected. Adding the verified labels. Note: Able to reproduce the issue on chrome version with out fix(Followed the steps mentioned in comment#22). Thanks...!!
,
May 11 2018
Thanks!
,
Aug 16
Issue 858968 has been merged into this issue. |
|||||||||||||||||||||||
►
Sign in to add a comment |
|||||||||||||||||||||||
Comment 1 by weiting....@openx.com
, Apr 3 2018