How to fetch data in Nextjs SSC using Convex ?
please help me solve the following error when attempting to fetch data in SSC using fetchQuery or any other functions. It is throwing me the following error, shown in the image. I tried to go through the Convex docs and other resources provided by Convex https://github.com/get-convex/template-nextjs/blob/main/app/server/page.tsx example preloaded Functions, and tried to change the provider configuration also, but it was of no use please help me resolve how to fetch Convex data in SSC
GitHub
template-nextjs/app/server/page.tsx at main · get-convex/template-...
Contribute to get-convex/template-nextjs development by creating an account on GitHub.

9 Replies
@moderators please help me in resolving the issue
Do not ping mods for support tickets, the ping is to help catch spammers, be patient you'll get someone replying to your thread soon! @Shyam sai teja
SO, Looking at the code here, this seems to be a problem with clerk which you haven't sent the code for, I ran the template and its working fine for me, can you share the snippit that actually caused this error to happen?
and make sure that:
- You have ran
pnpm i/ npm i
- ran pnpm dlx convex dev
and made sure that the project is setup correctly on your end
- you updated your enviroment variables to match the client and convex's deployment
Please ask better questions next time, help us to help you 😅ok, it's not about the template; the template will run fine. Can you please run the following repo and figure out the issue
https://github.com/Shyamsaitejamandibi/clone-t3
The issue is coming with this repo if I try to use preload or fetchquery, and for more information, I can share the terminal error, as one example is [cause]: [AggregateError: ] { code: 'ETIMEDOUT' } in convex.
If you want env variables, I can provide them if you dm me
GitHub
GitHub - Shyamsaitejamandibi/clone-t3
Contribute to Shyamsaitejamandibi/clone-t3 development by creating an account on GitHub.
nope, sorry can't do. please share the minimalist code snippit that caused the problem
or share the code lines from that repo
ok ill prepare a template where it will cause an error using in SSC and send it to you. Please give me some time, Sara
Kindly share it here. do not DM me
ok, sure, can I mention you will return?
no, cause I will check it when I can!
ok thank you