Based on the browser console errors, your .env file contains the wrong Supabase URL. It's currently pointing to the Supabase dashboard instead of your project's actual API.
Your .env file likely has:
VITE_SUPABASE_URL=https://supabase.com/dashboard/project/myrthifravcxvcqlptcp/...This is WRONG ❌ - It points to the Supabase dashboard, not your project's API endpoint.
- Go to https://supabase.com/dashboard
- Sign in and select your project
- Click Settings (gear icon) in the left sidebar
- Click API in the settings menu
- Copy these two values:
Project URL:
https://myrthifravcxvcqlptcp.supabase.co
(Format: https://[your-project-id].supabase.co)
anon/public key:
eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJzdXBhYmFzZSIsInJlZiI6Im15cnRoaWZyYXZjeHZjcWxwdGNwIiwicm9sZSI6ImFub24iLCJpYXQiOjE3MzMwNTI2MjEsImV4cCI6MjA0ODYyODYyMX0...
(A long string starting with eyJ)
Open c:\Users\roush\Downloads\DocTransfer\DocTransfer\.env and update it:
# Supabase Configuration
VITE_SUPABASE_URL=https://myrthifravcxvcqlptcp.supabase.co
VITE_SUPABASE_ANON_KEY=your_actual_anon_key_here
# Clerk Configuration (keep these as they are)
VITE_CLERK_PUBLISHABLE_KEY=your_clerk_key_hereReplace:
https://myrthifravcxvcqlptcp.supabase.cowith YOUR actual Project URLyour_actual_anon_key_herewith YOUR actual anon/public key
After updating .env:
- Stop all running dev servers (press Ctrl+C in terminals)
- Run
npm run devagain - Refresh your browser
After updating and restarting:
- Open your app at
http://localhost:5173 - Sign in successfully
- Go to the DataRoom (
/dataroom) - Open browser DevTools (F12) → Console tab
- Upload a test file
- You should NOT see CORS errors anymore
❌ DON'T use https://supabase.com/dashboard/...
✅ DO use https://[your-project-id].supabase.co
❌ DON'T include /rest/v1/ or any path in the URL
✅ DO use just the base URL
❌ DON'T forget to restart the dev server
✅ DO restart after changing .env
If you still see CORS errors after fixing the URL:
-
Add localhost to CORS settings:
- Supabase Dashboard → Settings → API → CORS Configuration
- Add:
http://localhost:5173 - Save changes
-
Clear browser cache:
- Hard refresh: Ctrl+Shift+R (Windows) or Cmd+Shift+R (Mac)
-
Check your .env file loads:
- Look in console for: "Clerk Key exists: true"
- If false, your .env isn't loading properly
# Clerk Authentication
VITE_CLERK_PUBLISHABLE_KEY=pk_test_Y2xlYXItcGlyYW5oYS05My5jbGVyay5hY2NvdW50cy5kZXYk
# Supabase Database
VITE_SUPABASE_URL=https://myrthifravcxvcqlptcp.supabase.co
VITE_SUPABASE_ANON_KEY=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJzdXBhYmFzZSIsInJlZiI6Im15cnRoaWZyYXZjeHZjcWxwdGNwIiwicm9sZSI6ImFub24iLCJpYXQiOjE3MzMwNTI2MjEsImV4cCI6MjA0ODYyODYyMX0.abcdefghijklmnopqrstuvwxyz1234567890Note: The values above are examples. Use YOUR actual keys from YOUR Supabase dashboard.