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

Assets (tokens) are not loaded due to infura error #9280

Closed
churik opened this issue Oct 25, 2019 · 21 comments
Closed

Assets (tokens) are not loaded due to infura error #9280

churik opened this issue Oct 25, 2019 · 21 comments

Comments

@churik
Copy link
Member

churik commented Oct 25, 2019

Bug Report

Problem

Sometimes due to "context deadline exceeded" from infura.io balance can't be fetched. Can't reproduce, but potentially it can be an issue on mainnet as well.
Caught by e2e.

Expected behavior

Balance assets are loaded

Actual behavior

No assets (tokens) are shown.
Full video / log: https://app.saucelabs.com/tests/aaa060e1b584497db876f67e5687a319?auth=f2c8623188b3a2a34e16a0e655e57fcd#54

Reproduction

  • Open Status
  • Restore account with funds (ETH + tokens)

Additional Information

  • Status version: nightly 23/10
  • Operating System: Android, iOS

Logs

10-23 04:58:37.739  4296  5214 E GoLog   : ERROR[10-23|11:58:37.739] failed to get transfer in between two bloks from=4200000 to=4300000 error="Post https://ropsten.infura.io/v3/f315575765b14720b32382a61a89341a: context deadline exceeded"
10-23 04:58:37.739  4296  5214 E GoLog   : ERROR[10-23|11:58:37.739] failed to get next batch                 error="Post https://ropsten.infura.io/v3/f315575765b14720b32382a61a89341a: context deadline exceeded"
@churik
Copy link
Member Author

churik commented Oct 25, 2019

@adambabik @cammellos would be nice if you can comment issue to understand it better.
Thanks a lot!

@cammellos
Copy link
Contributor

@churik it means it's taking too long the request, and it's timing out, we can probably extend it (at least for tests)

@ryanschneider
Copy link

Can someone familiar with the status code point me to where this is happening? Based on the logs it sounds like a eth_getLogs query is being slow, but we’ve done a lot of optimizations on our end to make those performant so I’d like to see if I can reproduce a consistently slow query.

@StatusSceptre
Copy link
Member

@yenda @cammellos can one of you point @ryanschneider to the relevant code?

@yenda
Copy link
Contributor

yenda commented Nov 1, 2019

@churik
Copy link
Member Author

churik commented Nov 12, 2019

@rachelhamlin it is more visible now, I faced it several times per day.
It is pretty dangerous from user perspective, user may think that he lost assets.
So should be added to v1 from my POV.
Assets don't appear at all in some cases, sometimes they appear after several re-logins

@ryanschneider
Copy link

@yenda based on the error message reported, I think it's actually happening here:

https://github.com/status-im/status-go/blob/89659f85b49b48f4409ed9f522397b99728b214b/services/wallet/iterative.go#L69

Which seems to be called from here:

https://github.com/status-im/status-go/blob/89659f85b49b48f4409ed9f522397b99728b214b/services/wallet/commands.go#L98

But I can't find where that's called to see what sort of deadline the parent context has. If there iterator is going through a large number of blocks then the queries can add up, especially if a large range is being scanned, as each iteration does 100,000 blocks.

@corpetty
Copy link
Contributor

corpetty commented Jan 8, 2020

Think I got this error today when recovering account on latest nightly

@rasom rasom self-assigned this Jan 24, 2020
@rasom
Copy link
Contributor

rasom commented Jan 24, 2020

@churik do we have any signs of this issue in release candidate? This error failed to get transfer in between two bloks was caused mainly by the way how we fetched transfers before, but let me know if you still can reproduce this case.

@churik
Copy link
Member Author

churik commented Jan 24, 2020

@flexsurfer says that he got it.
Can confirm @flexsurfer ?

@flexsurfer
Copy link
Member

yes, lots of users report that their SNT balance is 0 all the time, even after a few relogins

@flexsurfer
Copy link
Member

one of them @jakubgs btw

@rasom
Copy link
Contributor

rasom commented Jan 24, 2020

@flexsurfer I'm asking specifically about failed to get transfer in between two bloks

@flexsurfer
Copy link
Member

oh ok , we don't have any signs of failed to get transfer in between two bloks

@rasom
Copy link
Contributor

rasom commented Jan 24, 2020

Then probably this issue should be closed and another one with a different description/steps to reproduce be opened. Or this one to be changed, because the problem described here doesn't reproduce currently.

@flexsurfer
Copy link
Member

@churik @Serhy

@churik
Copy link
Member Author

churik commented Jan 24, 2020

@jakubgs @flexsurfer do you have logs for issue?

@flexsurfer
Copy link
Member

i can't reproduce this

@jakubgs
Copy link
Member

jakubgs commented Jan 24, 2020

@churik I just tested this by installing today's nightly over the RC and creating a new account and adding a watch-only address. The tokens loaded just fine an the history did too after a while. So I can't really reproduce it now.

@rachelhamlin
Copy link
Contributor

I have notorious infura issues and can't repro this either. Let's keep an eye for it, but I don't think it's a v1 blocker.

@flexsurfer
Copy link
Member

fixed by implementing retries on infura error

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

10 participants