question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

err_http2_protocol_error on node production preview since RC 12

See original GitHub issue

Environment

app # npx nuxi info Nuxi 3.0.0-rc.12
RootDir: /app
Nuxt project info:


  • Operating System: Linux
  • Node Version: v16.18.0
  • Nuxt Version: 3.0.0-rc.12
  • Nitro Version: 0.6.0
  • Package Manager: npm@8.19.2
  • Builder: vite
  • User Config: modules, buildModules, runtimeConfig, image, nitro
  • Runtime Modules: @nuxt/image-edge@1.0.0-27768165.4b0219a
  • Build Modules: @pinia/nuxt@0.4.3

Reproduction

I’ve got the problem on kubernetes in production environnement using https. I’m using the default node-server and run ‘nuxi preview’ to start the server. No errors logs are displayed running the server. Please also note that I try to set NITRO_HOST to ‘0.0.0.0’ without success. Despite logging Listening http://[0.0.0.0]:3000 Instead of Listening http://[::]:3000

Describe the bug

Chrome show me a ERR_HTTP2_PROTOCOL_ERROR error.

It’s more verbose with Curl. I’ve changed the domain name for the exemple

curl -vvv -I https://try.nuxt.com --http2


*   Trying 66.77.888.99:443...
* TCP_NODELAY set
* Connected to try.nuxt.com (66.77.888.99) port 443 (#0)
* ALPN, offering h2
* ALPN, offering http/1.1
* successfully set certificate verify locations:
*   CAfile: /etc/ssl/certs/ca-certificates.crt
  CApath: /etc/ssl/certs
* TLSv1.3 (OUT), TLS handshake, Client hello (1):
* TLSv1.3 (IN), TLS handshake, Server hello (2):
* TLSv1.3 (IN), TLS handshake, Encrypted Extensions (8):
* TLSv1.3 (IN), TLS handshake, Certificate (11):
* TLSv1.3 (IN), TLS handshake, CERT verify (15):
* TLSv1.3 (IN), TLS handshake, Finished (20):
* TLSv1.3 (OUT), TLS change cipher, Change cipher spec (1):
* TLSv1.3 (OUT), TLS handshake, Finished (20):
* SSL connection using TLSv1.3 / TLS_AES_256_GCM_SHA384
* ALPN, server accepted to use h2
* Server certificate:
*  subject: CN=try.nuxt.com
*  start date: Sep  4 18:02:33 2022 GMT
*  expire date: Dec  3 18:02:32 2022 GMT
*  subjectAltName: host "try.nuxt.com" matched cert's "*.try.nuxt.com"
*  issuer: C=US; O=Let's Encrypt; CN=R3
*  SSL certificate verify ok.
* Using HTTP2, server supports multi-use
* Connection state changed (HTTP/2 confirmed)
* Copying HTTP/2 data in stream buffer to connection buffer after upgrade: len=0
* Using Stream ID: 1 (easy handle 0x562fec3c12f0)
> HEAD / HTTP/2
> Host: try.nuxt.com
> user-agent: curl/7.68.0
> accept: */*
> 
* TLSv1.3 (IN), TLS handshake, Newsession Ticket (4):
* TLSv1.3 (IN), TLS handshake, Newsession Ticket (4):
* old SSL session ID is stale, removing
* Connection state changed (MAX_CONCURRENT_STREAMS == 128)!
* HTTP/2 stream 0 was not closed cleanly: PROTOCOL_ERROR (err 1)
* stopped the pause stream!
* Connection #0 to host try.nuxt.com left intact
curl: (92) HTTP/2 stream 0 was not closed cleanly: PROTOCOL_ERROR (err 1)

And using the RC 11

*   Trying 66.77.888.99:443...
* TCP_NODELAY set
* Connected to try.nuxt.com (66.77.888.99) port 443 (#0)
* ALPN, offering h2
* ALPN, offering http/1.1
* successfully set certificate verify locations:
*   CAfile: /etc/ssl/certs/ca-certificates.crt
  CApath: /etc/ssl/certs
* TLSv1.3 (OUT), TLS handshake, Client hello (1):
* TLSv1.3 (IN), TLS handshake, Server hello (2):
* TLSv1.3 (IN), TLS handshake, Encrypted Extensions (8):
* TLSv1.3 (IN), TLS handshake, Certificate (11):
* TLSv1.3 (IN), TLS handshake, CERT verify (15):
* TLSv1.3 (IN), TLS handshake, Finished (20):
* TLSv1.3 (OUT), TLS change cipher, Change cipher spec (1):
* TLSv1.3 (OUT), TLS handshake, Finished (20):
* SSL connection using TLSv1.3 / TLS_AES_256_GCM_SHA384
* ALPN, server accepted to use h2
* Server certificate:
*  subject: CN=try.nuxt.com
*  start date: Sep  4 18:02:33 2022 GMT
*  expire date: Dec  3 18:02:32 2022 GMT
*  subjectAltName: host "try.nuxt.com" matched cert's "*.try.nuxt.com"
*  issuer: C=US; O=Let's Encrypt; CN=R3
*  SSL certificate verify ok.
* Using HTTP2, server supports multi-use
* Connection state changed (HTTP/2 confirmed)
* Copying HTTP/2 data in stream buffer to connection buffer after upgrade: len=0
* Using Stream ID: 1 (easy handle 0x5592cdf452f0)
> HEAD / HTTP/2
> Host: try.nuxt.com
> user-agent: curl/7.68.0
> accept: */*
> 
* TLSv1.3 (IN), TLS handshake, Newsession Ticket (4):
* TLSv1.3 (IN), TLS handshake, Newsession Ticket (4):
* old SSL session ID is stale, removing
* Connection state changed (MAX_CONCURRENT_STREAMS == 128)!
< HTTP/2 301 
HTTP/2 301 
< date: Fri, 21 Oct 2022 13:33:58 GMT
date: Fri, 21 Oct 2022 13:33:58 GMT
< content-type: text/html;charset=UTF-8
content-type: text/html;charset=UTF-8
< location: /en-us
location: /en-us
< x-powered-by: Nuxt
x-powered-by: Nuxt
< server-timing: -;dur=0;desc="Generate"
server-timing: -;dur=0;desc="Generate"
< strict-transport-security: max-age=15724800; includeSubDomains
strict-transport-security: max-age=15724800; includeSubDomains

< 
* Connection #0 to host try.nuxt.com left intact

Additional context

No response

Logs

No response

Issue Analytics

  • State:closed
  • Created a year ago
  • Comments:5 (2 by maintainers)

github_iconTop GitHub Comments

2reactions
danielroecommented, Oct 24, 2022
0reactions
pinchtoolscommented, Oct 21, 2022

experimental.writeEarlyHints to false works @danielroe thanks a lot. I’m not sure to understand why, do you have an explanation?

Read more comments on GitHub >

github_iconTop Results From Across the Web

How To Fix the ERR_HTTP2_PROTOCOL_ERROR - Kinsta
Learn some tips and tricks for how you can fix the err_http2_protocol_error message that prevents you from accessing a web page.
Read more >
What's the net::ERR_HTTP2_PROTOCOL_ERROR about?
I was wondering if it could be related to the header returned by the server since there is this '200' mention in the...
Read more >
Bugs & Issues v4.1.X #626 | Support Center - ABP Commercial
Production release of version 4.0.0 has been released on 2020-12-03 Use the below command to update both ABP CLI and ABP Suite dotnet...
Read more >
ERR_HTTP2_PROTOCOL_ERR...
i have a website www.sampledomain.com developed into .NET Frameowkr 4, hosted on Windows Server 2016 Production with HTTP2 actived by ...
Read more >
Failed to load resource: net::ERR_HTTP2_PROTOCOL_ERROR
[This thread is closed.] Hello, since when I have HTTP2 the backend is not showing well. Images are not there. In the console...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found