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

FetchError: network timeout when calling "display-status" and "run-party" many times #13

Open
emeraldhieu opened this issue Sep 16, 2021 · 2 comments

Comments

@emeraldhieu
Copy link

emeraldhieu commented Sep 16, 2021

Hi vfat,

It looks like the error happens after calling a method for the second time.

First time I queried for status successfully. The second time the error occurs. Not sure if there's any quota related to the method calls? I went to Etherscan.com and checked the API Keys' stats and saw empty API statistics.

Pretty sure my Internet connection is fine.

hieunguyen@hieunguyen adventure-party % npm run display-status

> [email protected] display-status
> hardhat run --network fantom scripts/status.ts

Creating Typechain artifacts in directory typechain for target ethers-v5
Successfully generated Typechain artifacts!
my Adventurers: 
Barbarian (2448258): level: 1, xp: 250.0 (nb days to level up: 3). Next leveling 9/17/2021, 8:00:20 PM
Bard (2448259): level: 1, xp: 250.0 (nb days to level up: 3). Next leveling 9/17/2021, 8:00:20 PM

hieunguyen@hieunguyen adventure-party % npm run run-party

> [email protected] run-party
> hardhat run --network fantom scripts/run.ts

Creating Typechain artifacts in directory typechain for target ethers-v5
Successfully generated Typechain artifacts!
hieunguyen@hieunguyen adventure-party % npm run run-party

> [email protected] run-party
> hardhat run --network fantom scripts/run.ts

Creating Typechain artifacts in directory typechain for target ethers-v5
Successfully generated Typechain artifacts!
HardhatError: HH109: Network connection timed out.
Please check your internet connection and networks config
    at HttpProvider._fetchJsonRpcResponse (/Users/hieunguyen/Downloads/Rarity/adventure-party/node_modules/hardhat/src/internal/core/providers/http.ts:184:15)
    at processTicksAndRejections (node:internal/process/task_queues:96:5)
    at HttpProvider.request (/Users/hieunguyen/Downloads/Rarity/adventure-party/node_modules/hardhat/src/internal/core/providers/http.ts:55:29)
    at GanacheGasMultiplierProvider._isGanache (/Users/hieunguyen/Downloads/Rarity/adventure-party/node_modules/hardhat/src/internal/core/providers/gas-providers.ts:315:30)
    at GanacheGasMultiplierProvider.request (/Users/hieunguyen/Downloads/Rarity/adventure-party/node_modules/hardhat/src/internal/core/providers/gas-providers.ts:304:23)
    at EthersProviderWrapper.send (/Users/hieunguyen/Downloads/Rarity/adventure-party/node_modules/@nomiclabs/hardhat-ethers/src/internal/ethers-provider-wrapper.ts:13:20)
    at Object.getSigners (/Users/hieunguyen/Downloads/Rarity/adventure-party/node_modules/@nomiclabs/hardhat-ethers/src/internal/helpers.ts:23:20)

    Caused by: FetchError: network timeout at: https://rpc.ftm.tools/
        at Timeout.<anonymous> (/Users/hieunguyen/Downloads/Rarity/adventure-party/node_modules/node-fetch/lib/index.js:1454:13)
        at listOnTimeout (node:internal/timers:557:17)
        at processTimers (node:internal/timers:500:7)
hieunguyen@hieunguyen adventure-party % npm run run-party

> [email protected] run-party
> hardhat run --network fantom scripts/run.ts

Creating Typechain artifacts in directory typechain for target ethers-v5
Successfully generated Typechain artifacts!
HardhatError: HH109: Network connection timed out.
Please check your internet connection and networks config
    at HttpProvider._fetchJsonRpcResponse (/Users/hieunguyen/Downloads/Rarity/adventure-party/node_modules/hardhat/src/internal/core/providers/http.ts:184:15)
    at processTicksAndRejections (node:internal/process/task_queues:96:5)
    at HttpProvider.request (/Users/hieunguyen/Downloads/Rarity/adventure-party/node_modules/hardhat/src/internal/core/providers/http.ts:55:29)
    at GanacheGasMultiplierProvider._isGanache (/Users/hieunguyen/Downloads/Rarity/adventure-party/node_modules/hardhat/src/internal/core/providers/gas-providers.ts:315:30)
    at GanacheGasMultiplierProvider.request (/Users/hieunguyen/Downloads/Rarity/adventure-party/node_modules/hardhat/src/internal/core/providers/gas-providers.ts:304:23)
    at EthersProviderWrapper.send (/Users/hieunguyen/Downloads/Rarity/adventure-party/node_modules/@nomiclabs/hardhat-ethers/src/internal/ethers-provider-wrapper.ts:13:20)
    at Object.getSigners (/Users/hieunguyen/Downloads/Rarity/adventure-party/node_modules/@nomiclabs/hardhat-ethers/src/internal/helpers.ts:23:20)

    Caused by: FetchError: network timeout at: https://rpc.ftm.tools/
        at Timeout.<anonymous> (/Users/hieunguyen/Downloads/Rarity/adventure-party/node_modules/node-fetch/lib/index.js:1454:13)
        at listOnTimeout (node:internal/timers:557:17)
        at processTimers (node:internal/timers:500:7)
hieunguyen@hieunguyen adventure-party % npm run display-status                            

> [email protected] display-status
> hardhat run --network fantom scripts/status.ts

Creating Typechain artifacts in directory typechain for target ethers-v5
Successfully generated Typechain artifacts!
my Adventurers: 
FetchError: request to https://rpc.ftm.tools/ failed, reason: socket hang up
    at ClientRequest.<anonymous> (/Users/hieunguyen/Downloads/Rarity/adventure-party/node_modules/node-fetch/lib/index.js:1461:11)
    at ClientRequest.emit (node:events:394:28)
    at ClientRequest.emit (node:domain:475:12)
    at TLSSocket.socketOnEnd (node:_http_client:471:9)
    at TLSSocket.emit (node:events:406:35)
    at TLSSocket.emit (node:domain:475:12)
    at endReadableNT (node:internal/streams/readable:1348:12)
    at processTicksAndRejections (node:internal/process/task_queues:83:21) {
  type: 'system',
  errno: 'ECONNRESET',
  code: 'ECONNRESET'
}
hieunguyen@hieunguyen adventure-party % npm run display-status

> [email protected] display-status
> hardhat run --network fantom scripts/status.ts

Creating Typechain artifacts in directory typechain for target ethers-v5
Successfully generated Typechain artifacts!
my Adventurers: 
HardhatError: HH109: Network connection timed out.
Please check your internet connection and networks config
    at HttpProvider._fetchJsonRpcResponse (/Users/hieunguyen/Downloads/Rarity/adventure-party/node_modules/hardhat/src/internal/core/providers/http.ts:184:15)
    at processTicksAndRejections (node:internal/process/task_queues:96:5)
    at HttpProvider.request (/Users/hieunguyen/Downloads/Rarity/adventure-party/node_modules/hardhat/src/internal/core/providers/http.ts:55:29)
    at EthersProviderWrapper.send (/Users/hieunguyen/Downloads/Rarity/adventure-party/node_modules/@nomiclabs/hardhat-ethers/src/internal/ethers-provider-wrapper.ts:13:20)

    Caused by: FetchError: network timeout at: https://rpc.ftm.tools/
        at Timeout.<anonymous> (/Users/hieunguyen/Downloads/Rarity/adventure-party/node_modules/node-fetch/lib/index.js:1454:13)
        at listOnTimeout (node:internal/timers:557:17)
        at processTimers (node:internal/timers:500:7)
@vfat0
Copy link
Member

vfat0 commented Sep 16, 2021

does this persist like 5 minutes, 10 minutes later? reads like a network/RPC error and it hasn't come up in our usage

@SHA-2048
Copy link
Contributor

I'm running it in a schedule mode, so every 30min, and never saw this error. Will monitor more...

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

No branches or pull requests

3 participants