Fixing MetaMask Transaction Errors

Try Tangem secure wallet →

Table of contents


Who this guide is for

This article is for anyone using the MetaMask software wallet (extension or mobile) who sees errors like transaction failed metamask, warning error encountered during contract execution metamask, transaction confirmed but not in wallet metamask, or state tx is not supported metamask. I’ve been using MetaMask daily for months and have fixed many stuck transactions by following the checks below. You will get step-by-step actions and links to deeper guides like stuck pending transactions and ledger troubleshooting.

Quick diagnosis checklist

  1. Copy the transaction hash (tx hash). Paste into a block explorer and check status. Did it include a block? Was gas used = 0? (short answer: that tells you if it reverted.)
  2. Confirm you’re on the right network and account. Wrong network = invisible confirmations.
  3. If the tx is pending, note the nonce. You’ll need it to replace/cancel.
  4. If using Ledger/Trezor, confirm the hardware app is open and firmware is up to date.
  5. Check token approvals and balances (insufficient allowance or balance causes many reverts).
  6. If the UI shows an error like "warning error encountered during contract execution metamask", copy the revert text and check the explorer.

And always keep a screenshot or tx hash before trying fixes.

Common error messages and what they mean

"transaction failed metamask"

This is a generic wrapper. A transaction can "fail" for several reasons: out-of-gas, a smart contract revert, insufficient ETH for gas, or sending to the wrong chain. How to proceed: check the block explorer for "status: failed" and the gasUsed value. If gasUsed > 0 it hit the contract and reverted (you still paid gas). If gasUsed = 0 the tx likely never left your node or was rejected locally.

Example: I once sent a swap with a tight slippage and the contract reverted. The explorer showed a revert reason and the cure was to raise slippage slightly and re-submit.

"warning error encountered during contract execution metamask"

This means the contract reverted during execution. The wallet surface displays the warning because the node returned an EVM revert. Steps:

What if no revert reason appears? Some contracts intentionally strip reasons. In that case, try a small test call or consult the dApp documentation.

"transaction error exception thrown in contract code metamask"

This is the chain telling you the contract threw an exception (require/throw). The fix is to verify the input and state assumptions the contract expects. For example, a lending protocol will throw if your collateral ratio is too low.

"state tx is not supported metamask"

This message is less common. It often points to RPC node limitations or hardware wallet translation issues (the node or hardware doesn’t recognize a requested state-related call). Fixes:

Ledger-related: "stuck transaction metamask ledger" / "transaction failed ledger metamask"

Hardware wallets introduce another layer (the device firmware and contract-data settings). Typical causes:

Fix: open the device Ethereum app, ensure firmware/app are updated, and follow connect-ledger and ledger-troubleshooting. But be careful with blind signing — only enable for trusted dApps.

Step-by-step: how to diagnose a failed or pending transaction

  1. Find the tx hash in MetaMask or your dApp’s UI.
  2. Paste into a block explorer. Confirm status: Pending / Failed / Success.
  3. If failed: read revert reason (if present) and check gasUsed. If gasUsed > 0 you paid gas.
  4. If pending: note nonce and gas price. Decide to wait, speed up, or replace.
  5. To speed up: use MetaMask’s "Speed Up" (desktop/mobile) or send a new tx with the same nonce and higher gas.
  6. If replacing/canceling manually: enable advanced nonce editing in settings, create a 0 ETH tx to your own address with the same nonce and higher gas, then broadcast.

(Exact UI labels change across releases; the steps above map to MetaMask’s general flow.)

Cancel, speed up, or replace a stuck transaction (nonce strategy)

Warning: resetting your account in MetaMask clears local history but does NOT remove a pending tx from the network. See reset remove for recovery tips.

Tools, commands and quick table

Feature / Variant Desktop extension Mobile app With Ledger attached
Quick Speed Up / Cancel Yes (UI buttons) Yes (transaction detail) Yes (but hardware confirmation required)
Edit Nonce Yes (advanced) Limited Yes (via MetaMask + device)
dApp Browser / WalletConnect dApp integration via injected provider Built-in dApp browser + WalletConnect Works, requires device app open

Useful links: gas fees and EIP-1559, transaction error debugging, stuck pending transactions, revoke approvals.

Preventive practices (what I do every day)

But do not disable security features to make a specific transaction easier. Trust me, I learned that the hard way.

FAQ — real questions people search for

Q: Is it safe to keep crypto in a hot wallet if transactions keep failing?
A: A hot wallet is fine for day-to-day DeFi interactions, but repeated failures are an operational issue, not a security one. If failures are caused by malicious approvals, follow revoke approvals and consider moving funds to a hardware wallet.

Q: How do I revoke token approvals after a failed transaction?
A: Use the dApp that manages allowance revocations or a reputable revocation tool (see revoke approvals). Always verify contract addresses manually.

Q: What if a transaction is "transaction confirmed but not in wallet metamask"?
A: Check the tx hash on the explorer. If the chain shows success but MetaMask UI doesn’t, try switching networks, re-adding the token, or using reset remove. If balances still wrong, reopen the app or reinstall extension (after secure seed backup).

Q: I see "state tx is not supported metamask" — what should I do?
A: Switch RPC endpoints and update hardware firmware. If the error persists, test with a simple ETH transfer to confirm base functionality, then retry the contract interaction.

Conclusion and next steps

Transaction errors are frustrating but fixable with a methodical approach: get the tx hash, check the block explorer, read the revert/gas details, and then either speed up/replace or correct inputs and re-submit. If you use a hardware wallet, double-check device settings and firmware. For hands-on guides see transaction error debugging, stuck pending transactions, and ledger troubleshooting.

If you want a concise checklist PDF or step-by-step screenshots for mobile vs desktop, check the related guides: install-extension, install-mobile, and connect-ledger.

Ready to fix a specific tx? Grab the tx hash and start with the block explorer — that one move answers most questions.

Try Tangem secure wallet →