Skip to content
This repository has been archived by the owner on Mar 24, 2023. It is now read-only.

[BUG] Client network socket disconnected before secure TLS connection was established #521

Open
dis-happy opened this issue Sep 8, 2022 · 4 comments
Assignees
Labels
bug Something isn't working good first issue Good for newcomers

Comments

@dis-happy
Copy link

dis-happy commented Sep 8, 2022

Error: missing revert data in call exception [ See: https://links.ethers.org/v5-errors-CALL_EXCEPTION ] (error={"reason":"missing response","code":"SERVER_ERROR","requestBody":"{"method":"eth_call","params":[{"to":"0xc296f806d15e97243a08334256c705ba5c5754cd","data":"0x70a082310000000000000000000000003cf0965f7bf9ab95b88207c0ca1cc206311258ae"},"latest"],"id":46,"jsonrpc":"2.0"}","requestMethod":"POST","serverError":{"code":"ECONNRESET","path":null,"host":"v1.mainnet.godwoken.io","port":443},"url":"https://v1.mainnet.godwoken.io/rpc"}, data="0x", code=CALL_EXCEPTION, version=providers/5.6.1)
at Logger.makeError (/Users/hai/Documents/code/swap/node_modules/ethers/node_modules/@ethersproject/logger/src.ts/index.ts:261:28)
at Logger.throwError (/Users/hai/Documents/code/swap/node_modules/ethers/node_modules/@ethersproject/logger/src.ts/index.ts:273:20)
at checkError (/Users/hai/Documents/code/swap/node_modules/ethers/node_modules/@ethersproject/providers/src.ts/json-rpc-provider.ts:34:16)
at JsonRpcProvider. (/Users/hai/Documents/code/swap/node_modules/ethers/node_modules/@ethersproject/providers/src.ts/json-rpc-provider.ts:562:20)
at step (/Users/hai/Documents/code/swap/node_modules/ethers/node_modules/@ethersproject/providers/lib/json-rpc-provider.js:48:23)
at Object.throw (/Users/hai/Documents/code/swap/node_modules/ethers/node_modules/@ethersproject/providers/lib/json-rpc-provider.js:29:53)
at rejected (/Users/hai/Documents/code/swap/node_modules/ethers/node_modules/@ethersproject/providers/lib/json-rpc-provider.js:21:65)
at processTicksAndRejections (node:internal/process/task_queues:96:5) {
reason: 'missing revert data in call exception',
code: 'CALL_EXCEPTION',
error: Error: missing response (requestBody="{"method":"eth_call","params":[{"to":"0xc296f806d15e97243a08334256c705ba5c5754cd","data":"0x70a082310000000000000000000000003cf0965f7bf9ab95b88207c0ca1cc206311258ae"},"latest"],"id":46,"jsonrpc":"2.0"}", requestMethod="POST", serverError={"code":"ECONNRESET","path":null,"host":"v1.mainnet.godwoken.io","port":443}, url="https://v1.mainnet.godwoken.io/rpc", code=SERVER_ERROR, version=web/5.6.0)
at Logger.makeError (/Users/hai/Documents/code/swap/node_modules/ethers/node_modules/@ethersproject/logger/src.ts/index.ts:261:28)
at Logger.throwError (/Users/hai/Documents/code/swap/node_modules/ethers/node_modules/@ethersproject/logger/src.ts/index.ts:273:20)
at /Users/hai/Documents/code/swap/node_modules/ethers/node_modules/@ethersproject/web/src.ts/index.ts:280:28
at step (/Users/hai/Documents/code/swap/node_modules/ethers/node_modules/@ethersproject/web/lib/index.js:33:23)
at Object.throw (/Users/hai/Documents/code/swap/node_modules/ethers/node_modules/@ethersproject/web/lib/index.js:14:53)
at rejected (/Users/hai/Documents/code/swap/node_modules/ethers/node_modules/@ethersproject/web/lib/index.js:6:65)
at processTicksAndRejections (node:internal/process/task_queues:96:5) {
reason: 'missing response',
code: 'SERVER_ERROR',
requestBody: '{"method":"eth_call","params":[{"to":"0xc296f806d15e97243a08334256c705ba5c5754cd","data":"0x70a082310000000000000000000000003cf0965f7bf9ab95b88207c0ca1cc206311258ae"},"latest"],"id":46,"jsonrpc":"2.0"}',
requestMethod: 'POST',
serverError: Error: Client network socket disconnected before secure TLS connection was established
at connResetException (node:internal/errors:692:14)
at TLSSocket.onConnectEnd (node:_tls_wrap:1587:19)
at TLSSocket.emit (node:events:539:35)
at TLSSocket.emit (node:domain:475:12)
at endReadableNT (node:internal/streams/readable:1345:12)
at processTicksAndRejections (node:internal/process/task_queues:83:21) {
code: 'ECONNRESET',
path: null,
host: 'v1.mainnet.godwoken.io',
port: 443,
localAddress: undefined
},
url: 'https://v1.mainnet.godwoken.io/rpc'
},
data: '0x'
}

@dis-happy dis-happy added the bug Something isn't working label Sep 8, 2022
@Flouse Flouse added the good first issue Good for newcomers label Sep 9, 2022
@RetricSu
Copy link
Contributor

RetricSu commented Sep 9, 2022

hi, can you provide some reproduce steps?

@dis-happy
Copy link
Author

dis-happy commented Sep 9, 2022

hi, can you provide some reproduce steps?

just send request account balance by [email protected] on macos and set https_proxy=http://127.0.0.1:7890 provider by proxy soft .

usd = await new Contract(this.usdcAddr, ERC20.abi, this.provider).balanceOf(accountAddr);

@RetricSu
Copy link
Contributor

const ethers = require("ethers");
const ERC20 = require("./ERC20.json");

const url = "https://v1.mainnet.godwoken.io/rpc";
const provider = new ethers.providers.JsonRpcProvider(url);

const run = async () => {
  const accountAddr = "0xFb2C72d3ffe10Ef7c9960272859a23D24db9e04A";
  const usdcAddr = "0x186181e225dc1Ad85a4A94164232bD261e351C33";
  const usd = await new ethers.Contract(usdcAddr, ERC20.abi, provider).balanceOf(accountAddr);
  console.log(usd);
}

run();

result

$ node index.js
BigNumber { _hex: '0x00', _isBigNumber: true }
✨  Done in 4.88s.

[email protected] on macOS works great for me.

Does your proxy work with other blockchain networks( eg: Infura / alchemy)? Can you connect to our rpc without proxy? It looks like a pure network problem.

@Flouse
Copy link
Collaborator

Flouse commented Sep 16, 2022

Does your proxy work with other blockchain networks( eg: Infura / alchemy)? Can you connect to our rpc without proxy? It looks like a pure network problem.

@dis-happy

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

3 participants