All guidesErrors by provider
On this page

Error index

Vercel

Vercel errors: exact messages and their fixes

This page lists the 15 Vercel 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: 7 read-only tools; public repos only.
    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. Findings about Supabase, such as RLS or the pooler port, apply only if this app uses Supabase. Do not add Supabase or any other provider this app does not already use. 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.

15 errors

Vercel error messages, A to Z

  • Callback URL mismatch

    Auth0 rejects a redirect_uri that is not an exact entry in Allowed Callback URLs. In nextjs-auth0 v4 it comes from APP_BASE_URL or the request host.

  • DEPLOYMENT_NOT_FOUND

    Fix Vercel 404 DEPLOYMENT_NOT_FOUND: check the deployment URL, deleted previews and domain assignment before changing application routes.

  • Environment Variables with a public framework prefix cannot use visibility: secret

    Vercel will not store a NEXT_PUBLIC_ or VITE_ variable as a Secret, because the build ships it to the browser. Public value: Config. Secret: drop the prefix.

  • Error: Could not load the default credentials.

    firebase-admin found no Application Default Credentials. Vercel has none, so pass cert() with service account values from server-side variables.

  • ERR_PNPM_OUTDATED_LOCKFILE

    Vercel builds with CI=1, so pnpm refuses a pnpm-lock.yaml that no longer matches package.json. Run pnpm install locally and commit it with package.json.

  • Firebase: Error (auth/invalid-api-key).

    getAuth() throws auth/invalid-api-key when apiKey is undefined, empty or has a colon. On Vercel, the NEXT_PUBLIC_ or VITE_ variable was missing at build.

  • Firebase: Error (auth/unauthorized-domain).

    Firebase throws auth/unauthorized-domain when the page host is not in Authorized domains. Add the Vercel host in the Firebase console; previews need theirs.

  • FUNCTION_INVOCATION_FAILED

    "This Serverless Function has crashed" (500 FUNCTION_INVOCATION_FAILED): read the first error in the Logs tab. Often an env var is unset for that environment.

  • FUNCTION_INVOCATION_TIMEOUT

    Fix 504 FUNCTION_INVOCATION_TIMEOUT: inspect slow API calls, set maxDuration within your plan limit and return a response. See when streaming helps.

  • Invalid origin

    Better Auth answers 403 Invalid origin when the Origin is not in trustedOrigins. Add your preview URL pattern, scoped to your project, not *.vercel.app.

  • Max client connections reached

    On Vercel, connect to Supabase through the transaction pooler on port 6543, not the 5432 session pooler; set prepare: false (pgbouncer=true in Prisma).

  • MIDDLEWARE_INVOCATION_FAILED

    Vercel returns 500 MIDDLEWARE_INVOCATION_FAILED when middleware.ts or proxy.ts throws, often a client made from a missing env var. Read the runtime log first.

  • [next-auth][error][NO_SECRET]

    NextAuth stops in production without a secret: set AUTH_SECRET or NEXTAUTH_SECRET in Vercel and redeploy. On Vercel you need no NEXTAUTH_URL or AUTH_TRUST_HOST.

  • Node.js Version "20.x" is discontinued and must be upgraded

    Vercel stopped building with Node.js 20 on 2026-10-01. Change engines.node in package.json, or the Project Settings version, to 24.x or 22.x, then redeploy.

  • remaining connection slots are reserved for roles with the SUPERUSER attribute

    Neon refuses direct connections (53300) once max_connections fills, often from Vercel functions. Use the -pooler host in DATABASE_URL, one pool per instance.

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 · Next.js errors · Stripe errors · Clerk errors · Resend errors · Auth.js errors · Better Auth errors · All provider errors