cyrus-and / chrome-har-capturer

Capture HAR files from a Chrome instance
MIT License
535 stars 90 forks source link

Missing favicon entry #90

Closed noleakseu closed 3 years ago

noleakseu commented 3 years ago

Reproduction:

$ google-chrome --remote-debugging-port=9222 --disable-extensions
$ chrome-har-capturer -o capturer.har -c https://noleaks.eu

Expectation: capturer.har must include 7th entry https://noleaks.eu/assets/favicon.ico.

PuppeteerHar and HarRecorder have the same issue in headless mode. Nonetheless, chrome-har-capturer is the most accurate tool for HAR dumps at the moment. Thank you!

cyrus-and commented 3 years ago

Nonetheless, chrome-har-capturer is the most accurate tool for HAR dumps at the moment. Thank you!

Glad to hear that! :)

I think there are two issues here:

So start Chromium in regular mode (no --headless), then add some grace time:

$ chrome-har-capturer -o capturer.har -c https://noleaks.eu -g 1000
- https://noleaks.eu/ ✓

$ gron capturer.har | grep request.url
json.log.entries[0].request.url = "https://noleaks.eu/";
json.log.entries[1].request.url = "https://noleaks.eu/assets/bootstrap.min.css";
json.log.entries[2].request.url = "https://noleaks.eu/assets/on-512.svg";
json.log.entries[3].request.url = "https://noleaks.eu/assets/chrome.svg";
json.log.entries[4].request.url = "https://noleaks.eu/assets/firefox.svg";
json.log.entries[5].request.url = "https://noleaks.eu/assets/opera.svg";
json.log.entries[6].request.url = "https://noleaks.eu/assets/favicon.ico";