URGENT: Vercel Environment Variable Update Required
Current Production Error
The production site at https://do.dev is experiencing a 500 error when trying to sync users:
POST https://do.dev/api/users/sync 500 (Internal Server Error)
Error: "Could not find public function for 'clerkSync:syncClerkUser'"Root Cause
The production environment variable NEXT_PUBLIC_CONVEX_DEPLOYMENT_AUTH is pointing to the development Convex deployment instead of the production deployment.
Required Update in Vercel Dashboard
1. Navigate to Vercel Dashboard
- Go to your Vercel project for do.dev
- Click on "Settings" → "Environment Variables"
2. Update this CRITICAL Environment Variable
Variable Name: NEXT_PUBLIC_CONVEX_DEPLOYMENT_AUTH
Current Value (WRONG - Development URL):
https://dependable-pika-747.convex.cloudNew Value (CORRECT - Production URL):
https://lovable-dinosaur-317.convex.cloud3. Also Update (if present):
Variable Name: CONVEX_DEPLOYMENT_LOCAL
New Value: prod:decisive-avocet-403
Variable Name: NEXT_PUBLIC_CONVEX_DEPLOYMENT_LOCAL
New Value: https://decisive-avocet-403.convex.cloud
4. Redeploy
After updating the environment variables, you MUST redeploy the application for the changes to take effect.
Why This Fixes the Error
- The
/api/users/syncendpoint in do.dev usesprocess.env.NEXT_PUBLIC_CONVEX_DEPLOYMENT_AUTHto connect to the auth Convex deployment - Currently, it's trying to connect to the development deployment which doesn't have the production functions
- The production functions were deployed to
https://lovable-dinosaur-317.convex.cloud - Updating the environment variable will make the production site connect to the correct Convex deployment
Verification Steps
After updating and redeploying:
- Visit https://do.dev
- Try to log in or access https://do.dev/dashboard/customers/overview
- Check the browser console - the 500 error should be gone
- The user sync should complete successfully
Critical Note
This is preventing ALL users from logging into the production site. The environment variable update is required immediately.