Pending, Failed & Replaced Transactions — Fixes

Get the Best Crypto Wallet — Start Now

Table of contents

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

Step-by-step: How to clear pending transactions on MetaMask (practical)

  1. Check the transaction status on a block explorer. Use the account address and confirm the nonce and current status. (![placeholder: etherscan tx view])

  2. 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.

  3. 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.

  4. 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.

  5. 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

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

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.

Get the Best Crypto Wallet — Start Now