catapult-project / catapult

Deprecated Catapult GitHub. Please instead use http://crbug.com "Speed>Benchmarks" component for bugs and https://chromium.googlesource.com/catapult for downloading and editing source code..
https://chromium.googlesource.com/catapult
BSD 3-Clause "New" or "Revised" License
1.91k stars 563 forks source link

[Wpr-Go]Doesn't work in headless mode #4532

Closed DavyCao closed 5 years ago

DavyCao commented 6 years ago

Wpr-Go doesn't seem to work in headless mode.

Below is command I am using: Terminal 1: go run src/wpr.go replay --http_port=8080 --https_port=8081 /tmp/example.wprgo Terminal 2: chrome --headless --disable-gpu --crash-dumps-dir=/tmp/chrome_crash_dump --user-data-dir=/tmp --ignore-certificate-errors-spki-list=PhrPvGIaAMmd29hj8BCZOq096yj7uMpRNHpn5PDxI6I= --host-resolver-rules="MAP *:80 127.0.0.1:8080,MAP *:443 127.0.0.1:8081,EXCLUDE localhost" --dump-dom https://www.example.com

Then only this show up: [0703/000751.135359:ERROR:gpu_process_transport_factory.cc(1007)] Lost UI shared context. <html><head></head><body></body></html>


If I use chrome headless without Wpr-Go, I can see the page loaded. Command: chrome --headless --disable-gpu --user-data-dir=/tmp --crash-dumps-dir=/tmp/chrome_crash_dump --dump-dom https://www.example.com Result: Dom of example.com shows up.

I also tried WprGo with the chrome browser UI, it works well. Does anyone know if WprGo works in headless mode? Or if I did something wrong?

DavyCao commented 5 years ago

My bad, installing the test root CA works.