[BUG] ConnectKit failing requests to Alchemy even though I am using Infura
See original GitHub issueDescribe the bug
I am using ConnectKit with Infura and until recently my website was working fine but now it fails to connect with a bunch of errors to Alchemy in the console.
To reproduce
I am using the following code to connect with ConnectKit:
import {
WagmiConfig,
createClient,
useContractRead,
chain } from "wagmi";
import { ConnectKitProvider, getDefaultClient } from "connectkit";
const contractConfig = {
addressOrName: contractAddress,
contractInterface: abiFile,
};
const client = createClient(
getDefaultClient({
appName: "Chublins",
infuraId: process.env.INFURA_ID,
chains: [chain.mainnet]
}),
);
You can see the full source code of my website here: https://github.com/Montoya/chublins-website/tree/master
The page that used to work fine but now fails is here: https://chublins.com/view
Expected behavior
The view page should load without issues and allow you to enter an ID to view.
Screenshots
Environment details
Latest Google Chrome on MacOS
Additional context
Like I said, this was working fine and then stopped working a couple weeks ago without any code changes.
Issue Analytics
- State:
- Created a year ago
- Comments:16 (6 by maintainers)
Top Results From Across the Web
[BUG] connectkit (wagmi) is spamming alchemy #33 - GitHub
If your Infura/Alchemy key has not been passed through to the ... [BUG] ConnectKit failing requests to Alchemy even though I am using...
Read more >Error Reference - Alchemy Docs
This generally means the transaction already posted and is on the node in a pending state. Sometimes this error occurs when transactions fail...
Read more >Request failed or timed out - Questions - Infura Community
Hi, I am new to Infura and was trying to send requests with curl. ... fails with the message “{“jsonrpc”:“2.0”,“id”:1,“error…
Read more >ethers.js - Use EthersJS to connect to either Alchemy or Infura ...
But I've recently discovered that my app was failing to an internal Alchemy server error, even though Infura seemed to be available at...
Read more >CPY Document - Federal Trade Commission
of insurance" was next taken up by the Supreme Court in ... In other words even though the Connecticut Insurance Department was convinced...
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
Left a big writeup on fixes, debugging and reasons for this issue over in https://github.com/family/connectkit/issues/33#issuecomment-1308935780
@Montoya You can check your clients provider configurations by using the
useProvider
hook and looking at theproviderConfigs
array to see what configured providers are going to be used. But you can’t see which one is currently being targeted.I’ve talked with the people over at wagmi about it and there isn’t an easy way to check which provider is currently being targeted due to a limitation with the ethers library. If you feel the need to have this available you can always raise a discussion in the wagmi repo and see where things go from there.
I hope this helps resolve everything! I’m going to close this issue now but if anyone else is still having problems feel free to open your own tickets. 😄