Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Expose both user agents in "Runtime settings" #5665

Closed
Svenmay opened this issue Jul 13, 2018 · 2 comments · Fixed by #5871
Closed

Expose both user agents in "Runtime settings" #5665

Svenmay opened this issue Jul 13, 2018 · 2 comments · Fixed by #5871

Comments

@Svenmay
Copy link

Svenmay commented Jul 13, 2018

Provide the steps to reproduce

  1. Run LH on any page. I used https://tolwin.spdns.org/index.html, but that is not important. You need access to the "access.log" of the webserver that is hosting the page under test.

What is the current behavior?

It is just a nit-picking, but probably worth mentioning. The Lighthouse report mentions the "UserAgent" in runtime settings. If you compare that user agent with the real user agent of the test requests, then they don't match.

I don't think this has any impact on the tests itself (at least not for me), but it is a little bit confusing to see requests with different user agents in your webserver's logfile coming from the same tool. Fixing this probably has no high prio, but maybe....if it is easy to fix....would be nice if this could be fixed/aligned.

I have attached two screenshots that hopefully illustrate the problem better. I was able to reproduce the issue on Lighthouse-Extension (3.0.2) and the build-in version of lighthouse in Chrome DevTools (3.0.0-beta.0), but this does NOT happen with the lighthouse test from webpagetest.org.

What is the expected behavior?

The user agent used by lighthouse should be consistent and match with the user agent mentioned in the runtime settings.

Environment Information

  • Affected Channels: Lighthouse-Extension (3.0.2) and the build-in version of lighthouse in Chrome DevTools (3.0.0-beta.0)
  • Lighthouse version:
  • Node.js version:
  • Operating System: CrOS Version 69.0.3473.0 (Offizieller Build) dev (64-Bit)
    useragents_lighthouse_extension
    useragents_lighthouse

Related issues

@patrickhulce
Copy link
Collaborator

Thanks for reporting @Svenmay!

This was actually intentional behavior because by default Lighthouse enables mobile emulation which uses all identical user agent strings. It's really reporting to you the user agent of the host device. Do you have thoughts on a better label that might communicate this? Host user agent:/Generated by device with user agent: or something?

@patrickhulce patrickhulce changed the title Nit: User-Agent shown in report is not the one used for making the request(s) Expose both user agents in "Runtime settings" Jul 17, 2018
@patrickhulce
Copy link
Collaborator

We discussed a bit offline and think the real need is both "What user agent did LH use to make the requests" and "What machine was this report generated on". Both of these seem worthwhile to expose.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants