GoogleChrome / lighthouse-ci

Automate running Lighthouse for every commit, viewing the changes, and preventing regressions
Apache License 2.0
6.33k stars 632 forks source link

Can't send a custom user agent generating a Lighthouse report #1003

Open javmurillo opened 6 months ago

javmurillo commented 6 months ago

Describe the bug Can't send a custom user agent because device emulation cannot be disabled, or at least I have no found way to do this.

To Reproduce Running lhci collect --url https://github.com/ -n 1 --disable-device-emulation --chrome-flags="--user-agent='Mozilla/5.0 (Linux; Android 11; moto g power (2022)) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/109.0.0.0 Mobile Safari/537.36 custom-user-agent' --window-size=360,640"

Expected behavior I expected to see the custom-user-agent string in the Lighthouse report.

Logs/Screenshots image image

As you can see both the given resolution and the custom-user-agent is not being applied.

Environment (please complete the following information):

Thank you.