Unknown error: "Internal JSON-RPC error.". Try increasing your slippage tolerance.
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 5.5k
- Forks
- 5.4k
- PR merge metrics
- No merged PRs in 30d
Description
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
- Go to https://app.uniswap.org
- Switch your network to Optimistic Ethereum
- Try swapping any token.
- Click the Swap button.
- Click Confirm Swap.
- Reject the transaction in MetaMask.
- 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.
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.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by following the reproduction steps in the Uniswap interface at app.uniswap.org on Optimistic Ethereum, focusing on the swap confirmation flow after rejecting a MetaMask transaction. Trace where the JSON-RPC error and slippage message are produced. Done means repeated rejected swaps return to the expected confirmation state without showing the misleading error.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- blockchain, frontend
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 30/100