-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
Undici timeouts are not handled correctly #3136
Comments
This issue is also being tracked on Linear. We use Linear to manage our development process, but we keep the conversations on Github. LINEAR-ID: 14ad93d2-d907-4826-a94c-3e9132847d06 |
Is this issue open to work? |
@ernestosperanza sure, but make sure that you can reproduce the issue (check #2672) and that your fix indeed fixes it (see https://github.com/NomicFoundation/hardhat/blob/main/CONTRIBUTING.md#developing-locally to learn how to test a fix locally). |
is this issue available to solve? |
It is, but check my previous comment. |
This is a blocking problem for me. Hoping we get a solution soon. Its worth noting that I see this problem (code "UND_ERR_HEADERS_TIMEOUT" only when I run on LocalHost. When I run the same code on on the transient bockchain (with hh test) I get no error. |
Workaround from @samlaf : #2672 (comment) |
I started working on this in #3665 |
is this error relevant? @alcuadrado @fvictorio I got this error when I run hardhat node on a VPS, but I cannot reproduce it locally on my PC |
I'm having a similar issue to #2672 with requests that take more than ~20s, it seems that the Hardhat provider (more specifically Undici) will timeout. If anyone is in a similar situation, using the Ethers provider |
Any update on this? Or workaround? I have the issue when trying to deploy smart contract on the Hedera Mainnet. |
SCS failed to deploy on Hedera Mainnet without this timeout: ``` HeadersTimeoutError: Headers Timeout Error at Timeout.onParserTimeout [as callback] (/home/coder/usecase/node_modules/undici/lib/client.js:1048:28) at Timeout.onTimeout [as _onTimeout] (/home/coder/usecase/node_modules/undici/lib/timers.js:20:13) at listOnTimeout (node:internal/timers:573:17) at processTimers (node:internal/timers:514:7) { code: 'UND_ERR_HEADERS_TIMEOUT' } 14081 | console.warn("The node you are deploying to does not have access to a private key to sign this transaction."); 14082 | } 14083 | if (verify && import_lodash.isEmpty(process.env.ETHERSCAN_API_KEY)) { 14084 | throw new Error("It is not possible to verify the deployment on this network unless you supply an Etherscan API key in the hardht.config.ts file"); 14085 | } ``` NomicFoundation/hardhat#2672 They have open issue to fix it: NomicFoundation/hardhat#3136 This error happened for me only on Hedera Mainnet, testnet works fine. <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit - **New Features** - Added a `timeout` parameter with a value of `100_000` to the BTP configuration in the projects. - The `timeout` property affects the BTP RPC settings for improved functionality. <!-- end of auto-generated comment: release notes by coderabbit.ai -->
SCS failed to deploy on Hedera Mainnet without this timeout: ``` HeadersTimeoutError: Headers Timeout Error at Timeout.onParserTimeout [as callback] (/home/coder/usecase/node_modules/undici/lib/client.js:1048:28) at Timeout.onTimeout [as _onTimeout] (/home/coder/usecase/node_modules/undici/lib/timers.js:20:13) at listOnTimeout (node:internal/timers:573:17) at processTimers (node:internal/timers:514:7) { code: 'UND_ERR_HEADERS_TIMEOUT' } 14081 | console.warn("The node you are deploying to does not have access to a private key to sign this transaction."); 14082 | } 14083 | if (verify && import_lodash.isEmpty(process.env.ETHERSCAN_API_KEY)) { 14084 | throw new Error("It is not possible to verify the deployment on this network unless you supply an Etherscan API key in the hardht.config.ts file"); 14085 | } ``` NomicFoundation/hardhat#2672 They have open issue to fix it: NomicFoundation/hardhat#3136 This error happened for me only on Hedera Mainnet, testnet works fine. <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit - **New Features** - Added a `timeout` parameter with a value of `100_000` to the BTP configuration in the projects. - The `timeout` property affects the BTP RPC settings for improved functionality. <!-- end of auto-generated comment: release notes by coderabbit.ai -->
SCS failed to deploy on Hedera Mainnet without this timeout: ``` HeadersTimeoutError: Headers Timeout Error at Timeout.onParserTimeout [as callback] (/home/coder/usecase/node_modules/undici/lib/client.js:1048:28) at Timeout.onTimeout [as _onTimeout] (/home/coder/usecase/node_modules/undici/lib/timers.js:20:13) at listOnTimeout (node:internal/timers:573:17) at processTimers (node:internal/timers:514:7) { code: 'UND_ERR_HEADERS_TIMEOUT' } 14081 | console.warn("The node you are deploying to does not have access to a private key to sign this transaction."); 14082 | } 14083 | if (verify && import_lodash.isEmpty(process.env.ETHERSCAN_API_KEY)) { 14084 | throw new Error("It is not possible to verify the deployment on this network unless you supply an Etherscan API key in the hardht.config.ts file"); 14085 | } ``` NomicFoundation/hardhat#2672 They have open issue to fix it: NomicFoundation/hardhat#3136 This error happened for me only on Hedera Mainnet, testnet works fine. <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit - **New Features** - Added a `timeout` parameter with a value of `100_000` to the BTP configuration in the projects. - The `timeout` property affects the BTP RPC settings for improved functionality. <!-- end of auto-generated comment: release notes by coderabbit.ai -->
SCS failed to deploy on Hedera Mainnet without this timeout: ``` HeadersTimeoutError: Headers Timeout Error at Timeout.onParserTimeout [as callback] (/home/coder/usecase/node_modules/undici/lib/client.js:1048:28) at Timeout.onTimeout [as _onTimeout] (/home/coder/usecase/node_modules/undici/lib/timers.js:20:13) at listOnTimeout (node:internal/timers:573:17) at processTimers (node:internal/timers:514:7) { code: 'UND_ERR_HEADERS_TIMEOUT' } 14081 | console.warn("The node you are deploying to does not have access to a private key to sign this transaction."); 14082 | } 14083 | if (verify && import_lodash.isEmpty(process.env.ETHERSCAN_API_KEY)) { 14084 | throw new Error("It is not possible to verify the deployment on this network unless you supply an Etherscan API key in the hardht.config.ts file"); 14085 | } ``` NomicFoundation/hardhat#2672 They have open issue to fix it: NomicFoundation/hardhat#3136 This error happened for me only on Hedera Mainnet, testnet works fine. <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit - **New Features** - Added a `timeout` parameter with a value of `100_000` to the BTP configuration in the projects. - The `timeout` property affects the BTP RPC settings for improved functionality. <!-- end of auto-generated comment: release notes by coderabbit.ai -->
SCS failed to deploy on Hedera Mainnet without this timeout: ``` HeadersTimeoutError: Headers Timeout Error at Timeout.onParserTimeout [as callback] (/home/coder/usecase/node_modules/undici/lib/client.js:1048:28) at Timeout.onTimeout [as _onTimeout] (/home/coder/usecase/node_modules/undici/lib/timers.js:20:13) at listOnTimeout (node:internal/timers:573:17) at processTimers (node:internal/timers:514:7) { code: 'UND_ERR_HEADERS_TIMEOUT' } 14081 | console.warn("The node you are deploying to does not have access to a private key to sign this transaction."); 14082 | } 14083 | if (verify && import_lodash.isEmpty(process.env.ETHERSCAN_API_KEY)) { 14084 | throw new Error("It is not possible to verify the deployment on this network unless you supply an Etherscan API key in the hardht.config.ts file"); 14085 | } ``` NomicFoundation/hardhat#2672 They have open issue to fix it: NomicFoundation/hardhat#3136 This error happened for me only on Hedera Mainnet, testnet works fine. <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit - **New Features** - Added a `timeout` parameter with a value of `100_000` to the BTP configuration in the projects. - The `timeout` property affects the BTP RPC settings for improved functionality. <!-- end of auto-generated comment: release notes by coderabbit.ai -->
SCS failed to deploy on Hedera Mainnet without this timeout: ``` HeadersTimeoutError: Headers Timeout Error at Timeout.onParserTimeout [as callback] (/home/coder/usecase/node_modules/undici/lib/client.js:1048:28) at Timeout.onTimeout [as _onTimeout] (/home/coder/usecase/node_modules/undici/lib/timers.js:20:13) at listOnTimeout (node:internal/timers:573:17) at processTimers (node:internal/timers:514:7) { code: 'UND_ERR_HEADERS_TIMEOUT' } 14081 | console.warn("The node you are deploying to does not have access to a private key to sign this transaction."); 14082 | } 14083 | if (verify && import_lodash.isEmpty(process.env.ETHERSCAN_API_KEY)) { 14084 | throw new Error("It is not possible to verify the deployment on this network unless you supply an Etherscan API key in the hardht.config.ts file"); 14085 | } ``` NomicFoundation/hardhat#2672 They have open issue to fix it: NomicFoundation/hardhat#3136 This error happened for me only on Hedera Mainnet, testnet works fine. <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit - **New Features** - Added a `timeout` parameter with a value of `100_000` to the BTP configuration in the projects. - The `timeout` property affects the BTP RPC settings for improved functionality. <!-- end of auto-generated comment: release notes by coderabbit.ai -->
SCS failed to deploy on Hedera Mainnet without this timeout: ``` HeadersTimeoutError: Headers Timeout Error at Timeout.onParserTimeout [as callback] (/home/coder/usecase/node_modules/undici/lib/client.js:1048:28) at Timeout.onTimeout [as _onTimeout] (/home/coder/usecase/node_modules/undici/lib/timers.js:20:13) at listOnTimeout (node:internal/timers:573:17) at processTimers (node:internal/timers:514:7) { code: 'UND_ERR_HEADERS_TIMEOUT' } 14081 | console.warn("The node you are deploying to does not have access to a private key to sign this transaction."); 14082 | } 14083 | if (verify && import_lodash.isEmpty(process.env.ETHERSCAN_API_KEY)) { 14084 | throw new Error("It is not possible to verify the deployment on this network unless you supply an Etherscan API key in the hardht.config.ts file"); 14085 | } ``` NomicFoundation/hardhat#2672 They have open issue to fix it: NomicFoundation/hardhat#3136 This error happened for me only on Hedera Mainnet, testnet works fine. <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit - **New Features** - Added a `timeout` parameter with a value of `100_000` to the BTP configuration in the projects. - The `timeout` property affects the BTP RPC settings for improved functionality. <!-- end of auto-generated comment: release notes by coderabbit.ai -->
SCS failed to deploy on Hedera Mainnet without this timeout: ``` HeadersTimeoutError: Headers Timeout Error at Timeout.onParserTimeout [as callback] (/home/coder/usecase/node_modules/undici/lib/client.js:1048:28) at Timeout.onTimeout [as _onTimeout] (/home/coder/usecase/node_modules/undici/lib/timers.js:20:13) at listOnTimeout (node:internal/timers:573:17) at processTimers (node:internal/timers:514:7) { code: 'UND_ERR_HEADERS_TIMEOUT' } 14081 | console.warn("The node you are deploying to does not have access to a private key to sign this transaction."); 14082 | } 14083 | if (verify && import_lodash.isEmpty(process.env.ETHERSCAN_API_KEY)) { 14084 | throw new Error("It is not possible to verify the deployment on this network unless you supply an Etherscan API key in the hardht.config.ts file"); 14085 | } ``` NomicFoundation/hardhat#2672 They have open issue to fix it: NomicFoundation/hardhat#3136 This error happened for me only on Hedera Mainnet, testnet works fine. <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit - **New Features** - Added a `timeout` parameter with a value of `100_000` to the BTP configuration in the projects. - The `timeout` property affects the BTP RPC settings for improved functionality. <!-- end of auto-generated comment: release notes by coderabbit.ai -->
SCS failed to deploy on Hedera Mainnet without this timeout: ``` HeadersTimeoutError: Headers Timeout Error at Timeout.onParserTimeout [as callback] (/home/coder/usecase/node_modules/undici/lib/client.js:1048:28) at Timeout.onTimeout [as _onTimeout] (/home/coder/usecase/node_modules/undici/lib/timers.js:20:13) at listOnTimeout (node:internal/timers:573:17) at processTimers (node:internal/timers:514:7) { code: 'UND_ERR_HEADERS_TIMEOUT' } 14081 | console.warn("The node you are deploying to does not have access to a private key to sign this transaction."); 14082 | } 14083 | if (verify && import_lodash.isEmpty(process.env.ETHERSCAN_API_KEY)) { 14084 | throw new Error("It is not possible to verify the deployment on this network unless you supply an Etherscan API key in the hardht.config.ts file"); 14085 | } ``` NomicFoundation/hardhat#2672 They have open issue to fix it: NomicFoundation/hardhat#3136 This error happened for me only on Hedera Mainnet, testnet works fine. <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit - **New Features** - Added a `timeout` parameter with a value of `100_000` to the BTP configuration in the projects. - The `timeout` property affects the BTP RPC settings for improved functionality. <!-- end of auto-generated comment: release notes by coderabbit.ai -->
SCS failed to deploy on Hedera Mainnet without this timeout: ``` HeadersTimeoutError: Headers Timeout Error at Timeout.onParserTimeout [as callback] (/home/coder/usecase/node_modules/undici/lib/client.js:1048:28) at Timeout.onTimeout [as _onTimeout] (/home/coder/usecase/node_modules/undici/lib/timers.js:20:13) at listOnTimeout (node:internal/timers:573:17) at processTimers (node:internal/timers:514:7) { code: 'UND_ERR_HEADERS_TIMEOUT' } 14081 | console.warn("The node you are deploying to does not have access to a private key to sign this transaction."); 14082 | } 14083 | if (verify && import_lodash.isEmpty(process.env.ETHERSCAN_API_KEY)) { 14084 | throw new Error("It is not possible to verify the deployment on this network unless you supply an Etherscan API key in the hardht.config.ts file"); 14085 | } ``` NomicFoundation/hardhat#2672 They have open issue to fix it: NomicFoundation/hardhat#3136 This error happened for me only on Hedera Mainnet, testnet works fine. <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit - **New Features** - Added a `timeout` parameter with a value of `100_000` to the BTP configuration in the projects. - The `timeout` property affects the BTP RPC settings for improved functionality. <!-- end of auto-generated comment: release notes by coderabbit.ai -->
Were you able to resolve this? |
I've added following setting to hardhat.config: |
When upgrading to undici we introduced two problems:
bodyTimeout
hereRelated to #2672
The text was updated successfully, but these errors were encountered: