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

Occasional hanging calls to getBalance #5846

Closed
Schwartz10 opened this issue Nov 28, 2018 · 2 comments · Fixed by #5902
Closed

Occasional hanging calls to getBalance #5846

Schwartz10 opened this issue Nov 28, 2018 · 2 comments · Fixed by #5902
Assignees
Labels

Comments

@Schwartz10
Copy link

Describe the bug
Inconsistently, the calls to web3 getBalance do not resolve. This is different from issue #5842

To Reproduce
Unfortunately we do not have good steps to reproduce, although this starts to happen after keeping the browser open for a while.

Expected behavior
Calls to web3 getBalance should always either resolve with the account balance or reject

More details
In our app, we make 3 back to back to back calls:

getAccounts()
getNetwork()
getBalance(address)

The first two calls go through fine, almost immediately.

The third getBalance call hangs, and even after waiting several minutes does not resolve.

Something interesting to note is that in MetaMask’s network tab - we’re not seeing any of the JSONRPC calls made to accounts, network, or balance. All we’re seeing is:

https://api.infura.io/v1/jsonrpc/rinkeby/eth_blockNumber?params=%5B%5D

https://api.infura.io/v1/jsonrpc/rinkeby/eth_getBlockByNumber?params=%5B%220x342c2e%22%2Ctrue%5D

Both of these requests come back with valid responses.

Especially important is that we don’t see any calls to eth_getBalance, however, when the balance does successfully get fetched in our app, we do see those calls being made in the metamask network tab.

It's hard to reproduce this issue because it inconsistently starts happening. Enabling / disabling the metamask extension in chrome OR switching accounts to a different account will resolve the issue (but switching back to the original account experiencing the issue still causes the call to hang).

It might be helpful to note that enabling / disabling the extension then reinvokes the process of calling window.ethereum.enable for handling metamask's privacy update.

Browser details (please complete the following information):

  • OS: macOS High Sierra Version 10.13.3
  • Browser: Brave & Chrome
  • MetaMask Version: 5.0.3
@bdresser
Copy link
Contributor

thanks @Schwartz10

might relate to #5842 and #5723 cc @danjm

@danfinlay
Copy link
Contributor

danfinlay commented Dec 7, 2018

I think I've got some basic repro here, after spending the day investigating Ujo's issue:
danfinlay/ujo-bug-repro#1

@ghost ghost assigned danfinlay Dec 10, 2018
@ghost ghost added the in progress label Dec 10, 2018
@ghost ghost removed the in progress label Dec 11, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants