blueprint icon indicating copy to clipboard operation
blueprint copied to clipboard

The timeout setting for Axios is too short.

Open Laisky opened this issue 1 year ago • 3 comments

My network connection isn't very stable, and the default timeout for Axios in Blueprint is just 5 seconds. This has been quite frustrating for me, and I hope a global timeout setting option can be made available.

AxiosError: timeout of 5000ms exceeded
    at RedirectableRequest.handleRequestTimeout (/home/laisky/repo/laisky/HelloWorld/blockchain/ton/contracts/jettons/node_modules/axios/lib/adapters/http.js:647:16)
    at RedirectableRequest.emit (node:events:514:28)
    at RedirectableRequest.emit (node:domain:489:12)
    at Timeout.<anonymous> (/home/laisky/repo/laisky/HelloWorld/blockchain/ton/contracts/jettons/node_modules/follow-redirects/index.js:210:12)
    at listOnTimeout (node:internal/timers:569:17)
    at processTimers (node:internal/timers:512:7)
    at Axios.request (/home/laisky/repo/laisky/HelloWorld/blockchain/ton/contracts/jettons/node_modules/axios/lib/core/Axios.js:45:41)
    at async TonClient4.getLastBlock (/home/laisky/repo/laisky/HelloWorld/blockchain/ton/contracts/jettons/node_modules/@ton/ton/dist/client/TonClient4.js:49:19)
    at async NetworkProviderImpl.isContractDeployed (/home/laisky/repo/laisky/HelloWorld/blockchain/ton/contracts/jettons/node_modules/@ton/blueprint/dist/network/createNetworkProvider.js:135:99)
    at async Object.run (/home/laisky/repo/laisky/HelloWorld/blockchain/ton/contracts/jettons/scripts/deploy.ts:37:10)
    at async run (/home/laisky/repo/laisky/HelloWorld/blockchain/ton/contracts/jettons/node_modules/@ton/blueprint/dist/cli/run.js:25:5)
    at async main (/home/laisky/repo/laisky/HelloWorld/blockchain/ton/contracts/jettons/node_modules/@ton/blueprint/dist/cli/cli.js:91:5) {
  code: 'ECONNABORTED',
  config: {
    transitional: {
      silentJSONParsing: true,
      forcedJSONParsing: true,
      clarifyTimeoutError: false
    },
    adapter: [ 'xhr', 'http', 'fetch' ],
...

Laisky avatar Aug 01 '24 06:08 Laisky

I have the same problem, is there a solution?

wg200202 avatar Aug 05 '24 08:08 wg200202

I have the same problem, is there a solution?

erakashpatel avatar Sep 05 '24 15:09 erakashpatel

The root cause of my issue is that when using Axios with HTTP_PROXY, It will encounter timeout problems. I eventually switched to an environment that doesn't require proxy settings.

Laisky avatar Sep 06 '24 02:09 Laisky

Will add to config and increase base time

Alejandbel avatar Apr 28 '25 15:04 Alejandbel