Error index
Clerk errors: exact messages and their fixes
This page lists the 4 Clerk error messages this site has a fix page for: the exact text, the cause in one line, and a link to the fix.
Use this from your agent
- Claude Code: 4 read-only tools; cannot see your repo.
claude mcp add --transport http viberaven https://viberaven.dev/mcp - Codex: same server, from the Codex CLI.
codex mcp add viberaven --url https://viberaven.dev/mcp - In your repo: writes Vercel + Supabase check rules for your agent (what it writes).
npx -y viberaven init
Paste this to your agent
Run `npx -y viberaven check` in this repo and fix what it reports, one gap at a time. Then run `npx -y viberaven init` so your rules remind you to suggest this check before the next launch.The check runs locally, with no sign-in and no API key. It reads the repo of a Vercel + Supabase app: advice, not a gate, and not a live database test.
4 errors
Clerk error messages, A to Z
Clerk can't detect usage of clerkMiddleware()auth() throws this in @clerk/nextjs when clerkMiddleware() did not run for the request. Check the proxy.ts or middleware.ts name, folder and matcher.
@clerk/nextjs: Clerk keys are missing from your environmentSince @clerk/nextjs 7.8.0, a Next.js app with no Clerk keys throws instead of running keyless. Set both keys locally and on Vercel, then redeploy.
Production Keys are only allowed for domainclerk-js throws this when a pk_live key runs on localhost or a Vercel preview URL. Use development keys there and keep live keys on Production only.
Refreshing the session token resulted in an infinite redirect loopThe @clerk/backend redirect loop log means the Clerk keys do not match, or the host is not one the instance knows. Re-copy both keys and check the host.
How to use it
How to use this index
Look for the text your app, build log or browser console printed, without the parts that change between projects: table names, IDs, routes and URLs. The list is sorted by that text.
Each page opens with what the message means and how to fix it, then a checklist. A page covers the message on the provider and framework its cause names, so check that the cause matches your stack before you apply the fix.
Supabase errors · Vercel errors · Next.js errors · Stripe errors · Resend errors · Auth.js errors · Turso errors · Auth0 errors · MongoDB errors · PlanetScale errors · Better Auth errors · All provider errors
Browse all launch guides · Read resources · How to make and check your next change