lighthouse
lighthouse copied to clipboard
Litehouse reporting not using http2 when content delivered using http3
Provide the steps to reproduce
- Run LH on https://www.google.com/?gws_rd=ssl
What is the current behavior?
Lighthouse reports that http/2 is not in use
What is the expected behavior?
Chrome network tools shows H3-29 / H3-Q050 (on my site) and reports the URL as using http/1.1
Environment Information
- Affected Channels:
- Lighthouse version:Lighthouse 7.0.0 Chrome Extension
- Chrome version: 89.0.4389.90
- Node.js version:
- Operating System:
Related issues Maybe https://github.com/GoogleChrome/lighthouse/issues/9788
If this is the extension, then this problem is likely #7326, but the "Use HTTP/2" audit won't appear when you get a report from the extension, so I'm not sure where you're seeing Lighthouse say that h2 is not in use.
Also running the listed url (https://www.google.com/?gws_rd=ssl) via the extension now, it actually does use h2, so the audit would have passed if it were present.
Chrome network tools shows H3-29 / H3-Q050 (on my site) and reports the URL as using http/1.1
You mention your site, so are you actually seeing this problem on a different URL? If that's the case and you're seeing the http/1.1 requests in your server logs or something, #7326 is the issue.
It would be easier to tell what's going on with
- the url you're testing
- the exact unexpected result you're seeing in the lighthouse report
Sorry my mistake this wasn't done in the chrome extension it was from the lighthouse tab in devtools.
Will post the other details requested tomorrow when back at my desk
Please see below two screenshots showing the issue on google.com, these are from Lighthouse in Google Devtools.
Lighthouse report, as you can see http/1.1
Network tab, the top request states H3
I am also experiencing this same issue.
Using Lighthouse 9.1.0 (Node command line tool):
lighthouse https://www.completepropertysuccess.co.uk
The generated Lighthouse report instructs me to use HTTP/2 instead of HTTP/1.1, however when I visit this website in my browser, the network tab of developer tools says that the response is sent via HTTP/3 protocol.
Report details: Captured at Dec 6, 2021. Emulated Moto G4 with Lighthouse 9.1.0 (Node command line tool) - default settings. Using Chromium 96.0.4664.45 with cli
I can't reproduce this on either page, is this happening on every Lighthouse run?
Yes, this happens on every Lighthouse run.
Also I just tried using Lighthouse within Google Chrome DevTools and it gives me the same error: "Use HTTP/2" - then I switch to the 'Network' tab and see the Protocol is h3 🙁
Report details: Captured at Dec 7, 2021. Emulated Moto G4 with Lighthouse 8.5.0 (Google Chrome DevTools) - default settings. Using Google Chrome Version 96.0.4664.93 (Official Build) (64-bit)
I couldn't reproduce this on 50+ attempts :(
Can you provide the contents of your ./latest-run
folder after running lighthouse https://www.completepropertysuccess.co.uk -GA
? Preferably as a gist.
Here you go; https://gist.github.com/brybrant/b54c5c05f4d0feef9e7ce603b2010232
Thanks, this helps narrow down where the problem lies. It looks like Chrome is using http/1.1 as the protocol version in network events.
I took a peak at the network events on my end, and they were using h2 instead of h3. So I can reproduce an incorrect protocol version, but not enough to fail the audit 😕 .
This looks like a Chrome bug.
I just did another test using the Lighthouse browser extension for Firefox and your suspicion seems correct; the report does not claim that the website is using HTTP/1.1
I just did another test using the Lighthouse browser extension for Firefox
This is equivalent to the Chrome extension and doesn't suggest a difference in behavior between FF/Chrome–the extension just uses the PSI API, which runs a special build of headless Chrome on an external server.
@brybrant Some questions:
- What is the output from this command on your machine?
curl https://www.completepropertysuccess.co.uk/ -I
curl https://www.completepropertysuccess.co.uk/ -I -A "Mozilla/5.0 (Linux; Android 7.0; Moto G (4)) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/98.0.4695.0 Mobile Safari/537.36 Chrome-Lighthouse"
- Does Mobile/Desktop option in Lighthouse DevTools panel make a difference?
1(a). Output for first command:
HTTP/2 200
content-type: text/html; charset=utf-8
last-modified: Tue, 07 Dec 2021 18:42:33 GMT
accept-ranges: bytes
content-length: 29898
date: Thu, 09 Dec 2021 09:44:56 GMT
server: LiteSpeed
vary: User-Agent
x-content-type-options: nosniff
x-xss-protection: 1; mode=block
cache-control: max-age=86400, public, must-revalidate
alt-svc: h3=":443"; ma=2592000, h3-29=":443"; ma=2592000, h3-Q050=":443"; ma=2592000, h3-Q046=":443"; ma=2592000, h3
-Q043=":443"; ma=2592000, quic=":443"; ma=2592000; v="43,46"
1(b). Output for second command:
HTTP/2 200
content-type: text/html; charset=utf-8
last-modified: Tue, 07 Dec 2021 18:42:33 GMT
accept-ranges: bytes
content-length: 29898
date: Thu, 09 Dec 2021 09:46:00 GMT
server: LiteSpeed
vary: User-Agent
x-content-type-options: nosniff
x-xss-protection: 1; mode=block
cache-control: max-age=86400, public, must-revalidate
alt-svc: h3=":443"; ma=2592000, h3-29=":443"; ma=2592000, h3-Q050=":443"; ma=2592000, h3-Q046=":443"; ma=2592000, h3
-Q043=":443"; ma=2592000, quic=":443"; ma=2592000; v="43,46"
- Running Lighthouse with 'Desktop' mode selected in Google Chrome DevTools does not report that the website is using HTTP/1.1 - however, using Lighthouse Node CLI with command
lighthouse https://www.completepropertysuccess.co.uk/ --preset=desktop
still claims that the website is using HTTP/1.1
- facing similar issue, lighthouse report showing using HTTP/1.1 when run via
cypress
andlighthouse
though its not shown in diagnostics when running via chrome extension
- When accessing the site in chrome
I have the same issue. @adamraine.
Lighthouse reports that I am using HTTP/1.1, when protocol is reported as HTTP3 (h3).
Thank you! Looking forward to seeing the solution 🙏🏻.
@hecktarzuli that screenshot is not from Lighthouse, but WebPageTest and its network logging.
Do you see the issue when using Lighthouse directly (chrome devtools or CLI), or from PSI?
@connorjclark I removed the comment with the wrong screenshots. Yes this seems to happen in lighthouse too both local and via web.
Local
Web (via Speedcurve)
But hitting the site as a normal user, I get H3
Page Speed Insights doesn't say anything about it, but I also don't see anything about it in the Passed Tests either.
Actually, it would seem this issue is inherent to H3 negotiation. I just cleared my local cache and re-hit our site, and sure enough the 1st hit was 1.1.
https://blog.cloudflare.com/speeding-up-https-and-http-3-negotiation-with-dns/