-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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] Unhandled Promise Rejection on getSupportedNetworks #3896
Comments
Hello, is there any update on a fix for this or a way of avoiding it in the meantime? |
we had to go back to web3modal :/ until this issue is fixed appkit is unusable with SSR |
Looks like a fix was pushed but im still getting this on 1.6.9 (newest version) Unhandled Rejection: TypeError: fetch failed |
@xyzseer we will shortly be working on SSR improvements |
Link to minimal reproducible example
N / A
Summary
Hi, we have a vite app with SSR enabled, and we are seeing this error on the logs
Feb 21, 07:11:58 AM: 721e05e3 ERROR Unhandled Promise Rejection {"errorType":"Runtime.UnhandledPromiseRejection","errorMessage":"TypeError: fetch failed","reason":{"errorType":"TypeError","errorMessage":"fetch failed","stack":["TypeError: fetch failed"," at node:internal/deps/undici/undici:13185:13"," at process.processTicksAndRejections (node:internal/process/task_queues:95:5)"," at async fetchData (file:///var/task/node_modules/@reown/appkit-core/dist/esm/src/utils/FetchUtil.js:2:22)"," at async Proxy.get (file:///var/task/node_modules/@reown/appkit-core/dist/esm/src/utils/FetchUtil.js:20:26)"," at async Object.getSupportedNetworks (file:///var/task/node_modules/@reown/appkit-core/dist/esm/src/controllers/BlockchainApiController.js:110:33)"," at async AppKit.initializeBlockchainApiController (file:///var/task/web/node_modules/@reown/appkit/dist/esm/src/client.js:507:9)"]},"promise":{},"stack":["Runtime.UnhandledPromiseRejection: TypeError: fetch failed"," at process.<anonymous> (file:///var/runtime/index.mjs:1276:17)"," at process.emit (node:events:519:28)"," at emitUnhandledRejection (node:internal/process/promises:250:13)"," at throwUnhandledRejectionsMode (node:internal/process/promises:385:19)"," at processPromiseRejections (node:internal/process/promises:470:17)"," at process.processTicksAndRejections (node:internal/process/task_queues:96:32)"]}
I think the request made by
getSupportedNetworks
fails and as it happens on the server it completely kills the webpageIs there any way to fix it? I saw a PR that deferred the call (#3810), maybe something like that should work?
Thanks!
List of related npm package versions
Node.js Version
20.18.0
Package Manager
yarn
The text was updated successfully, but these errors were encountered: