connection.connector.getChainId is not a function #4216
Replies: 11 comments 9 replies
-
we are also running into this @Sahitya777 ... looks like a bug. did you create an issue in the wagmi repo? i'd like to upvote it if it's there... thanks. |
Beta Was this translation helpful? Give feedback.
-
hey i am also the same issues like r.connector.getChainId is not function |
Beta Was this translation helpful? Give feedback.
-
++++ having same issues as well! |
Beta Was this translation helpful? Give feedback.
-
Same issue :( |
Beta Was this translation helpful? Give feedback.
-
same issue |
Beta Was this translation helpful? Give feedback.
-
Has anyone been able to resolve this? @Sahitya777 |
Beta Was this translation helpful? Give feedback.
-
It seems to come from when there is a divergence between the config used by the Wagmi wrapper component, and the config used by transactions (readContract, writeContract). |
Beta Was this translation helpful? Give feedback.
-
I had this issue but it seems to be due to the browser wallet silently signing me out of my account, not a wagmi misconfiguration. Once the sign out happens, wagmi starts throwing this error. I suspect that metamask just changed their sign-out delay and now this is happening to many users. |
Beta Was this translation helpful? Give feedback.
-
I had the same error and I solved it with the following code:
U have to wait until connection will be ready in order to sign messages or use custom hooks |
Beta Was this translation helpful? Give feedback.
-
For me, the wagmi config used to be inside the provider component. Moving it outside fixed this |
Beta Was this translation helpful? Give feedback.
-
any update? |
Beta Was this translation helpful? Give feedback.
-
So the issue is that I have one base route in my application as /v1 where I have a modal for wallet connects and when the user connects the wallet I send him to other route like /home where the wallet stays connected by connectWagmi({ connector:wagmiConnectors[0] })
But the thing is If i refresh the page the write calls start to fail and give error of connection.connector.getChainId is not a function Idk why it is happening
This is my config
const config = createConfig(
getDefaultConfig({
// Your dApps chains
chains: [baseSepolia],
transports: {
// RPC URL for each chain
[baseSepolia.id]: http(
),
},
);
Beta Was this translation helpful? Give feedback.
All reactions