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

Ethers throws Unhandled Rejection in waitForTransaction method #4822

Open
IvanKodak opened this issue Aug 27, 2024 · 1 comment
Open

Ethers throws Unhandled Rejection in waitForTransaction method #4822

IvanKodak opened this issue Aug 27, 2024 · 1 comment
Assignees
Labels
investigate Under investigation and may be a bug. v6 Issues regarding v6

Comments

@IvanKodak
Copy link

Ethers Version

6.13.2

Search Terms

Unhandled Rejection, waitForTransaction

Describe the Problem

Ethers throws Unhandled Rejection in waitForTransaction method

Github repo with example:
https://github.com/IvanKodak/ethers-unhandled-rejection-example

Code Snippet

No response

Contract ABI

No response

Errors

Unhandled Rejection at: Promise {
  <rejected> Error: server response 401 Unauthorized (request={  }, response={  }, error=null, info={ "requestUrl": "https://arb-sepolia.nirvanalabs.xyz/devNode-qz736?apikey=43892a79fb674a1ee81caeb05213dab8065a", "responseBody": "{\n\tjsonrpc\": \"2.0\",\n\t\"id\": 1,\n\t\"error\": { \n\t\"code\": 401,\n\t\"message\": Verification failed, node not found\n\t}\n}\n", "responseStatus": "401 Unauthorized" }, code=SERVER_ERROR, version=6.13.2)
      at makeError (/Users/ivankodak/work/ethers-unhandled-rejection-example/node_modules/ethers/src.ts/utils/errors.ts:694:21)
      at assert (/Users/ivankodak/work/ethers-unhandled-rejection-example/node_modules/ethers/src.ts/utils/errors.ts:715:25)
      at FetchResponse.assertOk (/Users/ivankodak/work/ethers-unhandled-rejection-example/node_modules/ethers/src.ts/utils/fetch.ts:950:15)
      at JsonRpcProvider._send (/Users/ivankodak/work/ethers-unhandled-rejection-example/node_modules/ethers/src.ts/providers/provider-jsonrpc.ts:1245:18)
      at processTicksAndRejections (node:internal/process/task_queues:95:5)
      at async /Users/ivankodak/work/ethers-unhandled-rejection-example/node_modules/ethers/src.ts/providers/provider-jsonrpc.ts:537:40 {
    code: 'SERVER_ERROR',
    request: FetchRequest {},
    response: FetchResponse {},
    error: undefined,
    info: {
      requestUrl: 'https://arb-sepolia.nirvanalabs.xyz/devNode-qz736?apikey=43892a79fb674a1ee81caeb05213dab8065a',
      responseBody: '{\n' +
        '\tjsonrpc": "2.0",\n' +
        '\t"id": 1,\n' +
        '\t"error": { \n' +
        '\t"code": 401,\n' +
        '\t"message": Verification failed, node not found\n' +
        '\t}\n' +
        '}\n',
      responseStatus: '401 Unauthorized'
    },
    shortMessage: 'server response 401 Unauthorized'
  }
} reason: Error: server response 401 Unauthorized (request={  }, response={  }, error=null, info={ "requestUrl": "https://arb-sepolia.nirvanalabs.xyz/devNode-qz736?apikey=43892a79fb674a1ee81caeb05213dab8065a", "responseBody": "{\n\tjsonrpc\": \"2.0\",\n\t\"id\": 1,\n\t\"error\": { \n\t\"code\": 401,\n\t\"message\": Verification failed, node not found\n\t}\n}\n", "responseStatus": "401 Unauthorized" }, code=SERVER_ERROR, version=6.13.2)
    at makeError (/Users/ivankodak/work/ethers-unhandled-rejection-example/node_modules/ethers/src.ts/utils/errors.ts:694:21)
    at assert (/Users/ivankodak/work/ethers-unhandled-rejection-example/node_modules/ethers/src.ts/utils/errors.ts:715:25)
    at FetchResponse.assertOk (/Users/ivankodak/work/ethers-unhandled-rejection-example/node_modules/ethers/src.ts/utils/fetch.ts:950:15)
    at JsonRpcProvider._send (/Users/ivankodak/work/ethers-unhandled-rejection-example/node_modules/ethers/src.ts/providers/provider-jsonrpc.ts:1245:18)
    at processTicksAndRejections (node:internal/process/task_queues:95:5)
    at async /Users/ivankodak/work/ethers-unhandled-rejection-example/node_modules/ethers/src.ts/providers/provider-jsonrpc.ts:537:40 {
  code: 'SERVER_ERROR',
  request: FetchRequest {},
  response: FetchResponse {},
  error: undefined,
  info: {
    requestUrl: 'https://arb-sepolia.nirvanalabs.xyz/devNode-qz736?apikey=43892a79fb674a1ee81caeb05213dab8065a',
    responseBody: '{\n' +
      '\tjsonrpc": "2.0",\n' +
      '\t"id": 1,\n' +
      '\t"error": { \n' +
      '\t"code": 401,\n' +
      '\t"message": Verification failed, node not found\n' +
      '\t}\n' +
      '}\n',
    responseStatus: '401 Unauthorized'
  },
  shortMessage: 'server response 401 Unauthorized'
}

Environment

node.js (v12 or newer)

Environment (Other)

No response

@IvanKodak IvanKodak added investigate Under investigation and may be a bug. v6 Issues regarding v6 labels Aug 27, 2024
@IvanKodak
Copy link
Author

@ricmoo could you check please?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
investigate Under investigation and may be a bug. v6 Issues regarding v6
Projects
None yet
Development

No branches or pull requests

2 participants