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

The timeout setting for Axios is too short. #140

Open
Laisky opened this issue Aug 1, 2024 · 3 comments
Open

The timeout setting for Axios is too short. #140

Laisky opened this issue Aug 1, 2024 · 3 comments

Comments

@Laisky
Copy link

Laisky commented Aug 1, 2024

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' ],
...
@wg200202
Copy link

wg200202 commented Aug 5, 2024

I have the same problem, is there a solution?

1 similar comment
@erakashpatel
Copy link

I have the same problem, is there a solution?

@Laisky
Copy link
Author

Laisky commented Sep 6, 2024

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.

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