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

Metamask hangs indefinitely when I try to send txes #3881

Closed
lsankar4033 opened this issue Apr 4, 2018 · 61 comments
Closed

Metamask hangs indefinitely when I try to send txes #3881

lsankar4033 opened this issue Apr 4, 2018 · 61 comments
Assignees
Labels
Milestone

Comments

@lsankar4033
Copy link

I'm interacting with a contract running on a local dev blockchain (Ganache). After clicking 'Submit' to confirm a transaction in the Metamask popup, I'm presented with the following spinning icon forever:

screen shot 2018-04-04 at 4 06 01 pm

If I click out, and click on the Metamask plugin icon, it seems that the transaction has been sent:

screen shot 2018-04-04 at 4 06 59 pm

but the transaction is not showing up on my ganache instance! I've successfully sent the same transaction not via Metamask (i.e. via a ganache console), so the issue seems to be with Metamask. How do I begin to debug this problem?

@tarrencev
Copy link

tarrencev commented Apr 4, 2018

I'm seeing this same behavior, transactions sit in the "Approved" status and I don't see them created in the ganache logs.

Rolled back to 4.4.0 to resolve for now

@HartgerV
Copy link

HartgerV commented Apr 5, 2018

Experienced the same behavior in Chromium Version 65.0.3325.181 (Official Build) Built on Ubuntu , running on Ubuntu 16.04 (64-bit)

Reverting to 4.5.2 fixed the issue, so the breaking change seems to be in the 4.5.3 release

@danfinlay
Copy link
Contributor

We believe we've found the cause of this problem, and are fixing it.

If you experience this issue, try restarting your browser, that may also fix the problem for you. (And let us know)

@joelnet
Copy link

joelnet commented Apr 6, 2018

Restart browser didn't fix problem. Uninstall extension / reinstall extension also no affect. MM on Chrome does not work while on Brave MM works.

OS: Ubuntu 16.04 (64-bit)
Ganache: ganache-1.1.0-x86_64

MetaMask: 4.5.3
Chrome: Version 65.0.3325.181 (Official Build) (64-bit)

Brave: 0.22.13
MetMask: 3.14.1

@dpurhar27
Copy link

I'm am also currently experiencing this problem using Ganache as well, thanks for the fix in advance!

@dpurhar27
Copy link

I restarted my browser and it is working again!

@xeroblood
Copy link

xeroblood commented Apr 8, 2018

+1 Also experiencing this error. Restarting browser alone doesn't seem to work. I have to reset my MM test accounts which means restarting Ganache, redeploying my contract, etc... Basically restart testing all over.

@Cloetn
Copy link

Cloetn commented Apr 8, 2018

+1 here. I have this issue as well with MetaMask 4.5.5. You have to redo everything before it can work again.

@auser
Copy link

auser commented Apr 9, 2018

As do I.

. Help?

@tarrencev
Copy link

A temporary solution is to use version 4.4.0:
Download zip here: https://github.com/MetaMask/metamask-extension/releases/tag/v4.4.0
Installing chrome extensions from source: https://stackoverflow.com/questions/24577024/install-chrome-extension-not-in-the-store

@auser
Copy link

auser commented Apr 9, 2018

Yes, this fixes it for me... I'll stick to 4.4.0 for now.

Thank you!

@lsankar4033
Copy link
Author

switched to 4.4.0 and still having the same issue. same goes for restarting the browser.

Any tips on how I might be able to debug the issue locally?

@lumsdnb
Copy link

lumsdnb commented Apr 10, 2018

+1, same problem. Switched to Chrome and ran with 4.4.0 and it worked once, but now I have the same problem again.

@timothywangdev
Copy link

+1

@bshevchenko
Copy link

For us it hangs when we try to sign some data (not tx) in both ganache and ropsten networks.

@bshevchenko
Copy link

Now it also hangs for transactions

@apbendi
Copy link

apbendi commented Apr 12, 2018

I'm experiencing this issue as well. Brave seems to work.

@danfinlay
Copy link
Contributor

Sorry for the delay, we had some staff rotations and apparently our triage process failed this bug.

Could someone having this problem look at their logs (maybe copy their UI state logs from the console) and send them to us at [email protected], referencing this issue?

https://metamask.helpscoutdocs.com/article/21-how-to-get-logs-and-help-metamask-support-and-diagnose-your-issue

@apbendi
Copy link

apbendi commented Apr 17, 2018

@danfinlay sent; ticket number: 12866

@danfinlay
Copy link
Contributor

danfinlay commented Apr 17, 2018

I have some logs from @apbendi, and I've confirmed these transactions sit in the "approved" (not signed or broadcast) state, which is very strange.

You can tell it was never signed because there is no "nonce" number in the transaction list cell.

Since this doesn't show us why this is happening, I'm now relying on someone with this issue to open their background logs, try sending a transaction, and hopefully recording some red error messages:

https://metamask.helpscoutdocs.com/article/21-how-to-get-logs-and-help-metamask-support-and-diagnose-your-issue

@johnhforrest
Copy link

Repros for me too.
Ganache 1.10
Chrome 65.0.3325.181
MM version 4.5.5

Repro steps:

  • Sent a transaction where the nonce was out of sync, so the tx failed
  • Reset the nonce in the settings
  • Try to send a new tx, it always hangs

Uninstalling/reinstalling MM worked for me.

@rhlsthrm
Copy link

Found another repro situation with the nonce in sync using a local blockchain:

  • Send two transactions in a row in my web3 code (i.e. approve and transferFrom for ERC20).
  • First one shows up in MetaMask, click send, infinite spinner.

@danfinlay any progress here? It would be great to use MetaMask as a reliable dev tool, but seems like local blockchain issues are quite prevalent. I'm somewhat stuck to MetaMask too now in my dev process because I'm using eth_signTypedData which isn't yet supported by Ganache.

@danfinlay
Copy link
Contributor

Hi all, very sorry this bug has hung around as long as it has. MetaMask is a developer tool before it is anything else, and it's critical that we keep your ability to build Dapps working smoothly. It looks like we've found the root problem in #4086, and @frankiebee is currently working on a fix. We're going to have a fix out asap.

@zulhfreelancer
Copy link

zulhfreelancer commented Apr 28, 2018

Just want to share. If you are facing issues on Chrome, you can use Firefox for now. Just got into the same issue on Chrome. When I switched to Firefox, all works fine.

MetaMask: 4.5.5
Firefox: 59.0.2 (64-bit)
Ganache: 1.1.0
Truffle: 4.1.7
Solidity: 0.4.23
OSX: 10.12.6

Thank you @danfinlay and team for the hardwork!

@ToJen
Copy link

ToJen commented Apr 29, 2018

I am using the beta version of MetaMask on Chrome but the older version on both Brave and Firefox. In my case, the user has to sign two transactions to register an account. In the older UI, I'm able to navigate back and forth and sign the transactions in order. The beta UI layers the transaction calls on each other so my second transaction is displayed before the first which will obviously cause an error. I tested both old and new UI in Chrome and Brave and the old UI works fine. This may not be a major issue. Testing in incognito mode signs transactions automatically btw.

@Nufflee
Copy link

Nufflee commented Apr 30, 2018

I'm still facing this issue.

@danfinlay
Copy link
Contributor

This issue has been fixed in #4128, and the fix will be published later today.

@nolash
Copy link

nolash commented Jun 19, 2018

Hangs in same manner on web3.eth.sign(). I'm trying the following code:

                window.addEventListener("load", function(e) {
                        if (typeof web3 !== 'undefined') {
                                web3js = new Web3(web3.currentProvider);
                        }
                        web3js.eth.getAccounts(function(e, accounts) {
                                web3js.eth.sign("foo", accounts[0], function(e) {
                                        console.log("ok: " + e);
                                        return true;
                                })
                        });
                        
                });

After I click "sign" in the metamask popup, the text "invalid message length" briefly shows on the screen before the spinner takes the screen.

... or am I merely wrong to assume that I can sign arbitrary data with metamask?

  • web3.js 1.0 (dd55daa6) and 1.0.0-beta.34 (fcf6997d)
  • Metamask 4.8.0 and 4.4.0
  • Chromium 67.0.3396.87
  • Linux 4.17.2-1-ARCH

@bdresser
Copy link
Contributor

@nolash looks like you might have your params mixed up. check the API reference and this example implementation.

@nickjuntilla
Copy link

I also have a private blockchain and I am trying to send transactions. I was able to use it one day and then another day it stopped working and never worked again.

I installed 4.8.0 and it will update transactions, but it will not send transactions. Also when you click send or anything involved in creating a transaction the metamask screen will freeze. If you click away and the window closes then click back on metamask it will be at the next screen. Approving the transaction will not however actually send a transaction. The transaction will show in the transactions list but it will will never complete or send.

I have tried resetting the accounts, re-installing metamask, making sure my chainId matches my networkid and restarting my browser. Any help appreciated!

@nolash
Copy link

nolash commented Jul 9, 2018

@bdresser to me it seems that it's metamask that got it the wrong way. If I put the data from your example as the second param, I get the following error:

Provided address "0x879a053d4800c6354e76c7985a865d2922c82fb5b3f4577b2fe08b998954f2e0" is invalid [...]

However if I do this:

web3js.eth.sign(web3js.utils.sha3("foo"), accounts[0], function(e, v) {
    console.log("e " + e + ", v " + v);
});

...it works.

So the metamask implementation seems not to accept arbitrary data to sign; it needs to be sha3'd. And the parameters does not match the API ref.

@nickjuntilla
Copy link

I created a new issue for this since it is still happening: #4760

@matrix-wd
Copy link

use brave browser and add metamask, it works well.

@W3BSTAR
Copy link

W3BSTAR commented Nov 12, 2018

same happened here on chrome
to resolve issue:

  1. restart chrome
  2. open metamask, but before login, select different network
  3. login
  4. change network to your network which caused the crash
  5. you can see a transaction which failed, click it and decline it

@BigMurry
Copy link

BigMurry commented Dec 5, 2018

This happens to me a lot, especially when Chrome opened for a long time (likes some days).

If you don't want to restart chrome and close your precious tabs:

  1. chome settings --> More Tools --> Extensions
  2. disable metamask
  3. re-enable metamask
  4. unlock metamask and switch to different network and change back.
  5. find your pending tx and reject it.

now everything ready to go.

@miguelmota
Copy link

miguelmota commented Apr 25, 2019

I'll randomly experience the indefinitely spinning wheel. It starts working again after a few minutes of hanging but it does this for every transaction.

@snailking
Copy link

snailking commented Apr 26, 2019

After a couple months of hassle-free MetaMasking, the infinite spinning wheel is back with a revenge, just like miguelmota describes. Even uninstalling the extension completely doesn't seem to fix it. This is on 6.4.0 with Firefox.

@SylTi
Copy link

SylTi commented Apr 26, 2019

Mine remains completely stuck loading on the main popup; even after 30min of waiting on chrome/windows.

Setting up Sentry Remote Error Reporting: SENTRY_DSN_PROD
ui.js:1 Translator - Unable to find value for key "goerli"
getMessage @ ui.js:1
ui.js:1 Translator - Unable to find value for key "accountOptions"
getMessage @ ui.js:1
ui.js:1 Translator - Unable to find value for key "balanceOutdated"
getMessage @ ui.js:1
2ui.js:1 Translator - Unable to find value for key "goerli"
getMessage @ ui.js:1
ui.js:1 Translator - Unable to find value for key "goerli"
getMessage @ ui.js:1

@pizzarob
Copy link

pizzarob commented Apr 26, 2019

Seeing this when testing with Ganache CLI v6.2.5 (ganache-core: 2.3.3) metamask version 6.4.0. Seeing it resolve after about 2 minutes, but seeing some errors in the console/network tab

image

@vindberg
Copy link

Same happens here. Any experience with updating ganache-cli helps?

@balladanna
Copy link

I tried @BigMurry 's instruction - didnt work
I tried restarting Chrome - didnt work
MetaMask 6.4.1

Only after restarting my computer I was able to send my tokens out. Solved!

@BarneyChambers
Copy link

Still seeing this issue in Metamask 7.6.1 in chrome. Restarting the browser has no effect

@DefiCake
Copy link

DefiCake commented Nov 27, 2019

Metamask 7.6.1
Chromium Version 78.0.3904.70 (Official Build) Built on Ubuntu , running on elementary 5.0 (64-bit)

Connects and displays correctly the balances, but as soon as I hit the send button the whole UI freezes, I have to wait like 1 minute before being able to do anything again. I am able to send transactions and deploy contracts normally through web3 / ethers / truffle.

Update: restarting the whole computer fixed it. Suspecting that various installs and uninstalls (since we do not have a way of correctly deleting networks yet) might be at fault.

image

ui.js:1 POST https://sentry.io/api/273505/store/?sentry_key=3567c198f8a8412082d32655da2961d0&sentry_version=7 429 (Unknown Status Code)
(anonymous) @ ui.js:1
(anonymous) @ ui.js:1
(anonymous) @ ui.js:1
(anonymous) @ ui.js:1
(anonymous) @ ui.js:1
u @ ui.js:1
t.captureEvent @ ui.js:1
(anonymous) @ ui.js:1
(anonymous) @ ui.js:1
(anonymous) @ ui.js:1
(anonymous) @ ui.js:1
u @ ui.js:1
t.sendEvent @ ui.js:1
(anonymous) @ ui.js:1
(anonymous) @ ui.js:1
(anonymous) @ ui.js:1
(anonymous) @ ui.js:1
i @ ui.js:1
(anonymous) @ ui.js:1
(anonymous) @ ui.js:1
(anonymous) @ ui.js:1
(anonymous) @ ui.js:1
a @ ui.js:1
Promise.then (async)
u @ ui.js:1
a @ ui.js:1
Promise.then (async)
u @ ui.js:1
(anonymous) @ ui.js:1
i @ ui.js:1
e.processEvent @ ui.js:1
(anonymous) @ ui.js:1
(anonymous) @ ui.js:1
(anonymous) @ ui.js:1
(anonymous) @ ui.js:1
i @ ui.js:1
(anonymous) @ ui.js:1
(anonymous) @ ui.js:1
(anonymous) @ ui.js:1
(anonymous) @ ui.js:1
i @ ui.js:1
e.captureEvent @ ui.js:1
(anonymous) @ ui.js:1
(anonymous) @ ui.js:1
(anonymous) @ ui.js:1
a @ ui.js:1
Promise.then (async)
u @ ui.js:1
(anonymous) @ ui.js:1
i @ ui.js:1
(anonymous) @ ui.js:1
(anonymous) @ ui.js:1
(anonymous) @ ui.js:1
(anonymous) @ ui.js:1
i @ ui.js:1
e.captureException @ ui.js:1
e.invokeClientAsync @ ui.js:1
e.captureException @ ui.js:1
(anonymous) @ ui.js:1
(anonymous) @ ui.js:1
(anonymous) @ ui.js:1
(anonymous) @ ui.js:1
u @ ui.js:1
(anonymous) @ ui.js:1
e.withScope @ ui.js:1
a @ ui.js:1
r.withScope @ ui.js:1
n @ ui.js:1
home.html#send:1 Error in event handler: TypeError: Cannot read property '_currentElement' of null
    at u._updateRenderedComponent (chrome-extension://nkbihfbeogaeaoehlefnkodbefgpgknn/ui-libs.js:1:1139863)
    at u._performComponentUpdate (chrome-extension://nkbihfbeogaeaoehlefnkodbefgpgknn/ui-libs.js:1:1139687)
    at updateComponent (chrome-extension://nkbihfbeogaeaoehlefnkodbefgpgknn/ui-libs.js:1:1138965)
    at u.receiveComponent (chrome-extension://nkbihfbeogaeaoehlefnkodbefgpgknn/ui-libs.js:1:1138092)
    at Object.receiveComponent (chrome-extension://nkbihfbeogaeaoehlefnkodbefgpgknn/ui-libs.js:1:1193975)
    at u._updateRenderedComponent (chrome-extension://nkbihfbeogaeaoehlefnkodbefgpgknn/ui-libs.js:1:1139930)
    at u._performComponentUpdate (chrome-extension://nkbihfbeogaeaoehlefnkodbefgpgknn/ui-libs.js:1:1139687)
    at updateComponent (chrome-extension://nkbihfbeogaeaoehlefnkodbefgpgknn/ui-libs.js:1:1138965)
    at u.receiveComponent (chrome-extension://nkbihfbeogaeaoehlefnkodbefgpgknn/ui-libs.js:1:1138092)
    at Object.receiveComponent (chrome-extension://nkbihfbeogaeaoehlefnkodbefgpgknn/ui-libs.js:1:1193975)
    at u._updateRenderedComponent (chrome-extension://nkbihfbeogaeaoehlefnkodbefgpgknn/ui-libs.js:1:1139930)
    at u._performComponentUpdate (chrome-extension://nkbihfbeogaeaoehlefnkodbefgpgknn/ui-libs.js:1:1139687)
    at updateComponent (chrome-extension://nkbihfbeogaeaoehlefnkodbefgpgknn/ui-libs.js:1:1138965)
    at u.receiveComponent (chrome-extension://nkbihfbeogaeaoehlefnkodbefgpgknn/ui-libs.js:1:1138092)
    at Object.receiveComponent (chrome-extension://nkbihfbeogaeaoehlefnkodbefgpgknn/ui-libs.js:1:1193975)
    at u._updateRenderedComponent (chrome-extension://nkbihfbeogaeaoehlefnkodbefgpgknn/ui-libs.js:1:1139930)
    at u._performComponentUpdate (chrome-extension://nkbihfbeogaeaoehlefnkodbefgpgknn/ui-libs.js:1:1139687)
    at updateComponent (chrome-extension://nkbihfbeogaeaoehlefnkodbefgpgknn/ui-libs.js:1:1138965)
    at u.receiveComponent (chrome-extension://nkbihfbeogaeaoehlefnkodbefgpgknn/ui-libs.js:1:1138092)
    at Object.receiveComponent (chrome-extension://nkbihfbeogaeaoehlefnkodbefgpgknn/ui-libs.js:1:1193975)
    at u._updateRenderedComponent (chrome-extension://nkbihfbeogaeaoehlefnkodbefgpgknn/ui-libs.js:1:1139930)
    at u._performComponentUpdate (chrome-extension://nkbihfbeogaeaoehlefnkodbefgpgknn/ui-libs.js:1:1139687)
    at updateComponent (chrome-extension://nkbihfbeogaeaoehlefnkodbefgpgknn/ui-libs.js:1:1138965)
    at u.receiveComponent (chrome-extension://nkbihfbeogaeaoehlefnkodbefgpgknn/ui-libs.js:1:1138092)
    at Object.receiveComponent (chrome-extension://nkbihfbeogaeaoehlefnkodbefgpgknn/ui-libs.js:1:1193975)
    at u._updateRenderedComponent (chrome-extension://nkbihfbeogaeaoehlefnkodbefgpgknn/ui-libs.js:1:1139930)
    at u._performComponentUpdate (chrome-extension://nkbihfbeogaeaoehlefnkodbefgpgknn/ui-libs.js:1:1139687)
    at updateComponent (chrome-extension://nkbihfbeogaeaoehlefnkodbefgpgknn/ui-libs.js:1:1138965)
    at u.receiveComponent (chrome-extension://nkbihfbeogaeaoehlefnkodbefgpgknn/ui-libs.js:1:1138092)
    at Object.receiveComponent (chrome-extension://nkbihfbeogaeaoehlefnkodbefgpgknn/ui-libs.js:1:1193975)
    at u._updateRenderedComponent (chrome-extension://nkbihfbeogaeaoehlefnkodbefgpgknn/ui-libs.js:1:1139930)
    at u._performComponentUpdate (chrome-extension://nkbihfbeogaeaoehlefnkodbefgpgknn/ui-libs.js:1:1139687)
    at updateComponent (chrome-extension://nkbihfbeogaeaoehlefnkodbefgpgknn/ui-libs.js:1:1138965)
    at u.receiveComponent (chrome-extension://nkbihfbeogaeaoehlefnkodbefgpgknn/ui-libs.js:1:1138092)
    at Object.receiveComponent (chrome-extension://nkbihfbeogaeaoehlefnkodbefgpgknn/ui-libs.js:1:1193975)
    at Object.updateChildren (chrome-extension://nkbihfbeogaeaoehlefnkodbefgpgknn/ui-libs.js:1:1132058)
    at Q._reconcilerUpdateChildren (chrome-extension://nkbihfbeogaeaoehlefnkodbefgpgknn/ui-libs.js:1:1188648)
    at Q._updateChildren (chrome-extension://nkbihfbeogaeaoehlefnkodbefgpgknn/ui-libs.js:1:1189585)
    at Q.updateChildren (chrome-extension://nkbihfbeogaeaoehlefnkodbefgpgknn/ui-libs.js:1:1189483)
    at Q._updateDOMChildren (chrome-extension://nkbihfbeogaeaoehlefnkodbefgpgknn/ui-libs.js:1:1152925)
    at Q.updateComponent (chrome-extension://nkbihfbeogaeaoehlefnkodbefgpgknn/ui-libs.js:1:1151102)
    at Q.receiveComponent (chrome-extension://nkbihfbeogaeaoehlefnkodbefgpgknn/ui-libs.js:1:1150655)
    at Object.receiveComponent (chrome-extension://nkbihfbeogaeaoehlefnkodbefgpgknn/ui-libs.js:1:1193975)
    at Object.updateChildren (chrome-extension://nkbihfbeogaeaoehlefnkodbefgpgknn/ui-libs.js:1:1132058)
    at Q._reconcilerUpdateChildren (chrome-extension://nkbihfbeogaeaoehlefnkodbefgpgknn/ui-libs.js:1:1188648)
    at Q._updateChildren (chrome-extension://nkbihfbeogaeaoehlefnkodbefgpgknn/ui-libs.js:1:1189585)
    at Q.updateChildren (chrome-extension://nkbihfbeogaeaoehlefnkodbefgpgknn/ui-libs.js:1:1189483)
    at Q._updateDOMChildren (chrome-extension://nkbihfbeogaeaoehlefnkodbefgpgknn/ui-libs.js:1:1152925)
    at Q.updateComponent (chrome-extension://nkbihfbeogaeaoehlefnkodbefgpgknn/ui-libs.js:1:1151102)
    at Q.receiveComponent (chrome-extension://nkbihfbeogaeaoehlefnkodbefgpgknn/ui-libs.js:1:1150655)

@MetaMask MetaMask locked as off-topic and limited conversation to collaborators Nov 27, 2019
@danfinlay
Copy link
Contributor

Please open any new issues as new issues, or email [email protected] for user support.

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

No branches or pull requests