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

fix: use the native fetch() in Node wherever supported #1447

Merged
merged 1 commit into from
Jul 28, 2023
Merged

Conversation

steveluscher
Copy link
Collaborator

fix: use the native fetch() in Node wherever supported

Summary

Folks are having trouble using the node-fetch polyfill with certain RPC providers that:

  • use chunked-transfer encoding
  • don't send a zero-sized chunk before closing the socket

node-fetch doesn't like this, and fatals.

One easy thing we can do while we figure this all out is to use the native fetch() API included in Node 18+ by default and 17.5+ behind an experimental flag.

Fixes #1418 in Node 18+.

Test Plan

CI run.

# Summary

Folks are having trouble using the `node-fetch` polyfill with certain RPC providers that:

* use chunked-transfer encoding
* don't send a zero-sized chunk before closing the socket

`node-fetch` doesn't like this, and fatals.

One easy thing we can do while we figure this all out is to use the _native_ `fetch()` API included in Node 18+ by default and 17.5+ behind an experimental flag.

Fixes #1418 in Node 18+.

# Test Plan

CI run.
@steveluscher steveluscher merged commit 91405cb into master Jul 28, 2023
6 checks passed
@steveluscher steveluscher deleted the pr1447 branch July 28, 2023 23:27
@github-actions
Copy link
Contributor

🎉 This PR is included in version 1.78.1 🎉

The release is available on:

Your semantic-release bot 📦🚀

@github-actions
Copy link
Contributor

Because there has been no activity on this PR for 14 days since it was merged, it has been automatically locked. Please open a new issue if it requires a follow up.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Aug 15, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Web3.js cannot handle chunked transfer encodings
2 participants