vfat-io / adventure-party

Helper contract for andrecronje/rarity
40 stars 63 forks source link

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

Open emeraldhieu opened 2 years ago

emeraldhieu commented 2 years ago

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

> adventure-party@1.0.0 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

> adventure-party@1.0.0 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

> adventure-party@1.0.0 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

> adventure-party@1.0.0 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                            

> adventure-party@1.0.0 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

> adventure-party@1.0.0 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 commented 2 years ago

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 commented 2 years ago

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