sitespeedio / chrome-har

Create HAR files from Chrome Debugging Protocol data
MIT License
149 stars 50 forks source link

Verify that the timing exists before we use it to fix https://github.… #22

Closed soulgalore closed 6 years ago

soulgalore commented 6 years ago

…com/sitespeedio/sitespeed.io/issues/2068

tobli commented 6 years ago

Cool. It seems Chrome is leaving out timing information for XHR responses that fail. This fixes the crashes, but the resulting HAR files aren't valid, so some additional tweaks are needed.

~/Development/chrome-har(master ✗) har validate hudl.com-failing-xhr.har
[hudl.com-failing-xhr.har]
✖ validation failed on .log.entries[47].time: should be number
✖ validation failed on .log.entries[47].timings.receive: should be number
✖ validation failed on .log.entries[55].time: should be number
✖ validation failed on .log.entries[55].timings.receive: should be number
✖ validation failed on .log.entries[91].time: should be number
✖ validation failed on .log.entries[91].timings.receive: should be number
✖ validation failed on .log.entries[95].time: should be number
✖ validation failed on .log.entries[95].timings.receive: should be number