#clerk webhook error
52 messages · Page 1 of 1 (latest)
I think we're having the same error
If you take a look at your vercel dashboard logs you should see whether the webhook was successfull there also, and you'll also see a message saying that the route is blocked by middleware -- atleast that's the issue in my case...
which leads me to the next problem, it seems that i'm already allowing the webhook:
import { authMiddleware } from '@clerk/nextjs';
export default authMiddleware({
publicRoutes: ['/', '/api/webhooks/clerk', '/api/webhooks/stripe'],
});
export const config = {
matcher: ['/((?!.+\\.[\\w]+$|_next).*)', '/', '/(api|trpc)(.*)'],
};
I think my route structure is correct as well...
curious to see if you're having the same issues.
I think i found my issue in the logs looks like i misspelled webhooks:
yes i am facing the same issue file naming is correct still having issues
tell me if you find the solution
yea for me i spelled webhooks wrong when i entered the api url in the clerk dashboard — so clerk was hitting the wrong endpoint
this isn’t an error, its just a clerk warning saying that your / route is protected
and it gives instructions on how to unprotect it if you want.
i see
Double check your clerk dashboard and make sure the api url is actually api/webhooks/clerk
can you share your vercel logs and a screenshot of both your clerk endpoint config and your file structure. Those are the things to rule out first.
okay wait a sec
np take your time
tell me the solution
that tells us that your clerk webhook url is correct.
In your case it looks like your mongodb connection string is not valid - did u add your password when you pasted the string into your .env.local?
let me know if that works
did u restart the dev server? also check the vercel logs again and see if there are any additional errors
One of the errors in your logs above also says your mongodb string doesnt start properly
Does that still show up after u added the password?
yes i restarted th dev means i tried after sometime still getiing that error
what do your vercel logs say?
wait i'' share it
cool and did u double check the connection string it says it should start with mongodb://
not sure if this matters but mine has an appName appended to the end:
i have copied the url itself from mongdb website
thats the only difference I can see
i''' check with the new url and will update you
Error gone with new url thanks Gaurang
I’m having issues with the user data saving in my mongo db database
I’ve added the my db uri to the env, the event category saves but user data doesn’t
I aslo have this error after trying to create an event
ERROR
POST https://e-sync.vercel.app/events/create 500 (Internal Server Error)
333-51d75ad37095335f.js:1 Error: An error occurred in the Server Components render. The specific message is omitted in production builds to avoid leaking sensitive details. A digest property is included on this error instance which may provide additional details about the nature of the error.
Note: this is my vercel production url https://e-sync.vercel.app/
hey i believe this is an entirely different error
This error shows when i try to create an event
yea i thunk youre a bit farther along than we were…
will let u know when i come across it in the video
In my debugging i found out that if the user data is not in the mongo db I can’t create an event
yea Im not sure cus I havent gotten that far, but if an event belongs to a user, then that would make sense.
Yes, the user is the organizer. Each event created belongs to the user that creates it
Which project is this for? Is this for the AI Saas app?
noo the event project Js Mastery posted