Quick overview
Pending transactions in MetaMask can stall for a few predictable reasons: too-low gas, network congestion, a stuck nonce in your account, or a rejected contract call. This guide explains what is happening under the hood and provides clear, step-by-step fixes for common messages like "pending transaction metamask stuck", "contract interaction pending metamask", "modal closed by user metamask", and "could not read your accounts from metamask try unlocking it." I use MetaMask daily and have fixed these problems after real mistakes. And yes, the solutions below are practical and used in production workflows.
How MetaMask transactions actually work (nonce, mempool, EIP-1559)
Short version: each transaction from your address uses a sequential nonce. One stuck transaction blocks later ones that use higher nonces. Longer version: when you submit a transaction MetaMask sends it to your RPC provider (Infura, Alchemy, or a custom node). That node broadcasts it to the mempool. Miners or validators pick it up based on fee competitiveness. EIP-1559 (base fee + priority fee) changed how you set fees; a too-low priority fee can keep a transaction pending.
Example: a simple ETH transfer costs ~21,000 gas. A swap or contract interaction often requires 100k–400k gas depending on the contract. If your transaction sets a lower priority fee than the current market needs, it may sit in the mempool indefinitely.
Common error messages and what they mean
- pending transaction metamask stuck — Means a previously broadcast tx (same account) is unconfirmed and blocks subsequent ones because of nonce ordering.
- contract interaction pending metamask — MetaMask created and broadcast a contract call; the call hasn't confirmed (gas maybe too low) or the contract is waiting on network inclusion.
- modal closed by user metamask — The user cancelled the signature or closed the popup. Try again; nothing executed on-chain.
- could not read your accounts from metamask try unlocking it — The extension/app is locked or the dApp lost connection to the provider. Unlock MetaMask and reauthorize the site.
- exception thrown in contract code metamask — The contract reverted during execution. That usually costs gas and does not change state.
- failed transaction metamask ledger — With Ledger, failures often come from the device being locked, the wrong app not open, or restrictions on signing certain contract data.
Step-by-step: How to clear pending transactions on MetaMask (practical)
Check the transaction status on a block explorer. Use the account address and confirm the nonce and current status. (![placeholder: etherscan tx view])
If the TX is still pending and you want to speed it up, try MetaMask's "Speed Up" button in the transaction history. This resends the same nonce with a higher gas/priority fee.
To cancel via the UI, use the "Cancel" button. MetaMask creates a replacement transaction with the same nonce that transfers 0 ETH to your own address with a higher fee. If miners include that, the original will be invalidated.
Manual replacement (when UI buttons are not available): enable "Customize transaction nonce" in MetaMask settings > Advanced. Then create a new transaction from the same account with the exact stuck nonce and a higher priority fee. Send 0 ETH to your own address (or a tiny amount). This will replace the prior pending tx if miners include it.
If several transactions are queued and you want a clean slate, the non-destructive option is Settings > Advanced > Reset Account. This clears MetaMask's local transaction history (does not touch on-chain transactions or your keys). But note: you lose the in-extension history of pending transactions. Use this if you only need to clear UI noise. Reset MetaMask guide
Advanced fixes: manual nonce replacement, custom RPCs, Ledger specifics
When the public RPC is slow or rate-limited your replacement attempt may not propagate. Use a faster RPC endpoint or your own node. See developer RPC and node guide.
Ledger-specific tips
- Ensure the Ledger device is unlocked and the Ethereum app is open.
- Update firmware and the Ethereum app on the device.
- For contract interactions, confirm whether the Ledger requires "blind signing" or contract data enabled (depends on firmware). Refer to the Ledger with MetaMask guide in case of device-specific steps. Ledger with MetaMask
If you keep getting "exception thrown in contract code metamask" the contract is reverting. Re-check the transaction input, token allowances, and the contract's prerequisites (balance, allowance). Use how smart contracts work and token allowances and revoke.
Quick comparison: methods to unblock a pending tx
| Method |
When to use |
Speed |
Risk |
| MetaMask Speed Up |
Single stuck tx, UI available |
High |
Low (pays higher fee) |
| MetaMask Cancel |
You don't want the original tx |
Medium |
Medium (not guaranteed) |
| Manual replace with same nonce |
UI buttons missing or advanced control |
High |
Medium (must set correct nonce) |
| Reset Account (UI) |
UI clutter only; tx actually still pending on-chain |
Instant locally |
Low (no on-chain change) |
| Use alternative RPC / node |
Public RPC is failing |
Varies |
Low |
Safety checklist and best practices
- Always verify the network (Ethereum vs an L2). Sending on the wrong network creates a pending illusion.
- Never share your seed phrase to resolve pending transactions. Support will never ask for it.
- When replacing a tx, set a realistic priority fee. Look at recent blocks for guidance. I often check the last 10 blocks to choose a fee. (Yes, that takes 30 seconds.)
- If you use hardware wallets, finish the device prompts — leaving the device idle can cause a failed tx.
- Beware of dApp retries that auto-submit multiple identical transactions; some interfaces loop when they see pending state.
But remember: replacing or cancelling a transaction consumes gas. You pay to fix a stuck tx.
Who this guide is for (and who should look elsewhere)
This guide is for daily users of MetaMask who interact with DeFi, swaps, and dApps and who occasionally encounter pending or failed transactions. If you run an operator node, use advanced batching, or prefer non-custodial security at hardware-level, see hardware wallets with MetaMask and running your own node.
FAQ (real search queries answered)
Q: How do I clear pending transactions on my MetaMask wallet?
A: Use Speed Up or Cancel in MetaMask; if missing, enable "Customize transaction nonce" and send a replacement tx with the same nonce and higher fee. See step-by-step above.
Q: What does "modal closed by user MetaMask" mean?
A: It means the signature or approval popup was closed or rejected. No transaction was sent.
Q: "Could not read your accounts from MetaMask try unlocking it" — what now?
A: Unlock the extension/app, refresh the dApp, and reauthorize the connection. Also check browser privacy settings or extensions that block the connection.
Q: I get "exception thrown in contract code MetaMask" — can I recover funds?
A: The contract call reverted. Funds spent as gas are gone; tokens remain on-chain as before. Verify the failure reason on a block explorer and correct inputs.
Q: Why is my transaction failing with Ledger?
A: Common causes: device locked, Ethereum app not open, firmware mismatch, or the Ledger rejecting a complex contract call. Update the device and confirm prompts.
Takeaway and next steps
Stuck MetaMask transactions are almost always a nonce or fee problem — and they are fixable with either MetaMask's Speed Up/Cancel or a manual nonce replacement. I believe hands-on fixes build confidence; when I first experienced a stuck swap I learned the manual-replace method and have used it many times since. But be careful: replacing and cancelling still costs gas, and mistakes can double your spend.
Read the related troubleshooting guides for next steps: Using Etherscan with MetaMask, transaction errors and fixes, and gas fees, EIP-1559 & L2. If you need a deeper walkthrough for Ledger, check Ledger with MetaMask.
Want a short checklist you can copy-paste? Unlock, check nonce on a block explorer, decide Speed Up/Cancel or manual replace, and if all else fails reset the account UI (remember: on-chain txs remain). Safe transactions. Good luck.