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

🚨 [BUG] UnsupportedWarning: Status message is not supported by HTTP/2 (RFC7540 8.1.2.4) #12134

Closed
1 task done
JakiChen opened this issue Oct 6, 2024 · 5 comments · Fixed by #12147
Closed
1 task done
Assignees
Labels
needs repro Issue needs a reproduction

Comments

@JakiChen
Copy link

JakiChen commented Oct 6, 2024

Astro Info

Astro                    v4.15.11
Node                     v20.18.0
System                   macOS (x64)
Package Manager          yarn
Output                   server
Adapter                  vercel
Integrations             @storyblok/astro
                         @astrojs/sitemap
                         astro-robots

If this issue only occurs in one browser, which browser is a problem?

No response

Describe the Bug

When https is enabled locally —— UnsupportedWarning: Status message is not supported by HTTP/2 (RFC7540 8.1.2.4)

截屏2024-10-06 23 31 36

What's the expected result?

  1. Make it clear whether this problem is a bug or real feedback, because this problem has not occurred in versions before 4.15.10.
  2. I hope to share the data method of await fetch() that cannot access the endpoint when https is enabled.

Currently, I can only deal with this problem by setting the dangerous behavior NODE_TLS_REJECT_UNAUTHORIZED to 0.

Link to Minimal Reproducible Example

https://owainmavxv.github.stackblitz.io

Participation

  • I am willing to submit a pull request for this issue.
@github-actions github-actions bot added the needs triage Issue needs to be triaged label Oct 6, 2024
@florian-lefebvre florian-lefebvre added the needs repro Issue needs a reproduction label Oct 7, 2024
Copy link
Contributor

github-actions bot commented Oct 7, 2024

Hello @JakiChen. Please provide a minimal reproduction using a GitHub repository or StackBlitz. Issues marked with needs repro will be closed if they have no activity within 3 days.

@github-actions github-actions bot removed the needs triage Issue needs to be triaged label Oct 7, 2024
@bluwy
Copy link
Member

bluwy commented Oct 7, 2024

I'm guessing it's something to do with #12105

@JakiChen
Copy link
Author

JakiChen commented Oct 7, 2024

GitHub repository

To enable local https, you must first install config/certs/server.crt to macOS Keychain Access and set SSL to always allow

Currently, this bug only occurs in Astro version 4.15.11, and versions before 4.15.10 to 4.15.4 are all normal (so it is not clear whether this is a bug or a problem caused by my configuration)

@JakiChen
Copy link
Author

JakiChen commented Oct 7, 2024

heyyy, @bluwy

Currently, this issue has nothing to do with whether the local endpoint is used, but is related to enabling https through vite.server.https. This bug only exists in the latest version 4.15.11.

In addition, if you want to use await fetch() local endpoint locally, you must set

{
  "scripts": {
      "dev": "NODE_EXTRA_CA_CERTS=config/certs/rootCA.crt astro dev",
  }
}

to work properly (but the bug still exists)

@ascorbic ascorbic self-assigned this Oct 7, 2024
@JakiChen
Copy link
Author

JakiChen commented Oct 7, 2024

Add this NODE_OPTIONS="--trace-warnings" yarn dev

{
"scripts": {
    "dev": "NODE_EXTRA_CA_CERTS=config/certs/rootCA.crt NODE_OPTIONS=\"--trace-warnings\" astro dev",
    "start": "astro dev",
    "build": "astro check && astro build",
    "preview": "astro preview",
    "astro": "astro"
  },
}

for detail

 (node:28145) UnsupportedWarning: Status message is not supported by HTTP/2 (RFC7540 8.1.2.4)
    at statusMessageWarn (node:internal/http2/compat:115:13)
    at set statusMessage [as statusMessage] (node:internal/http2/compat:697:5)
    at writeWebResponse (file:///Users/JakiChen/Desktop/cloudflare/node_modules/astro/dist/vite-plugin-astro-server/response.js:49:21)
    at writeSSRResult (file:///Users/JakiChen/Desktop/cloudflare/node_modules/astro/dist/vite-plugin-astro-server/response.js:81:10)
    at handleRoute (file:///Users/JakiChen/Desktop/cloudflare/node_modules/astro/dist/vite-plugin-astro-server/route.js:214:9)
    at async run (file:///Users/JakiChen/Desktop/cloudflare/node_modules/astro/dist/vite-plugin-astro-server/request.js:40:14)
    at async runWithErrorHandling (file:///Users/JakiChen/Desktop/cloudflare/node_modules/astro/dist/vite-plugin-astro-server/controller.js:64:5)
    at async handleRequest (file:///Users/JakiChen/Desktop/cloudflare/node_modules/astro/dist/vite-plugin-astro-server/request.js:34:3)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs repro Issue needs a reproduction
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants