[bug] ConnectorNotFoundError triggered when query params are present or when navigating in Nextjs app
See original GitHub issueIs there an existing issue for this?
- I have searched the existing issues
Package Version
0.4.12
Current Behavior
When opening a nextjs page with any query params in the url, or when navigating to other pages using Next/link, connector is undefined
and signer is null
.
This leads to bugs when trying to connect wallet (in my case RainbowKit popup getting stuck on “waiting for connection”, or triggering ConnectorAlreadyConnectedError
) as well as impossibility to sign messages via useSignMessage
.
Same behaviour as #546, so the issues are probably related
Expected Behavior
Navigating through pages or adding query params shouldn’t influence connector or signer
Steps To Reproduce
- Go on this page https://wagmi-connector-debug.vercel.app/?asd=123
- Verify that connecting and signing message will not work due to query param
Same behaviour can be triggered by going to https://wagmi-connector-debug.vercel.app/ and then navigating to the secondary page
Link to Minimal Reproducible Example (CodeSandbox, StackBlitz, etc.)
Repo: https://github.com/jjranalli/wagmi-connector-debug
Deployment link: https://wagmi-connector-debug.vercel.app/
Anything else?
Issue Analytics
- State:
- Created a year ago
- Comments:5 (2 by maintainers)
Top GitHub Comments
Yes that doesn’t seem to work, also I’m calling
createClient
in the global scope.Will provide a repo soon and reopen the issue, thanks.
oh 🤦♂️ that fixed it. Apologies for opening the issue and thanks for catching that!