[BUG] connectkit (wagmi) is spamming alchemy
See original GitHub issueconnectkit is sending so many requests to alchemy that it sometimes exceeds concurrent requests limit.
You can easily recreate this by going into https://docs.family.co/connectkit/try-it-out
and clicking connect, and going in and out of modals several times.
{"jsonrpc":"2.0","id":42,"error":{"code":429,"message":"Your app has exceeded its concurrent requests capacity. If you have retries enabled, you can safely ignore this message. If not, check out https://docs.alchemyapi.io/documentation/rate-limits. Reach out to us if you'd like to increase your limits: https://dashboard.alchemyapi.io/support"}}
Issue Analytics
- State:
- Created a year ago
- Comments:16 (4 by maintainers)
Top Results From Across the Web
Error Reference - Alchemy Docs
Error Reference. Learn about the standard JSON-RPC error codes and Alchemy's custom error codes. HTTP Status ...
Read more >wagmi-dev.eth (@wagmi_sh) / Twitter
PSA: Someone is sending spam to wagmi contributors. Stay vigilant out there!
Read more >Configuring Chains - wagmi
The configureChains function allows you to configure your chains with providers such as: Alchemy, Infura, or something else. This means you don't need...
Read more >MOHAWK PUNK - Untitled Collection #189689006 | OpenSea
... arizona arkansas california colorado connecticut delaware florida georgia ... addams ahs alchemy alec baldwin angel angry apocalypse arcade astrology ...
Read more >Main Categories - Underup
... Jumia Store Nigeria || Fashion · Defi Spammer Announcement · Kaiiax ... Amp · Fullmetal alchemist |...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Hey everyone, I have some answers that will hopefully provide some help:
Solutions
NEXT_PUBLIC_
prefix, while create-react-app requires theREACT_APP_
prefix), you can test byconsole.log
ing out your env variables to double check that it’s being returned correctly.localhost
!)Why the 429 error
If your Infura/Alchemy key has not been passed through to the
WagmiClient
(or ourgetDefaultClient
) correctly then wagmi will fall back to an Alchemy provider that uses a shared public API key, in which has been severly rate limited (the 429 error).If you have updated to wagmi
0.7.x
you may have noticed the 429 errors going away. The reason behind this is because this version of wagmi uses a different fallback API key, which although is also rate limited, not as many projects are using this version of wagmi – so at this point in time the new public wagmi key succeeds more often than the older version.Why the spamming
When Alchemy fails to receive data (i.e the 429 error) it has an auto-retry method baked into it. This auto-retry pings the API a few times a second until it receives data, which explains the spamming. A valid API key supplied to the client configuration will stop this issue.
Further debugging
You can check your apps client configurations by using the useProvider hook and looking at the
providerConfigs
array to see what configured providers are available.If you don’t see your provider and API key in here then there may be a different issue with your client configuration. Feel free to open a ticket if this occurs.
I hope this helps resolve everyones issues. There’s also some conversations relating to this issue in https://github.com/family/connectkit/issues/36 if anyone else wants some further reading.
hi @jterskine doing this configuration