Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

MetaMask takes a really long time before showing tx confirmation #2935

Closed
ghost opened this issue Jan 11, 2018 · 15 comments
Closed

MetaMask takes a really long time before showing tx confirmation #2935

ghost opened this issue Jan 11, 2018 · 15 comments
Labels
type-bug Something isn't working type-enhancement

Comments

@ghost
Copy link

ghost commented Jan 11, 2018

Hi,
I am on mac, using chrome.

I coded a small website using the web3 js api. And when I am using this function :

web3.eth.sendTransaction({},cb);

Everything works as expected, but sometime the metamask notification can take ~30seconds before showing up.

Is there something I can do to show it faster?

thanks

@jdn-za
Copy link

jdn-za commented Jan 11, 2018

Had the same issue on my mac using online sites

@danfinlay
Copy link
Contributor

danfinlay commented Jan 11, 2018

We're aware of this issue. It has to do with us waiting for the Infura backend to estimate gas. This has to do with the quantity of users at once. We're addressing this currently with several strategies at once:

  • Infura is debugging why Geth seems to be very slow at estimating gas. (Related to eth_estimateGas performance ethereum/go-ethereum#15859 )
  • Infura is looking at scaling this method more.
  • MetaMask is looking at moving more estimation logic to the client side (the VM).
  • MetaMask is looking to pop-up before estimation is complete, so you can see what exactly is pending.

@ghost
Copy link
Author

ghost commented Jan 11, 2018

Thanks for your answer.
Your ideas seems nice, but i have one more suggestion :

  • I am already passing a gas and gasprice as part of the transaction object, in this case it might be cool to just by-pass the gas estimation algo.

thanks

@danfinlay
Copy link
Contributor

That's a good idea, we could do that.

Also, users can work around this issue by running a local node.

@danfinlay danfinlay added type-bug Something isn't working P1-asap labels Jan 12, 2018
@danieldemmont
Copy link

danieldemmont commented Jan 12, 2018

Also tried the web3.eth.sendTransaction function yesterday and nothing popped up. While trying to find out the bug (10-15 min later) it randomly popped up.

So I tried it again 25 times throughout the day, timed it and the results were this:

  • median wait: 9 min

  • average wait : 12 min

That's excluding 6 times when it actually never popped up.

This morning it worked within seconds, then during the day it was delayed about 5 mins and now its working again.

Seems like a critical bug because when I went around to see if people were experiencing the same issue, I saw a slew of very angry users and some pretty vile comments about this issue (I guess when time and money is at stake people tend to get particularly nasty :D).

Since most users won’t be running their own node, maybe just a small patch giving them the opportunity to enter the gas themselves while a spinner indicates that its calculating would be nice. This would allow for the window to pop up immediately and satisfy both users - the ones in a time sensitive situation and the ones who are willing to wait.

Also @danfinlay and @maurinlenglart solutions sound very reasonable, especially for the long term.

@danfinlay
Copy link
Contributor

Another workaround for people not wanting to run their own node is to rent a dedicated cloud node via https://quiknode.io/

@mhannigan
Copy link

Is that a serious reply? Instead of unbreaking Metamask, you want users to "rent a dedicated node"? Dude, can I get on your flight?

@danfinlay
Copy link
Contributor

I very much wish I was kidding. Unfortunately, at the moment, Infura is unable to further scale the gas estimating method. It will probably take a couple days before they can. For users like @danieldemmont who say they are in rooms full of people who depend on MetaMask for their regular business, yes, I absolutely think temporarily renting a node is a good idea.

@danfinlay
Copy link
Contributor

Full disclosure: I'm not affiliated with QuikNode, I have had conversations with them helping them to support MetaMask users, and I get no kick-back for any adoption they receive. I 100% suggested it because it is in the best interest of some users at the moment.

@danieldemmont
Copy link

danieldemmont commented Jan 12, 2018

I personally already run my own node for development purposes, but when creating dapps I find it unlikely that regular users would ever consider that. Simply from an UX perspective it might be a little confusing for newcomers if they click on an action on the dapp and there is no feedback for 10 mins (they would probably assume the dapp is broken).

If the bottleneck is solely the gas estimation method, why not make it optional in the settings until Infura is able to scale and it runs without hiccups?

Thanks for the QuikNode suggestion by the way, seems like a cool service.

@danfinlay
Copy link
Contributor

Yes, we are actively developing that solution. We don’t expect that workaround to be the new norm, it is just a short term workaround for those reading this thread.

Oh in the full disclosure, I forgot they once gave me a free instance, but I lost it, and just use infura now. If anyone from Quiknode reads this, you could spin that down, sorry for not notifying. Or send me the url again.

@danfinlay danfinlay changed the title really long time before showing the notification MetaMask takes a really long time before showing tx confirmation Jan 12, 2018
@bdresser
Copy link
Contributor

hey all - still experiencing this? anecdotally, this seems to have improved in the past couple months, let us know if you're still having trouble with this.

@bdresser
Copy link
Contributor

bdresser commented Oct 1, 2018

@miningbadger this issue describes a scenario where it takes a long time before opening the Confirm popup - if you're having trouble with 4.12, would you please open a new issue with a description of what happened and steps to reproduce? Thank you!

@lzmartinico
Copy link

I also experience this issue (Metamask 5.0.2, Firefox 63), calling a function with large gas spenditure in Remix is OK over the VM, but when I try to use it on the network I am never shown the confirmation window, and the transction is "pending" according to Remix.

@tmashuang
Copy link
Contributor

Closing due to inactivity, please open a new issue if the issue has persisted.

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
type-bug Something isn't working type-enhancement
Projects
None yet
Development

No branches or pull requests

8 participants
@danfinlay @bdresser @jdn-za @mhannigan @lzmartinico @tmashuang @danieldemmont and others