Error user not found
"Actually, I am working on a project using Clerk for authentication and Convex for the database. However, the second user is not added in Convex, but it is updated in Clerk. Can you provide a solution for this?"
29 Replies
Been trying to resolve this for weeks. I am sure your webhook did not work too
just getting this error buddy
Yeah same error, even from my students. so know this is not just you. Some of my students have submitted their project but went blank too.
Just to let you know you are not the only one
oh ok
I'm sure you followed the docs too.
not truly followed just doing a project with the help of youtube
You are welcome to send a DM if you need help
https://github.com/Pavan3411/VoiceCast actually i stuck in the project because of user not inserting in convex database
GitHub
GitHub - Pavan3411/VoiceCast: Podcast Platform - VoiceCast A podcas...
Podcast Platform - VoiceCast A podcasting platform featuring text-to-voice technology and AI-generated podcast thumbnails. Next.jsConvexClerkOpenAi - Pavan3411/VoiceCast
Did you guys add auth loading component?
For reference you can check out saas template from the convex website
Hi i'm actually having the same error!
a small difference is, I can still connect to clerk if I use older version of my code
but when I backtrack my code, I don't find anything that should interfere with clerk connection
thank you for sharing the repo. I cloned the repo and connected it to Clerk and it works for me.
things to check, based on details from the other thread:
- the URL for the clerk webhook should be the HTTP actions URL (from the convex dashboard DEV deployment settings) with a
/clerk
at the end (not /clerk-users-webhook
)
- it only works for me if I log in with an identity provider like Google. If I log in with an email, then I do not have a first name so the webhook throws an error. To fix, you have a few options but one it to change this line
https://github.com/Pavan3411/VoiceCast/blob/18d5546c9ee385efc97fe870842a8a2089338e7e/convex/http.ts#L23
from name: event.data.first_name!
to name: event.data.first_name ?? ""
GitHub
VoiceCast/convex/http.ts at 18d5546c9ee385efc97fe870842a8a2089338e7...
Podcast Platform - VoiceCast A podcasting platform featuring text-to-voice technology and AI-generated podcast thumbnails. Next.jsConvexClerkOpenAi - Pavan3411/VoiceCast
follow up question: is this code based on some doc or tutorial? we would like to fix issues at the source, so others don't run into the same issues.
any browser extension that's not doing what it should?
maybe you can go into icongnito if you not already did it
One User is also added in convex but after that no users are getting added in convex but in clerk it works well
doesn't work in incognito as well
tutorial
which tutorial? convex has a few, clerk has one, and there are some on youtube.
i can't think of why the first user would succeed but subsequent ones would fail. that's not happening for me (running your code unchanged)
next step for debugging would be to check the clerk webhook status, and if any are failed look at the attempts
(this is a screenshot of the error when i tried to log in without a first name)
i get this error and from this youtube i am learning https://youtu.be/zfAb95tJvZQ?si=GsIzk4tuyFt3svRx
JavaScript Mastery
YouTube
Build and Deploy a Saas Podcast Platform in Next.js
Build a unique Software-as-a-Service app with AI-powered features like text-to-multiple-voices functionality and AI-generated images with Next.js 14 and Convex.
โญ Convex - https://convex.dev/c/jsmastery
๐ Clerk - https://go.clerk.com/VFH8CMR
๐จ AI Podcast App Figma Design - https://resource.jsmastery.pro/ai-podcast-app
๐ Ultimate ChatGPT Handbo...
Cool can you click on the failure, scroll down to "webhook attempts", and click on the failure to see the error message
that's the request. can you scroll further down to the response
thanks for linking the youtube video. i've filed https://github.com/adrianhajdin/podcastr/issues/6 for the first_name issue
GitHub
Login with email causes webhook error ยท Issue #6 ยท adrianhajdin/pod...
When I log in with an email, not with Google, I do not have a first name, so the webhook throws this error: which is because of the exclamation point on this line: podcastr/convex/http.ts Line 23 i...
great! did you see the second bullet point in https://discord.com/channels/1019350475847499849/1250466647412834405/1250808939734503556
that's the error you're hitting
ya just checking it. Thanks for support
Thank you very much, Mr. Lee. Your help enabled me to resolve the persistent error.