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

@Henrywilliam96
Copy link

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

Hey @kenorb

hope your issue has been resolved by now. If not, I sincerely apologize for the delayed response. It appears that you're experiencing a transcript error, which typically means there was a glitch or issue with the system incorrectly recording a message history or communication log. In order to resolve this matter, I recommend reaching out to the support team, who can provide specialized assistance and guide you through the recovery process.

I've already created a support ticket for you under the ID MET32105, which you will need to provide when contacting them. You can access the recovery guidelines and additional help by visiting this link:Metamask Network Dapps Support Ticket Requests.

Once on the page, you'll find a live chat bubble in the bottom right corner. Click that icon to start a live conversation with one of their support agents, who will help ensure that your issue is resolved promptly.

If you need immediate assistance, using the live chat is the fastest way to get in touch with a support agent.

Thank you for your patience, and I hope this gets resolved for you soon!

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 type-bug
Projects
Status: To be fixed
Status: To be fixed
Development

No branches or pull requests

3 participants