sitespeedio / chrome-har

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

Not working with a blank / empty page ? #27

Open benoitmercusot opened 5 years ago

benoitmercusot commented 5 years ago

Just curious.

When i try

const puppeteer = require('puppeteer'); const PuppeteerHar = require('puppeteer-har');

(async () => { const browser = await puppeteer.launch(); const page = await browser.newPage();

const har = new PuppeteerHar(page);
await har.start({ path: 'results.har' });

await page.goto('https://www.mbcreation.net/har/index.html');
await har.stop();
await browser.close();

})();

Response is

{"log":{"version":"1.2","creator":{"name":"chrome-har","version":"0.2.3","comment":"https://github.com/sitespeedio/chrome-har"},"pages":[],"entries":[]}}

Destination page is actually empty but i thought i would have load time for it anyway ?

Har Thanks for your answer / help
soulgalore commented 5 years ago

Hi @benoitmercusot I've seen multiple bugs where it seems that Puppeteer doesn't create the same trace log as if you run Chrome standalone. Could you create a gist with the full trace log (can you get that from puppeteer-har?) that you get so we can make a test case?

Best Peter