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] - UND_ERR_CONNECT_TIMEOUT #1544

Open
godlovericea opened this issue Nov 27, 2024 · 3 comments
Open

🐛 [BUG] - UND_ERR_CONNECT_TIMEOUT #1544

godlovericea opened this issue Nov 27, 2024 · 3 comments
Assignees
Milestone

Comments

@godlovericea
Copy link

godlovericea commented Nov 27, 2024

Description

https://docs.vechain.org/developer-resources/sdks-and-providers/sdk/thor-client

I readed the docs, but the TESTNET_URL or MAINNET_URL can not fetch

methodName: 'HttpClient.http()',
errorMessage: 'fetch failed',
data: { method: 'GET', url: 'https://mainnet.vechain.org/blocks/best' },

methodName: 'HttpClient.http()',
errorMessage: 'fetch failed',
data: { method: 'GET', url: 'https://testnet.vechain.org/blocks/best' },

Reproduction URL

No response

Reproduction steps

const Test_Vet_NetWork = async () => {
    // const thorSoloClient = ThorClient.at(MAINNET_URL, {
    //     isPollingEnabled: false
    // });
    const httpClient = new SimpleHttpClient(TESTNET_URL);
    const thorSoloClient = new ThorClient(httpClient);
    try {
        const latestBlock = await thorSoloClient.blocks.getBestBlockCompressed();
        console.log(latestBlock);
    } catch (error) {
        console.error("Error fetching the latest block:", error);
    }
}

Screenshots


image

![DESCRIPTION](LINK.png)

Logs

No response

OS

No response

@godlovericea
Copy link
Author

image

@freemanzMrojo
Copy link
Member

Hi @godlovericea,

We haven't come across an error like this in our test suite for the mainnet ones, could you check if this error described here makes sense to you (related to the Node version)? nodejs/undici#1531

Thanks in advance!

@Behnoudmst
Copy link

Behnoudmst commented Dec 31, 2024

I am getting this error on nextjs + Vercel + node 20, any workarounds ?

TypeError: fetch failed
    at /opt/rust/undici-runtime.js:41:5170 {
  [cause]: Error: write ETIMEDOUT

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

No branches or pull requests

5 participants