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.cloud

New Value (CORRECT - Production URL):

https://lovable-dinosaur-317.convex.cloud

3. 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

  1. The /api/users/sync endpoint in do.dev uses process.env.NEXT_PUBLIC_CONVEX_DEPLOYMENT_AUTH to connect to the auth Convex deployment
  2. Currently, it's trying to connect to the development deployment which doesn't have the production functions
  3. The production functions were deployed to https://lovable-dinosaur-317.convex.cloud
  4. Updating the environment variable will make the production site connect to the correct Convex deployment

Verification Steps

After updating and redeploying:

  1. Visit https://do.dev
  2. Try to log in or access https://do.dev/dashboard/customers/overview
  3. Check the browser console - the 500 error should be gone
  4. 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.

On this page