Skip to content
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] Siwe with Next JS throws error on pressing sign button #395

Open
Suhel-Kap opened this issue Jun 7, 2024 · 6 comments
Open

[BUG] Siwe with Next JS throws error on pressing sign button #395

Suhel-Kap opened this issue Jun 7, 2024 · 6 comments
Labels
bug Something isn't working

Comments

@Suhel-Kap
Copy link

Describe the bug

As soon as I press the sign button on the modal, i get the error saying

Error: Objects are not valid as a React child (found: Error: Failed to fetch SIWE session). If you meant to render a collection of children, use an array instead.
    at mapIntoArray (react.development.js:1967:13)
    at mapChildren (react.development.js:1996:3)
    at Object.toArray (react.development.js:2048:10)
    at flattenChildren (index.es.js:356:71)
    at Button (index.es.js:4742:11)
    at renderWithHooks (react-dom.development.js:11121:18)
    at updateFunctionComponent (react-dom.development.js:16290:20)
    at beginWork$1 (react-dom.development.js:18472:16)
    at beginWork (react-dom.development.js:26927:14)
    at performUnitOfWork (react-dom.development.js:25748:12)
    at workLoopSync (react-dom.development.js:25464:5)
    at renderRootSync (react-dom.development.js:25419:7)
    at recoverFromConcurrentError (react-dom.development.js:24597:20)
    at performSyncWorkOnRoot (react-dom.development.js:24899:20)
    at flushSyncWorkAcrossRoots_impl (react-dom.development.js:7758:13)
    at flushSyncWorkOnAllRoots (react-dom.development.js:7718:3)
    at processRootScheduleInMicrotask (react-dom.development.js:7863:3)
    at eval (react-dom.development.js:8034:7) 

To reproduce

Clone the repo https://github.com/Suhel-Kap/token-swaps/tree/connect-kit-siwe and switch to the connect-kit-siwe branch and run yarn and yarn dev.

Screenshots

If applicable, add screenshots to help explain your problem.

Environment details

    "@tanstack/react-query": "^5.40.1",
    "class-variance-authority": "^0.7.0",
    "client-only": "^0.0.1",
    "connectkit": "^1.8.0",
    "connectkit-next-siwe": "^0.3.0",
    "next": "14.2.3",
    "react": "^18",
    "react-dom": "^18",
    "viem": ">=2.13.3",
    "wagmi": "^2.9.10"
@Suhel-Kap Suhel-Kap added the bug Something isn't working label Jun 7, 2024
@Suhel-Kap
Copy link
Author

Another error which is thrown at times is

NotFoundError: Failed to execute 'removeChild' on 'Node': The node to be removed is not a child of this node.

Call Stack
eval
node_modules/connectkit/build/index.es.js (9414:1)

@petermazzocco
Copy link

Anyone find a solution for this? @Suhel-Kap

@Suhel-Kap
Copy link
Author

Switching to rainbow kit worked for me 🤓☝🏻

@petermazzocco
Copy link

Hoping they get this resolved but it looks like I might have to switch to rainbowkit as well

@sowedoO
Copy link

sowedoO commented Aug 14, 2024

facing the same issue, any fix out yet?

@petermazzocco
Copy link

facing the same issue, any fix out yet?

Ended up switching to RainbowKit

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants