pavan
pavanโ€ข7mo ago

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
ZubbyZubbyZoo
ZubbyZubbyZooโ€ข7mo ago
Been trying to resolve this for weeks. I am sure your webhook did not work too
pavan
pavanOPโ€ข7mo ago
just getting this error buddy
No description
ZubbyZubbyZoo
ZubbyZubbyZooโ€ข7mo ago
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
pavan
pavanOPโ€ข7mo ago
oh ok
ZubbyZubbyZoo
ZubbyZubbyZooโ€ข7mo ago
I'm sure you followed the docs too.
pavan
pavanOPโ€ข7mo ago
not truly followed just doing a project with the help of youtube
ZubbyZubbyZoo
ZubbyZubbyZooโ€ข7mo ago
You are welcome to send a DM if you need help
pavan
pavanOPโ€ข7mo ago
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
Abhishek
Abhishekโ€ข7mo ago
Did you guys add auth loading component? For reference you can check out saas template from the convex website
No.one
No.oneโ€ข7mo ago
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
lee
leeโ€ข7mo ago
thank you for sharing the repo. I cloned the repo and connected it to Clerk and it works for me.
No description
lee
leeโ€ข7mo ago
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
lee
leeโ€ข7mo ago
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.
FleetAdmiralJakob ๐Ÿ—• ๐Ÿ—— ๐Ÿ—™
any browser extension that's not doing what it should? maybe you can go into icongnito if you not already did it
pavan
pavanOPโ€ข7mo ago
One User is also added in convex but after that no users are getting added in convex but in clerk it works well
No description
No description
pavan
pavanOPโ€ข7mo ago
doesn't work in incognito as well tutorial
lee
leeโ€ข7mo ago
which tutorial? convex has a few, clerk has one, and there are some on youtube.
lee
leeโ€ข7mo ago
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)
No description
lee
leeโ€ข7mo ago
next step for debugging would be to check the clerk webhook status, and if any are failed look at the attempts
No description
lee
leeโ€ข7mo ago
(this is a screenshot of the error when i tried to log in without a first name)
No description
pavan
pavanOPโ€ข7mo ago
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...
No description
lee
leeโ€ข7mo ago
Cool can you click on the failure, scroll down to "webhook attempts", and click on the failure to see the error message
pavan
pavanOPโ€ข7mo ago
No description
No description
lee
leeโ€ข7mo ago
that's the request. can you scroll further down to the response
lee
leeโ€ข7mo ago
lee
leeโ€ข7mo ago
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...
pavan
pavanOPโ€ข7mo ago
No description
lee
leeโ€ข7mo ago
great! did you see the second bullet point in https://discord.com/channels/1019350475847499849/1250466647412834405/1250808939734503556 that's the error you're hitting
pavan
pavanOPโ€ข7mo ago
ya just checking it. Thanks for support Thank you very much, Mr. Lee. Your help enabled me to resolve the persistent error.

Did you find this page helpful?