-
Notifications
You must be signed in to change notification settings - Fork 5k
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]: 429 error on Base. Extension not using supplied rpc api #27099
Comments
Alternatively, maybe if the dapp provided custom fee values, estimation shouldn't throw the error and prevent user from submitting the transaction? |
Hi @Yuripetusko Thank you for bringing this to our attention. Our product team will look into this and provide comments. |
Updating with some context: As i've been told now, it is normal that wallets don't use the rpc configured by the dapp. So in this case the issue here is that Metamask throws an error for something I didn't ask for and have no control over (gas fee price estimations) and this fails the whole transaction. The 429 should either be handled more gracefully or Metamask should provide a way to opt out of gas fee fetching if I provide it myself |
i have the error in edge and my friend in chrome, Both in windows. I think that can be general error |
Still puzzeled that there are not many reports besides mine since we are getting ~100 sentry error instances per day with this error |
Base team has adjusted rate limits on their side to minimize this issue. Did it improve the issue on your side, @Yuripetusko ? |
24 Errors already in the last 5 hours |
I still think that since I am explicitly passing these gas fields
metamask shouldn't throw an error when estimating gas. And even if I wasn't providing these fields, I think Metamask should have some fallback defaults to use instead of failing and throwing an error to user, even if these defaults are heavily cached and could be outdated. Why not use some centralised api instead to get latest prices and then fetch from it instead of using rpc here. Or perhaps Metamask can somehow get the rpc that was configured with the connector on the dapp? |
Ok while debugging this I discovered something that might help you pin down the issue. The 429 always happens immediatly after extension pop-up opens. Once it gets the first gas estimateion response back, from there on it seems to be ok. So it leads me to believe that there's a bug on metamask where it does particulary large number of requests when it just opens up. May or may not be due to some unhandled infinite loop (I haven't looked into MM code that closely). I am uploading a video right now where you can see that 429 always happens immediatly after popup opens. And the error is thrown usually if you click Sign as quickly as possible Here's a long and boring video: https://youtu.be/PdJKH8Yqhmo And here's a short video of the moment the error happens and causes tx to fail: |
@MetaMask/metamask-assets and @MetaMask/wallet-framework this seems to be a broader issue within the wallet and not just Confirmations. In the mean time @Yuripetusko does the issue still exist with other public providers? You can more base public providers here. |
It still happens a lot. ~30 errors in our sentry for yesterday. ~15 today. What do you want me to try with the link you sent? Change base public provider in metamask settings? I can do as a test, but this wouldn't be a feasable option to tell to all of our users |
will try to reproduce with other providers, but yeah, if you inspect extension, it does a lot of calls as it listens to new blocks and then does 3 - 5 requests on each new block to estimate gas (low, medium, aggressive). And since blocktime on base is so short, there are a lot of calls |
Tried with 2 different public rpcs and it didn't happen yet, but it's understandable if it's not set as a default rpc for base in everyone's metamask's. But also it doesn't happen every single time with base.org rpc. So will try few more times today |
We're having this too with Superfluid Dapps. Superfluid Dapps are probably a bit more susceptible to run into this issue because of its rather complex transactions. But the problem seems to be a general one. This is considerably harming the UX of Dapps. The only viable mitigation from our side I can currently see is to switch to EIP-712 and meta-transactions, so that we can avoid using the wallet RPC at all. We already don't use the wallet RPC for anything but transaction broadcast. Given my superficial understanding of what MM does under the hood, a few suggestions:
PS: I noticed that when requests fail internally (the http envelope being 200, but the RPC returning an error code), the transaction doesn't fail. Instead MM just shows the estimated changes as failed. |
Describe the bug
When using wagmi with configured private rpc api url and metamask connector, metamask still uses default rpc (perhaps for quering gasFee estimation or doing eth_call simulation), which often leads to 429 error. Shouldn't Metamask use the supplied rpc api here somehow to avoid that?
Expected behavior
Metamask to use supplied rpc api for fee estimation, or handle 429 errors better
Screenshots/Recordings
Steps to reproduce
Hard to have consistent reproduction as it is dependant on public base (mainner.base.org) rpc requests load.
transports
objectwriteContract
and then open dev console of the metamask extensionError messages or log output
Detection stage
In production (default)
Version
12.1.3
Build type
None
Browser
Brave, Other (please elaborate in the "Additional Context" section)
Operating system
MacOS
Hardware wallet
No response
Additional context
Both Brave and Arc browsers (both latest chromium)
Severity
The text was updated successfully, but these errors were encountered: