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

report this; could not find tx or effectiveGasPrice #4652

Open
firepol opened this issue Mar 17, 2024 · 3 comments
Open

report this; could not find tx or effectiveGasPrice #4652

firepol opened this issue Mar 17, 2024 · 3 comments
Assignees
Labels
investigate Under investigation and may be a bug. v6 Issues regarding v6

Comments

@firepol
Copy link

firepol commented Mar 17, 2024

Ethers Version

6.9.0

Search Terms

could not find tx or effectiveGasPrice

Describe the Problem

I do swaps via command line, on uniswap v3 forks or also v2 forks. The transaction is done via command line script and it works, but often I don't get the receipt and get this error:

Error: report this; could not find tx or effectiveGasPrice

Happens often on Telos, chainId 40, but sometimes also on other chains. Can this be caused by the RPC?

Note: the transaction usually works. I check on block explorer and find it. Just my script throws this exception, which I also try to catch without success... the error is not caught. I mean I try to handle it via e?.message but the code crashes before reaching that part.

    try {
      const receipt = await (await method(params, options)).wait() // execute
    } catch (e) {
      let txNotFound = "could not find tx or effectiveGasPrice"
      if (e?.message?.includes(txNotFound) || e?.toString().includes(txNotFound)) {
        // Logger doesn't log it because I never arrive here
        Logger.error(`Error: could not find tx or effectiveGasPrice`)
      } else {
        throw e
      }
    }

So since the error tells me to report this, I'm reporting it ;)

Environment, this happens both if I use a hardhat task or a standalone nodejs script (without hardhat, getting the provider the usual way, via json provider).

Code Snippet

const options = { gasLimit, gasPrice }
const receipt = await (await router.swapExactTokensForTokens(params, options)).wait()


### Contract ABI

_No response_

### Errors

```shell
/myproject/node_modules/ethers/src.ts/providers/abstract-provider.ts:1143
            if (tx == null) { throw new Error("report this; could not find tx or effectiveGasPrice"); }
                                    ^
Error: report this; could not find tx or effectiveGasPrice
    at JsonRpcProvider.getTransactionReceipt (/myproject/node_modules/ethers/src.ts/providers/abstract-provider.ts:1143:37)
    at processTicksAndRejections (node:internal/process/task_queues:95:5)
    at PollingTransactionSubscriber._poll (/myproject/node_modules/ethers/src.ts/providers/subscriber-polling.ts:232:20)


### Environment

node.js (v12 or newer), Hardhat

### Environment (Other)

_No response_
@firepol firepol added investigate Under investigation and may be a bug. v6 Issues regarding v6 labels Mar 17, 2024
@maa105
Copy link

maa105 commented Mar 20, 2024

I got the same issue on metis chain too. Was trying to buy AraFi Token on hermes router. it is intermittent though and I cannot consistently reproduce it.

@ricmoo
Copy link
Member

ricmoo commented Apr 30, 2024

Do you have public endpoints for those chains? It is possible that those chains do not return it (or have renamed it) in their RPC. I need to be able to test it though, so pointing me to RPC endpoints to test with would be helpful :)

@firepol
Copy link
Author

firepol commented May 1, 2024

Do you have public endpoints for those chains? It is possible that those chains do not return it (or have renamed it) in their RPC. I need to be able to test it though, so pointing me to RPC endpoints to test with would be helpful :)

Try on Telos, but it doesn't happen all the time. Just from time to time...

Try this RPC:

https://mainnet-eu.telos.net/evm

As said, you may need to do many transactions to be able to reproduce this.

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

3 participants