interface icon indicating copy to clipboard operation
interface copied to clipboard

Unknown error: "Internal JSON-RPC error.". Try increasing your slippage tolerance.

Open platocrat opened this issue 4 years ago • 10 comments

These bugs were surfaced from community members in Optimism's Discord server.

Bug Description On rare occasions when you attempt to make a swap, you will receive an error that says something like:

Unknown error: "Internal JSON-RPC error.". Try increasing your slippage tolerance. Note: fee on transfer and rebase tokens are incompatible with Uniswap V3.

Steps to Reproduce

  1. Go to https://app.uniswap.org
  2. Switch your network to Optimistic Ethereum
  3. Try swapping any token.
  4. Click the Swap button.
  5. Click Confirm Swap.
  6. Reject the transaction in MetaMask.
  7. Repeat steps 3 - 6 until you see the following error.

Expected Behavior Clicking Swap should bring up the Confirm Swap modal.

Additional Context Here are screenshots of the community members sharing the error messages they received.

Screen Shot 2021-08-25 at 8 29 44 AM Screen Shot 2021-08-25 at 8 28 16 AM

On reproducibility

I am able to reproduce this error only rarely. However, I've noticed that it tends to happen after I approve a token for trading, e.g. USDC.

For one of the users in the screenshot above, they say that they still cannot make a swap due to this error showing up incessantly.

platocrat avatar Aug 25 '21 15:08 platocrat

"Try increasing your slippage tolerance" seems to be a default message that doesn't apply here. I think the error message could be clearer - this is probably a problem with the JSON-RPC Provider. The error is coming either from the chain or the provider.

As a first step, I think the error message can be cleaned up. As a second step, this should probably be reproduced to determine why metamask is returning a JSON-RPC error in the first place.

zzmp avatar Sep 01 '21 20:09 zzmp

Just as an FYI, I am getting this error constantly and not just once in a while when trying to swap from SNX-ETH or SNX-sUSD. Does it have to do with the liquidity (it should not for SNX-ETH)?

muten85 avatar Sep 11 '21 02:09 muten85

FYI: It happens very constantly when I try SNX-DAI or SNX-sUSD, when I use 1.1 SNX swap DAI, it can works but when I use 1.2 SNX swap to DAI, it always fail and pop up this error.

hpzxk avatar Sep 13 '21 15:09 hpzxk

Same error, when I try to swap SNX to ETH or sUSD on Optimism

thomasWos avatar Oct 06 '21 12:10 thomasWos

No error today. Was able to convert ETH to sUSD, sUSD to ETH and SNX to Eth.

muten85 avatar Oct 09 '21 05:10 muten85

I'm dealing with the same error and am not able to swap SNX for anything.

FrenchFryChi avatar Oct 11 '21 17:10 FrenchFryChi

can't swap SNX on Optimism Screen Shot 2021-10-13 at 5 14 11 pm

thomasWos avatar Oct 13 '21 06:10 thomasWos

Trying to swap base token "mooncrash" to bnb on pancakeswap but getting the issue Unknown error: "Internal JSON-RPC error.". Try increasing your slippage tolerance. Have changed slippage but does not help?

dOanwts avatar Mar 04 '22 01:03 dOanwts

Object { code: -32603, message: "Internal JSON-RPC error.", data: {…} } ​ code: -32603 ​ data: Object { code: -32000, message: "execution reverted" } ​ message: "Internal JSON-RPC error."

MyLacrosse avatar Jul 26 '22 10:07 MyLacrosse

how to solve it

MyLacrosse avatar Jul 26 '22 10:07 MyLacrosse

Hi, I managed to solve my "Internal JSON RPC" problem.

  1. Deletes Metamask's Optimism network.
  2. I added the Optimism network over Optimism's Etherscan. Note: The Chainlist was giving an RPC error when adding the new network.
  3. I did the SNX split transaction, because when I tried to make the maximum number of SNX tokens, the RPC error persisted.

I hope it helped you.

fcofilhoeth avatar Jan 19 '23 11:01 fcofilhoeth