question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

(node:73511) UnhandledPromiseRejectionWarning: Error: failed to meet quorum (method="call", params={"transaction":..

See original GitHub issue

I found a very similar issue like mine. But I cannot find the answer. So I posted a new issue here. Thanks for your help! #https://github.com/ethers-io/ethers.js/issues/841#issue-621940740

Part of my code below where @uniswap/sdk used ethers.js with @ethersproject_providers@5.0.9 :

require("dotenv").config();
const Web3 = require("web3");
const {
  ChainId,
  Token,
  TokenAmount,
  WETH,
  Fetcher,
  Trade,
} = require("@uniswap/sdk");
const abis = require("./abis");
const Web3WsProvider = require("web3-providers-ws");
const options = {
  timeout: 30000, // ms
  headers: {
    authorization: "Basic username:password",
  },
  clientConfig: {
    maxReceivedFrameSize: 100000000, // bytes - default: 1MiB
    maxReceivedMessageSize: 100000000, // bytes - default: 8MiB
    keepalive: true,
    keepaliveInterval: 60000, // ms
  },

  reconnect: {
    auto: true,
    delay: 5000, // ms
    maxAttempts: 5,
    onTimeout: false,
  },
};

const ws = new Web3WsProvider(
  "wss://mainnet.infura.io/ws/v3/" + process.env.INFURA_URL_0,
  options
);
const web3 = new Web3(ws);

const {address: admin} = web3.eth.accounts.wallet.add(process.env.PRIVATE_KEY);

const init = async () => {

  await web3.eth
    .subscribe("newBlockHeaders")
    .on("data", async (block) => {
      console.log(`New block received. Block # ${block.number}`);

      const dai = new Token(
        ChainId.MAINNET,
        "0x6B175474E89094C44Da98b954EedeAC495271d0F",
        18
      );
      const weth = WETH[dai.chainId];

      const daiWeth_Pair = await Fetcher.fetchPairData(dai, weth);

      const amountsEth = await Promise.all([
        kyber.methods
          .getExpectedRate(
            addresses.tokens.dai,
            "0xeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee",
            AMOUNT_DAI_WEI
          )
          .call(), //! bug possible
        daiWeth_Pair.getOutputAmount(new TokenAmount(dai, AMOUNT_DAI_WEI)),
      ]).catch(console.log);
  }).on("error", (error) => {
      console.log(error);
    });
};

init();

Some Error information:

image

Error1:

New block received. Block # 10929215 New block received. Block # 10929216 (node:73511) UnhandledPromiseRejectionWarning: Error: failed to meet quorum (method=“call”, params={“transaction”:{“to”:“0xA478c2975Ab1Ea89e8196811F51A7B7Ade33eB11”,“data”:“0x0902f1ac”},“blockTag”:“latest”}, results=[{“weight”:1,“start”:1601002249658,“result”:“0x0000000000000000000000000000000000000000008182938c6e045bed6d6efe00000000000000000000000000000000000000000000604b50e085a4069fac51000000000000000000000000000000000000000000000000000000005f6d5ad5”},{“weight”:1,“start”:1601002249658,“result”:“0x00000000000000000000000000000000000000000081816a72defcb033330d3600000000000000000000000000000000000000000000604c65ac967fa3989342000000000000000000000000000000000000000000000000000000005f6d5b05”},{“weight”:1,“start”:1601002250409,“result”:“0x00000000000000000000000000000000000000000081831f5143b902a9a8e50700000000000000000000000000000000000000000000604b1fdd41a7c07cdd37000000000000000000000000000000000000000000000000000000005f6d5b02”},{“weight”:1,“start”:1601002250410,“error”:{“reason”:“missing response”,“code”:“SERVER_ERROR”,“requestBody”:null,“requestMethod”:“GET”,“serverError”:{“errno”:“ECONNRESET”,“code”:“ECONNRESET”,“syscall”:“read”},“url”:“https://api.etherscan.io/api?module=proxy&action=eth_call&to=0xa478c2975ab1ea89e8196811f51a7b7ade33eb11&data=0x0902f1ac&apikey=9D13ZE7XSBTJ94N9BNJ2MA33VMAY2YPIRB”}}], provider={“_isProvider”:true,“_events”:[],“_emitted”:{“block”:-2},“formatter”:{“formats”:{“transaction”:{},“transactionRequest”:{},“receiptLog”:{},“receipt”:{},“block”:{},“blockWithTransactions”:{},“filter”:{},“filterLog”:{}}},“anyNetwork”:false,“_network”:{“name”:“homestead”,“chainId”:1,“ensAddress”:“0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e”},“_maxInternalBlockNumber”:10929215,“_lastBlockNumber”:-2,“_pollingInterval”:4000,“_fastQueryDate”:1601002249657,“providerConfigs”:[{“provider”:{“_isProvider”:true,“_events”:[],"emitted":{“block”:-2},“formatter”:{“formats”:{“transaction”:{},“transactionRequest”:{},“receiptLog”:{},“receipt”:{},“block”:{},“blockWithTransactions”:{},“filter”:{},“filterLog”:{}}},“anyNetwork”:false,"network":{“name”:“homestead”,“chainId”:1,“ensAddress”:“0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e”},"maxInternalBlockNumber":10929215,"lastBlockNumber":-2,"pollingInterval":4000,"fastQueryDate":1601002249657,“connection”:{“url”:“https://mainnet.infura.io/v3/84842078b09946638c03157f83405213"},“_nextId”:44,“apiKey”:“84842078b09946638c03157f83405213”,“projectId”:“84842078b09946638c03157f83405213”,“projectSecret”:null,“_internalBlockNumber”:{},“_fastBlockNumber”:10929215,“_fastBlockNumberPromise”:{}},“weight”:1,“stallTimeout”:750,“priority”:1},{“provider”:{“_isProvider”:true,“_events”:[],“_emitted”:{“block”:-2},“formatter”:{“formats”:{“transaction”:{},“transactionRequest”:{},“receiptLog”:{},“receipt”:{},“block”:{},“blockWithTransactions”:{},“filter”:{},“filterLog”:{}}},“anyNetwork”:false,“_network”:{“name”:“homestead”,“chainId”:1,“ensAddress”:“0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e”},“_maxInternalBlockNumber”:-1024,“_lastBlockNumber”:-2,“_pollingInterval”:4000,“_fastQueryDate”:0,“baseUrl”:“https://api.etherscan.io”,“apiKey”:“9D13ZE7XSBTJ94N9BNJ2MA33VMAY2YPIRB”,“_internalBlockNumber”:{}},“weight”:1,“stallTimeout”:750,“priority”:1},{“provider”:{“_isProvider”:true,“_events”:[],“_emitted”:{“block”:-2},“formatter”:{“formats”:{“transaction”:{},“transactionRequest”:{},“receiptLog”:{},“receipt”:{},“block”:{},“blockWithTransactions”:{},“filter”:{},“filterLog”:{}}},“anyNetwork”:false,“_network”:{“name”:“homestead”,“chainId”:1,“ensAddress”:“0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e”},“_maxInternalBlockNumber”:10929215,“_lastBlockNumber”:-2,“_pollingInterval”:4000,“_fastQueryDate”:1601002251606,“connection”:{“url”:“https://eth-mainnet.alchemyapi.io/v2/_gg7wSSi0KMBsdKnGVfHDueq6xMB9EkC”},“_nextId”:44,“apiKey”:“_gg7wSSi0KMBsdKnGVfHDueq6xMB9EkC”,“_internalBlockNumber”:{},“_fastBlockNumber”:10929215,“_fastBlockNumberPromise”:{}},“weight”:1,“stallTimeout”:750,“priority”:1},{“provider”:{“_isProvider”:true,“_events”:[],“_emitted”:{“block”:-2},“formatter”:{“formats”:{“transaction”:{},“transactionRequest”:{},“receiptLog”:{},“receipt”:{},“block”:{},“blockWithTransactions”:{},“filter”:{},“filterLog”:{}}},“anyNetwork”:false,“_network”:{“name”:“homestead”,“chainId”:1,“ensAddress”:“0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e”},“_maxInternalBlockNumber”:10929213,“_lastBlockNumber”:-2,“_pollingInterval”:4000,“_fastQueryDate”:1601002248720,“connection”:{“url”:“https://cloudflare-eth.com/”},“_nextId”:44,“_internalBlockNumber”:{},“_fastBlockNumber”:10929213,“_fastBlockNumberPromise”:{}},“weight”:1,“stallTimeout”:750,“priority”:1}],“quorum”:2,“_highestBlockNumber”:10929215,“_internalBlockNumber”:{},“_fastBlockNumber”:10929215,"_fastBlockNumberPromise”:{}}, code=SERVER_ERROR, version=providers/5.0.9) at Logger.makeError (/Users/zheng/Security/bots/ArBot/node_modules/@ethersproject_logger@5.0.5@@ethersproject/logger/lib/index.js:179:21) at Logger.throwError (/Users/zheng/Security/bots/ArBot/node_modules/@ethersproject_logger@5.0.5@@ethersproject/logger/lib/index.js:188:20) at FallbackProvider.<anonymous> (/Users/zheng/Security/bots/ArBot/node_modules/@ethersproject_providers@5.0.9@@ethersproject/providers/lib/fallback-provider.js:676:54) at step (/Users/zheng/Security/bots/ArBot/node_modules/@ethersproject_providers@5.0.9@@ethersproject/providers/lib/fallback-provider.js:46:23) at Object.f [as next] (/Users/zheng/Security/bots/ArBot/node_modules/@ethersproject_providers@5.0.9@@ethersproject/providers/lib/fallback-provider.js:27:53) at fulfilled (/Users/zheng/Security/bots/ArBot/node_modules/@ethersproject_providers@5.0.9@@ethersproject/providers/lib/fallback-provider.js:18:58) (node:73511) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 1) (node:73511) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.

Error2:

(node:73511) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 35) (node:73511) UnhandledPromiseRejectionWarning: Error: failed to meet quorum (method=“getBlockNumber”, params={}, results=[{“weight”:1,“start”:1601003217919,“error”:{“reason”:“timeout”,“code”:“TIMEOUT”,“requestBody”:“{"method":"eth_getBlockByNumber","params":["latest",false],"id":42,"jsonrpc":"2.0"}”,“requestMethod”:“POST”,“timeout”:120000,“url”:“https://cloudflare-eth.com/“}},{“weight”:1,“start”:1601003217920,“error”:{“reason”:“timeout”,“code”:“TIMEOUT”,“requestBody”:”{\“method\”:\“eth_blockNumber\”,\“params\”:[],\“id\”:42,\“jsonrpc\”:\“2.0\”}“,“requestMethod”:“POST”,“timeout”:120000,“url”:“https://mainnet.infura.io/v3/84842078b09946638c03157f83405213”}},{“weight”:1,“start”:1601003526002,“error”:{“reason”:“timeout”,“code”:“TIMEOUT”,“requestBody”:”{\“method\”:\“eth_blockNumber\”,\“params\”:[],\“id\”:42,\“jsonrpc\”:\“2.0\”}",“requestMethod”:“POST”,“timeout”:120000,“url”:“https://eth-mainnet.alchemyapi.io/v2/_gg7wSSi0KMBsdKnGVfHDueq6xMB9EkC”}},{“weight”:1,“start”:1601003526002,“error”:{“reason”:“timeout”,“code”:“TIMEOUT”,“requestBody”:null,“requestMethod”:“GET”,“timeout”:120000,“url”:"https://api.etherscan.io/api?module=proxy&action=eth_blockNumber&apikey=9D13ZE7XSBTJ94N9BNJ2MA33VMAY2YPIRB”}}], provider={“_isProvider”:true,“_events”:[],“_emitted”:{“block”:-2},“formatter”:{“formats”:{“transaction”:{},“transactionRequest”:{},“receiptLog”:{},“receipt”:{},“block”:{},“blockWithTransactions”:{},“filter”:{},“filterLog”:{}}},“anyNetwork”:false,“_network”:{“name”:“homestead”,“chainId”:1,“ensAddress”:“0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e”},“_maxInternalBlockNumber”:-1024,“_lastBlockNumber”:-2,“_pollingInterval”:4000,“_fastQueryDate”:0,“providerConfigs”:[{“provider”:{“_isProvider”:true,“_events”:[],"emitted":{“block”:-2},“formatter”:{“formats”:{“transaction”:{},“transactionRequest”:{},“receiptLog”:{},“receipt”:{},“block”:{},“blockWithTransactions”:{},“filter”:{},“filterLog”:{}}},“anyNetwork”:false,"network":{“name”:“homestead”,“chainId”:1,“ensAddress”:“0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e”},"maxInternalBlockNumber":-1024,"lastBlockNumber":-2,"pollingInterval":4000,"fastQueryDate":0,“connection”:{“url”:“https://mainnet.infura.io/v3/84842078b09946638c03157f83405213"},“_nextId”:43,“apiKey”:“84842078b09946638c03157f83405213”,“projectId”:“84842078b09946638c03157f83405213”,“projectSecret”:null,“_internalBlockNumber”:{}},“weight”:1,“stallTimeout”:750,“priority”:1},{“provider”:{“_isProvider”:true,“_events”:[],“_emitted”:{“block”:-2},“formatter”:{“formats”:{“transaction”:{},“transactionRequest”:{},“receiptLog”:{},“receipt”:{},“block”:{},“blockWithTransactions”:{},“filter”:{},“filterLog”:{}}},“anyNetwork”:false,“_network”:{“name”:“homestead”,“chainId”:1,“ensAddress”:“0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e”},“_maxInternalBlockNumber”:-1024,“_lastBlockNumber”:-2,“_pollingInterval”:4000,“_fastQueryDate”:0,“baseUrl”:“https://api.etherscan.io”,“apiKey”:“9D13ZE7XSBTJ94N9BNJ2MA33VMAY2YPIRB”,“_internalBlockNumber”:{}},“weight”:1,“stallTimeout”:750,“priority”:1},{“provider”:{“_isProvider”:true,“_events”:[],“_emitted”:{“block”:-2},“formatter”:{“formats”:{“transaction”:{},“transactionRequest”:{},“receiptLog”:{},“receipt”:{},“block”:{},“blockWithTransactions”:{},“filter”:{},“filterLog”:{}}},“anyNetwork”:false,“_network”:{“name”:“homestead”,“chainId”:1,“ensAddress”:“0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e”},“_maxInternalBlockNumber”:-1024,“_lastBlockNumber”:-2,“_pollingInterval”:4000,“_fastQueryDate”:0,“connection”:{“url”:“https://eth-mainnet.alchemyapi.io/v2/_gg7wSSi0KMBsdKnGVfHDueq6xMB9EkC”},“_nextId”:43,“apiKey”:“_gg7wSSi0KMBsdKnGVfHDueq6xMB9EkC”,“_internalBlockNumber”:{}},“weight”:1,“stallTimeout”:750,“priority”:1},{“provider”:{“_isProvider”:true,“_events”:[],“_emitted”:{“block”:-2},“formatter”:{“formats”:{“transaction”:{},“transactionRequest”:{},“receiptLog”:{},“receipt”:{},“block”:{},“blockWithTransactions”:{},“filter”:{},“filterLog”:{}}},“anyNetwork”:false,“_network”:{“name”:“homestead”,“chainId”:1,“ensAddress”:“0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e”},“_maxInternalBlockNumber”:-1024,“_lastBlockNumber”:-2,“_pollingInterval”:4000,“_fastQueryDate”:0,“connection”:{“url”:“https://cloudflare-eth.com/”},“_nextId”:43,“_internalBlockNumber”:{}},“weight”:1,“stallTimeout”:750,“priority”:1}],“quorum”:2,“_highestBlockNumber”:-1,"_internalBlockNumber”:{}}, code=SERVER_ERROR, version=providers/5.0.9) at Logger.makeError (/Users/zheng/Security/bots/ArBot/node_modules/@ethersproject_logger@5.0.5@@ethersproject/logger/lib/index.js:179:21) at Logger.throwError (/Users/zheng/Security/bots/ArBot/node_modules/@ethersproject_logger@5.0.5@@ethersproject/logger/lib/index.js:188:20) at FallbackProvider.<anonymous> (/Users/zheng/Security/bots/ArBot/node_modules/@ethersproject_providers@5.0.9@@ethersproject/providers/lib/fallback-provider.js:676:54) at step (/Users/zheng/Security/bots/ArBot/node_modules/@ethersproject_providers@5.0.9@@ethersproject/providers/lib/fallback-provider.js:46:23) at Object.f [as next] (/Users/zheng/Security/bots/ArBot/node_modules/@ethersproject_providers@5.0.9@@ethersproject/providers/lib/fallback-provider.js:27:53) at fulfilled (/Users/zheng/Security/bots/ArBot/node_modules/@ethersproject_providers@5.0.9@@ethersproject/providers/lib/fallback-provider.js:18:58)

Error3:

Exception has occurred: Error Error: missing response (requestBody=“{"method":"eth_call","params":[{"to":"0xa478c2975ab1ea89e8196811f51a7b7ade33eb11","data":"0x0902f1ac"},"latest"],"id":43,"jsonrpc":"2.0"}”, requestMethod=“POST”, serverError={“errno”:“ECONNRESET”,“code”:“ECONNRESET”,“syscall”:“read”}, url=“https://eth-mainnet.alchemyapi.io/v2/_gg7wSSi0KMBsdKnGVfHDueq6xMB9EkC”, code=SERVER_ERROR, version=web/5.0.7) at Logger.makeError (/Users/zheng/Security/bots/ArBot/node_modules/@ethersproject_logger@5.0.5@@ethersproject/logger/lib/index.js:179:21) at Logger.throwError (/Users/zheng/Security/bots/ArBot/node_modules/@ethersproject_logger@5.0.5@@ethersproject/logger/lib/index.js:188:20) at /Users/zheng/Security/bots/ArBot/node_modules/@ethersproject_web@5.0.7@@ethersproject/web/lib/index.js:211:36 at step (/Users/zheng/Security/bots/ArBot/node_modules/@ethersproject_web@5.0.7@@ethersproject/web/lib/index.js:33:23) at Object.f [as throw] (/Users/zheng/Security/bots/ArBot/node_modules/@ethersproject_web@5.0.7@@ethersproject/web/lib/index.js:14:53) at rejected (/Users/zheng/Security/bots/ArBot/node_modules/@ethersproject_web@5.0.7@@ethersproject/web/lib/index.js:6:65) at process._tickCallback (internal/process/next_tick.js:68:7)

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:7 (2 by maintainers)

github_iconTop GitHub Comments

3reactions
ricmoocommented, Aug 24, 2021

I think this issue may be stale, so I’m closing it. If not, please feel free to re-open or start a new issue/discussion.

Thanks! 😃

2reactions
zemsecommented, Sep 25, 2020

Just a quick parsing of these errors to help you debug it further:

Error 1: ECONNRESET while making a eth_call request to etherscan backend.

Error 2: TIMEOUT while requsting eth_blockNumber cloudfare backend.

Error 3: ECONNRESET while requesting eth_call alchemy backend.

You can read more about ECONNRESET. The backend might drop connection requests when they receive a lot of them. Also there is a possibility that your node js is trying to make a lot of connections requests but your operating system denied making any more of it.

TIMEOUT is also somewhat similar when your node js doesnt hear back from the node. It also happened with me when I was making huge amount of requests to a node. I used to get response for some of them but most of them were a TIMEOUT.

Maybe you can experiment with reducing the poling interval in your subscription.

Read more comments on GitHub >

github_iconTop Results From Across the Web

(node:73511) UnhandledPromiseRejectionWarning: Error
(node:73511) UnhandledPromiseRejectionWarning: Error: failed to meet quorum (method="call", params={"transaction":.. ... I found a very similar ...
Read more >
Getting a "failed to meet quorum" error - EatTheBlocks Courses
js” after successfully deploying to mainnet and I am getting "(node:36607) UnhandledPromiseRejectionWarning: Error: failed to meet quorum ( ...
Read more >
UniswapV2SlidingOracle: failed to meet quorum - Defender
The error happens when the job is workable for instance in the Unis… ... Error {"errorType":"Error","errorMessage":"failed to meet quorum ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found