sitespeedio / chrome-har

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

Chrome dev tools cant parse resulting har file #44

Closed juvirez closed 4 years ago

juvirez commented 5 years ago

Chrome Error: Failed to load HAR file with following error: First parameter is expected to be an object. This error about _initiator field. I change field from url string to params.initiator object. It contains an expected structure.

soulgalore commented 5 years ago

Hi @juvirez thanks for the PR, could you include an example trace (that was broken before) as a test?

Best Peter

juvirez commented 5 years ago

If you open generated HAR (example file here) through Chrome DevTools, you will get the error: https://take.ms/ru1wx (without any details). If you compare HAR file with generated by Chrome, you will notice a different structure in _initiator field. I changed _initiator structure and now Chrome opening HAR successfully.

ghost commented 4 years ago

Dear @soulgalore ,

this merge request is instrumental for the now published FOSS tool of the European Data Protection Supervisor (EU-EDPS).

So far, the tool relies on monkey-patched Github branch, which has this change already. However, the EDPS received feedback from Windows users that face installation issues due to dependencies on the git software. I hope that relying only on npmjs.com distribution can resolve this issues.

@juvirez provided upon your question feedback within one day. Please let us know what else we can do to get this PR integrated and released soon.

soulgalore commented 4 years ago

Hi @rriemann-eu thanks for reaching out, I've missed this of all the issues I got. Sorry @juvirez ! I'll release this in a couple of minutes.

@rriemann-eu I didn't know about the website-evidence-collector, looks cool. I'll dig into it, I think its probably have some of the same functionality as https://github.com/sitespeedio/coach so we have probably been trying to solve the same problems on two different places :) I'll go through the code there and add a issue, maybe there are some parts where we could join forces :)

soulgalore commented 4 years ago

This was released as https://github.com/sitespeedio/chrome-har/releases/tag/v0.11.3

ghost commented 4 years ago

Thank you so much for your quick reaction.

@rriemann-eu I didn't know about the website-evidence-collector, looks cool. I'll dig into it, I think its probably have some of the same functionality as https://github.com/sitespeedio/coach so we have probably been trying to solve the same problems on two different places :) I'll go through the code there and add a issue, maybe there are some parts where we could join forces :)

I also quickly looked into your project. I like how the tests are structured into separate files. Also your tool comes already with docker support. While we can certainly learn from some of your methods, I am not sure if our tools have common functionality.

soulgalore commented 4 years ago

I'v reverted the fix, since it broke how we show data in PerfCascade. But I think this was really an upstream issue in Chrome in older versions. When I try with the file https://github.com/sitespeedio/chrome-har/files/3003180/google.har.zip and drop it into devtools, it work s (using Chrome 77).