Open amezioud opened 4 years ago
It looks like something is broken upstream or can you show me what's not working in Chrome-har? I don't follow.
what could have happened upstream?
If I start the har capture without reloading, it works everytime without issue.
My netsniffPrototype.js :
Add console.log in chrome-har/lib/entryFromResponse.js
Stdout results (Python call nodejs script using subprocess.run() ) :
2020-02-24:12:39:28,092 INFO [netsniffPrototype.js:296] <Thread(Thread-1, started daemon 140015018862336)> Stop Har events
page.wallTime = 1582544363.28644 timing.requestTime = 6971.141358 page.timestamp 6971.138063 dayjs.unix(entrySecs).toISOString() = 2020-02-24T11:39:23.289Z
page.wallTime = undefined timing.requestTime = 6971.149286 page.timestamp = undefined
2020-02-24:12:39:28,101 ERROR [netsniffPrototype.js:303] <Thread(Thread-1, started daemon 140015018862336)> Process exitHarNotStopped event Har not stopped properly ! e.stack => RangeError: Invalid time value at Date.toISOString ()
at h.d.toISOString (/home/pptruser/node_modules/dayjs/dayjs.min.js:1:6372)
at module.exports (/home/pptruser/node_modules/chrome-har/lib/entryFromResponse.js:161:53)
at harFromMessages (/home/pptruser/node_modules/chrome-har/index.js:310:15)
at PuppeteerHar.stop (/home/pptruser/node_modules/puppeteer-har/lib/PuppeteerHar.js:109:21)
at runMicrotasks ()
at processTicksAndRejections (internal/process/task_queues.js:97:5)