Open giannis198 opened 1 year ago
same goes for me. still finding the answer
for me i didnt add profile photo so it threw error add profile photo might solve issue
for me, i put some extra white space in my environment vairable
From: roshinys @.> Sent: Tuesday, August 15, 2023 3:30 PM To: adrianhajdin/threads @.> Cc: TariQMah @.>; Comment @.> Subject: Re: [adrianhajdin/threads] Failed to create communities inside the MongoDB (Issue #48)
for me i didnt add profile photo so it threw error add profile photo might solve issue
— Reply to this email directly, view it on GitHubhttps://github.com/adrianhajdin/threads/issues/48#issuecomment-1678727163, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AFBJKJXDGQJGI36CFPWBSJTXVNFTTANCNFSM6AAAAAA3O2STNE. You are receiving this because you commented.Message ID: @.***>
Do you guys got any solution???
i believe something is wrong with the code in app/api/webhook/clerk/route.ts file
1.) Just copy and paste the code from https://github.com/adrianhajdin/threads/blob/main/app/api/webhook/clerk/route.ts to your route.ts file. (Make sure DON'T formatting the code)
2.) Log in to your Clerk account and check your Clerk's endpoint is pointing to your Vercel URL. Example: https://threads-app-nextjs-xxxxx.vercel.app/api/webhook/clerk
3.) Remember to Update NEXT_CLERK_WEBHOOK_SECRET in your env file and environment variables on the Vercel.
4.) Push your latest code to GitHub and Redeploy to Vercel.
5.) PATIENCE and wait until the deployment is complete.
6.) Create an organization for testing.
You also can go to Clerk's dashboard > Webhooks > Logs > organizationMembership.created and check the Webhook Attempts. Inside there has our server's response. (May help you debugging) If Succeeded, your communities data will be stored in your MongoDB.
1.) Just copy and paste the code from https://github.com/adrianhajdin/threads/blob/main/app/api/webhook/clerk/route.ts to your route.ts file. (Make sure DON'T formatting the code)
2.) Log in to your Clerk account and check your Clerk's endpoint is pointing to your Vercel URL. Example: https://threads-app-nextjs-xxxxx.vercel.app/api/webhook/clerk
3.) Remember to Update NEXT_CLERK_WEBHOOK_SECRET in your env file and environment variables on the Vercel.
4.) Push your latest code to GitHub and Redeploy to Vercel.
5.) PATIENCE and wait until the deployment is complete.
6.) Create an organization for testing.
You also can go to Clerk's dashboard > Webhooks > Logs > organizationMembership.created and check the Webhook Attempts. Inside there has our server's response. (May help you debugging) If Succeeded, your communities data will be stored in your MongoDB.
Inside Webhooks > Logs its showing organization.created but in mongoDB it is not reflecting. I have added both screenshots
@kashanhz999 Click the organizationMembership.created to check.
@lamfeng how did u successfully deploy in vercel? i could not and now am stuck
@lamfeng I'm getting response code 200
@kashanhz999 1.) Your endpoints should be "https://threads-kh.vercel.app/api/webhook/clerk", Not "https://threads-kh.vercel.app"
2.) After update the endpoints, You also need update the new (Signing Secret) to NEXT_CLERK_WEBHOOK_SECRET in your env file and environment variables on the Vercel.
3.) Redeploy to your project on Vercel and wait until deployment is complete.
4.) Try create an organization again.
@Op-Pautu Based on the YouTube Tutorial: https://youtu.be/O5cmLDVTgAs?t=18332 Instructor also failed deploy at the first time due to have some build errors.
1.) You need update the configuration in your next.config.js. typescript: { ignoreBuildErrors: true, },
2.) git push to your Github and redeploy again.
@lamfeng
@kashanhz999 Double check your environment variable NEXT_CLERK_WEBHOOK_SECRET on Vercel. It must be same with Clerk's Signing Secret. After update the environment variable, remember to Redeploy again.
@lamfeng Thank you so much. It successfully solved the issue.
i was facing the same error so i followed the same things you mentioned above but still new orginizition is not showing in database
@NandiniBure After you updated your endpoint to something like "https://threads-kh.vercel.app/api/webhook/clerk" from "https://threads-kh.vercel.app/" have you updated your NEXT_CLERK_WEBHOOK_SECRET ??
yes and also redeployed
Could you clarify if you are trying to create communities from "http://localhost:3000/" ??
yes
Try creating communities from the deployed url
i tried but still not working
what is the status response code now??
i was facing the same error so i followed the same things you mentioned above but still new orginizition is not showing in database
same 500
what is your webhook end point ?
I have cloned your repository and it is working fine with me so I guess there might be some errors with your ".env.local" file or web-hook endpoints.
yeah its working now.... I created a new project in vercel maybe i was doing something wrong earlier Thank You
The clerk will make api calls to the Deployed version and not your local. If you make any changes to your local files (if you are following the tutorial, you might have to copy/paste some of the action files and the route file), make sure to deploy these changes. Also double check your local and production env variable for clerk and you're golden!
In the deployed code from YouTube tutorial Adrian must made changes in other files in 05:20:00 besides user.actions.ts and community.actions.ts because i found many differences from the main code.i will try to define them and i will inform you
Hey I have done the above stuffs but still it gives me an error of 405
@kashanhz999 @lamfeng please help me out in this
1.) Just copy and paste the code from https://github.com/adrianhajdin/threads/blob/main/app/api/webhook/clerk/route.ts to your route.ts file. (Make sure DON'T formatting the code)
2.) Log in to your Clerk account and check your Clerk's endpoint is pointing to your Vercel URL. Example: https://threads-app-nextjs-xxxxx.vercel.app/api/webhook/clerk
3.) Remember to Update NEXT_CLERK_WEBHOOK_SECRET in your env file and environment variables on the Vercel.
4.) Push your latest code to GitHub and Redeploy to Vercel.
5.) PATIENCE and wait until the deployment is complete.
6.) Create an organization for testing.
You also can go to Clerk's dashboard > Webhooks > Logs > organizationMembership.created and check the Webhook Attempts. Inside there has our server's response. (May help you debugging) If Succeeded, your communities data will be stored in your MongoDB.
@lamfeng Thank you soooooo much!! I've been stuck where the date and community won't render in the thread post. Turns out I need to push the latest code to Github and redploy as you suggested. Thank youuuuuuuuuuu!!
@kashanhz999 @lamfeng please help me out in this
Sorry for disturbing, the error got fixed, I just forgot to add the clerk folder lol🤣
can somone help me with this error
can somone help me with this error
hey bro, after spending 3 days debuggin I solved the issue
import { authMiddleware } from '@clerk/nextjs/server';
export default authMiddleware({ publicRoutes: ["/api/webhook/clerk"], ignoredRoutes: ["/((?!api|trpc))(_next.*|.+.[\w]+$)", "/api/webhook/clerk"] })
// Stop Middleware running on static files export const config = { matcher: ['/((?!.+\.[\w]+$|_next).)', '/', '/(api|trpc)(.)'], };
you need to modify authMiddleware like my code above, the message "string src property..." is caused by blocked authMiddleware, I figured it out after finding an error message at runtime in logs at vercel deployment
Hi guys, almost finished the course but stuck at this problem. I did everything exactly as it is supposed to be done still no data shown on my website or in the database. here is my repo: https://github.com/vusal5555/ThreadWeave
Hello, My date, time and community won't render on my deployed website and also the community doesn't render into mongoDB but my clerk showed logs of the community being created but it won't show up on the website. I have tried all of the suggestions above but they do not work for me! Can anyone help Please? Here is the link to my repo: https://github.com/srp8/Dr.eam
The Communities are not stored in my db after creating them