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

waitForTransactionReceipt timeout exception after confirmed #2650

Closed
1 task done
vimtor opened this issue Aug 23, 2024 · 5 comments
Closed
1 task done

waitForTransactionReceipt timeout exception after confirmed #2650

vimtor opened this issue Aug 23, 2024 · 5 comments
Labels
needs reproduction Misc: Needs Reproduction

Comments

@vimtor
Copy link

vimtor commented Aug 23, 2024

Check existing issues

Viem Version

2.13.1

Current Behavior

Sometimes, when calling waitForTransactionReceipt with a timeout, the call times out, but when you check the transaction hash on an explorer, you can see that the transaction was confirmed within the timeout period.

We are experiecing this on Taiko's chain. Here are our server logs:

CleanShot 2024-08-23 at 14 25 58@2x

And here is the transaction on the explorer:

CleanShot 2024-08-23 at 14 26 51@2x

As you can see, the transaction was confirmed in a minute, but the client wasn't able to find it after 5 minutes.

Expected Behavior

waitForTransactionReceipt should only throw if the transaction is not confirmed within the timeout period.

Steps To Reproduce

I can't provide an exact reproduction since I don't know the origin of the issue.

Link to Minimal Reproducible Example

No response

Anything else?

No response

@tmm tmm added the needs reproduction Misc: Needs Reproduction label Aug 23, 2024
Copy link
Contributor

Hello @vimtor.

Please provide a minimal reproduction using StackBlitz, TypeScript Playground (for type issues), or a separate minimal GitHub repository.

Minimal reproductions are required as they save us a lot of time reproducing your config/environment and issue, and allow us to help you faster.

Once a minimal reproduction is added, a team member will confirm it works, then re-open the issue.

@github-actions github-actions bot closed this as not planned Won't fix, can't repro, duplicate, stale Aug 23, 2024
@tmm
Copy link
Member

tmm commented Aug 23, 2024

Are you using a public RPC URL or a paid service? Public RPCs tend to not be as high-availability/responsive.

@vimtor
Copy link
Author

vimtor commented Aug 25, 2024

Are you using a public RPC URL or a paid service? Public RPCs tend to not be as high-availability/responsive.

We are using a private RPC, wouldn't it give a different error instead?

@jxom
Copy link
Member

jxom commented Aug 25, 2024

As you can see, the transaction was confirmed in a minute, but the client wasn't able to find it after 5 minutes.

Viem’s Client is only as smart as the RPC Provider that you pass to it (via http Transport). Viem periodically calls the RPC Provider to try and retrieve the receipt. If no receipt is resolved from the RPC Provider from these calls, then Viem throws the error that you see here.

Have you tried using an alternate RPC Provider?

Copy link
Contributor

github-actions bot commented Sep 9, 2024

This issue has been locked since it has been closed for more than 14 days.

If you found a concrete bug or regression related to it, please open a new bug report with a reproduction against the latest Viem version. If you have any questions or comments you can create a new discussion thread.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Sep 9, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
needs reproduction Misc: Needs Reproduction
Projects
None yet
Development

No branches or pull requests

3 participants