-
Notifications
You must be signed in to change notification settings - Fork 0
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
server: WaitForTransactionReceiptTimeoutError in account creation step #171
Comments
When the error was triggered table order by time
|
Did a workaround so the poke is done even if the wait for transaction receipt timeout 1abc87c |
I found a race condition in the observe.ts#47 that prematurely stop the polling and makes pedings wait for receipts timeout. The module assumes that a listener can send unwatch only 1 time but there is a sequence of steps that breaks that assumption creating the issue. if the number of listener is getListeners().length =2, the first unwatch with callbackId=2 will take it to getListeners().length =1, the second unwatch callbackId=2 will have getListeners().length =1, triggering the cleanup but callbackId=1 is still alive, the second unwatch will not unsubscribe because that was previously done. The cleanup triggers the polling to stop and wait for receipt will stop getting the block signal, therefore not checking receipt and will timeout. |
Create a test to reproduce the race condition with name "poke eth", https://github.com/exactly/mobile/tree/viem |
Created a PR in viem that fixes the issue: wevm/viem#3068 |
We are getting WaitForTransactionReceiptTimeoutError in the account creation step but the transaction is mined so is waiting for 3 minutes a receipt that is already there but the backend doesn't manage to know that.
We know that at the moment of polling for the receipt, there are no http request so is not polling the blockchain to know if the receipt exist.
Sentry error:
https://exactly.sentry.io/issues/6030727380/?project=4506186349674496&query=is%3Aunresolved%20issue.priority%3A%5Bhigh%2C%20medium%5D&referrer=issue-stream&sort=date&statsPeriod=24h&stream_index=3&utc=true
Similar problems in viem:
waitForTransactionReceipt
calls never resolve wevm/viem#467waitForTransactionReceipt
timeout exception after confirmed wevm/viem#2650The text was updated successfully, but these errors were encountered: