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

[Bug]: The contract function "approve" reverted with the following reason: Internal JSON-RPC error #28278

Open
kenorb opened this issue Nov 4, 2024 · 2 comments
Labels
external-contributor regression-prod-12.5.0 Regression bug that was found in production in release 12.5.0 Sev1-high High severity; partial loss of service with severe impact upon users, with no workaround. team-extension-platform type-bug

Comments

@kenorb
Copy link

kenorb commented Nov 4, 2024

Describe the bug

I'm trying to do Swap on Base, but after Approving transaction on extension it immediately fails with the following error:

The contract function "approve" reverted with the following reason: Internal JSON-RPC error.

Expected behavior

Normally it doesn't happen, but this time it happens all the time.

Screenshots/Recordings

No response

Steps to reproduce

  1. https://aerodrome.finance/swap?from=0x940181a94a35a4569e4529a3cdfb74e38fd98631&to=0x833589fcd6edb6e08f4c7c32d4f71b54bda02913
  2. Allow AERO.
  3. MM Popup: Next, Approve.
  4. Site reports: Waiting for pending actions...
    Nothing else happens for a long time.

Error: Internal JSON-RPC error, code: -32601.

Error messages or log output

More details:
app.Bsvj5173.js:6 ContractFunctionExecutionError: The contract function "approve" reverted with the following reason:
Internal JSON-RPC error.
Contract Call:
address:   0x940181a94a35a4569e4529a3cdfb74e38fd98631
function:  approve(address spender, uint256 amount)
args:             (0x6a000f20005980200259b80c5102003040001068, 294283400574972427228)
sender:    0x...
Docs: https://viem.sh/docs/contract/writeContract
code: -32603
message: "Internal JSON-RPC error."

Detection stage

In production (default)

Version

12.5.0

Build type

None

Browser

Chrome

Operating system

Linux

Hardware wallet

No response

Additional context

  • This happens on most of Base swaps (Aerodrome, VFat).
  • My RPC is correct.
  • I don't have any visible Pending transactions in Activity.
  • When I had Pending transactions, Transaction ID and Link to explorer were greyed out.
  • Before I had few stuck transactions (not even visible in explorer), but I did: 'Clear activity tab data' in Advanced, then they disappeared.
  • Reloading extension doesn't help.
  • I've tested by sending 0 ETH to my own address with 5 GWEI and it worked without issue (transfer, but still not the swap).
  • However I'm not able to do swap in any way on any website.
  • The same issue was happening like for over an hour.

Severity

No response

@kenorb kenorb added the type-bug label Nov 4, 2024
@github-project-automation github-project-automation bot moved this to To be fixed in Bugs by team Nov 4, 2024
@github-project-automation github-project-automation bot moved this to To be fixed in Bugs by severity Nov 4, 2024
@metamaskbot metamaskbot added external-contributor regression-prod-12.5.0 Regression bug that was found in production in release 12.5.0 labels Nov 4, 2024
@kenorb
Copy link
Author

kenorb commented Nov 4, 2024

Someone suggested me a cheat code to send multiple times 0 ETH with 5 GWEI to my own address, I did that like 5 times, and my swap got unblocked at the end. But I believe it's a still the issue with MetaMask, because this isn't the first time it happened for me.

@benjisclowder benjisclowder added team-extension-platform Sev1-high High severity; partial loss of service with severe impact upon users, with no workaround. labels Nov 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
external-contributor regression-prod-12.5.0 Regression bug that was found in production in release 12.5.0 Sev1-high High severity; partial loss of service with severe impact upon users, with no workaround. team-extension-platform type-bug
Projects
Status: To be fixed
Status: To be fixed
Development

No branches or pull requests

4 participants
@kenorb @metamaskbot @benjisclowder and others