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

Failed to check for transaction receipt #2662

Open
BenAzlay opened this issue Dec 5, 2024 · 3 comments
Open

Failed to check for transaction receipt #2662

BenAzlay opened this issue Dec 5, 2024 · 3 comments

Comments

@BenAzlay
Copy link

BenAzlay commented Dec 5, 2024

When executing a transaction, I am listening for the 'receipt' event, like:

tx.on("receipt", (receipt) => {
    // Success logic
});

With Rabby, this throws the following error:

Transaction error: Error: Failed to check for transaction receipt:
{}
    at Object._fireError (index.js:74:1)
    at index.js:243:1

When testing with Metamask, I am not encountering this issue. Also, when using a custom RPC url on Rabby, I am not encountering this issue.

This makes me think the problem lies with the default RPC url of Rabby. This is not an issue of exceeding the RPC capacity as I originally supposed, because even first-time users of the dApp have the issue.

@Athensmo
Copy link

Athensmo commented Dec 5, 2024

It proceed successfully here... are you certain you are not experiencing glitch on your end?

@BenAzlay
Copy link
Author

BenAzlay commented Dec 5, 2024

The workaround I found was polling the receipt using my own RPC, like:

const receipt = await ownRpcWeb3.eth.getTransactionReceipt(txnHash);

For context, I am on Base and using Wagmi. I initialize the provider I use to sign transactions like:

const { connector: usedConnector } = useAccount();

const txnProvider = !!usedConnector.getProvider ? await usedConnector.getProvider() : window.ethereum;
setWeb3Provider(txnProvider);

I suspect this might be the origin of my issue, but that doesn't explain why, when using a custom RPC url on Rabby, I don't have the issue.

I also forgot to mention that for month, using the same code, I never encountered this issue using Rabby. It only started a few days ago. Has Rabby changed their default RPC provider? Which one are they using?

@vvvvvv1vvvvvv
Copy link
Member

what is your tx.on("receipt" actually do?

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