Platform

Cursor fixes

Production errors in apps written with Cursor, from env vars to server crashes.

Cursor writes the code; it doesn’t host it. So the errors on this page come from wherever the app runs: Vercel or Netlify builds, Supabase Auth and Row Level Security, Stripe webhooks and AI API keys. The usual Cursor-specific trap is code that works on localhost with a local .env and breaks once deployed, because the host doesn’t have the same variables. Start with these three:

  1. Environment variables are undefined in production
  2. Supabase login redirects to localhost
  3. OpenAI API key in the browser

Lovable vs Bolt vs Cursor · Lovable vs Bolt vs Cursor: which is easiest to fix?

89 fixes: 20 in full, then 69 more by title.

Top Cursor fixes

  1. Supabase signup_disabled: new accounts are turned off

    Sign-up returns signup_disabled? Supabase's general Auth settings include Allow new users to sign up. When that is off, only existing users can sign in.

  2. OpenAI API key (sk-) is in the front-end code

    An OpenAI sk- key is in the browser bundle? OpenAI says never deploy a key in a browser. Revoke it and call the API from your server.

  3. Missing security headers: check HSTS, CSP, X-Frame-Options and nosniff

    A scanner says a security header is not set? Check all four at once: HSTS, Content-Security-Policy, X-Frame-Options and X-Content-Type-Options, then fix each one on your host.

  4. 500: INTERNAL_SERVER_ERROR / FUNCTION_INVOCATION_FAILED on Vercel

    Investigate a Vercel function failure using runtime logs, environment checks, Node compatibility, database connections and local reproduction.

  5. Vercel custom domain shows "Invalid Configuration"

    Added your domain to Vercel and it says Invalid Configuration? Set the DNS records Vercel shows at your registrar and wait for DNS.

  6. Webhook signature verification failed. No signatures found matching the expected signature for payload

    Stripe webhook fails signature check? Usually the wrong whsec_ secret or your framework changed the raw request body. Here's the fix.

  7. supabaseUrl is required

    The console says supabaseUrl is required? createClient got an empty URL. Set the project URL the code reads, then rebuild.

  8. permission denied for table (Supabase error 42501)

    Supabase "permission denied for table"? The role lacks a GRANT on the table, which is checked before RLS. Add the grant, then a policy.

  9. Supabase login redirects to localhost:3000 after deploy

    Login or email confirm sends users to localhost:3000 on your live site? Change Supabase's Site URL and add your domain to Redirect URLs.

  10. Netlify secret scanning failed the build

    Netlify stopped the deploy because secret scanning found a key in the repo or the build output? Remove that value, then deploy again.

  11. email rate limit exceeded (Supabase Auth)

    Supabase says "email rate limit exceeded" or sign-up emails stop? The built-in mailer allows only 2 emails an hour. Set up custom SMTP.

  12. Mixed Content: the page was loaded over HTTPS but requested an insecure resource

    Browser blocks requests with a "Mixed Content" warning on your HTTPS site? Change every http:// URL your app calls to https://.

  13. Hydration failed because the server rendered HTML didn't match the client

    Next.js "Hydration failed" error? The server and browser drew different HTML. Fix nesting, window/localStorage use and dates.

  14. Environment variables are undefined in production

    Works locally but env vars are undefined once deployed? Add them to your host, use the VITE_ or NEXT_PUBLIC_ prefix for browser code, then redeploy.

  15. Vercel FUNCTION_INVOCATION_TIMEOUT (504) on API routes or AI calls

    Vercel API route times out with 504 FUNCTION_INVOCATION_TIMEOUT? Common with slow AI calls. Raise maxDuration, stream, or move work to background.

  16. Anthropic API key (sk-ant-) is in the front-end code

    An Anthropic sk-ant- key shipped in the browser? The Claude docs tell you to keep the key in an environment variable and to proxy browser calls through your server.

  17. Invalid API key (Supabase)

    Supabase says "Invalid API key" on your live site? Usually the key or project URL env var is missing, mistyped, or from another project.

  18. Supabase service_role or secret key exposed in front-end code

    Is your Supabase service_role or sb_secret key in your browser code? Anyone can read it and bypass all security. How to rotate and fix it.

  19. Supabase Edge Function returns 401 (verify_jwt)

    An Edge Function returns 401 before your code runs? JWT verification is on, and the Authorization header is missing or is not a user JWT.

  20. new row violates row-level security policy for table

    Saving data fails with "new row violates row-level security policy"? Add an INSERT policy with a WITH CHECK rule and send the right user_id.

More Cursor fixes

Older or narrower fixes for Cursor. Titles only.

All platforms

Keep going on your own.

The guides stay free. A deep leak report is $15. Fix packs are $24, or $49 for all three. There is no done-for-you repair.

See products