Guides
Fix an error
Step-by-step fixes for errors that AI-built apps hit in production: hydration, CORS, Supabase RLS, Vercel timeouts, Stripe webhooks and more.
Each guide starts from the exact error message. It says what the message means, the usual causes, and the fix with code. The last part shows how to catch the same error when it happens to a real user in production, so you hear about it before they write in.
The pages are written for apps built quickly with AI tools: Next.js, React and Vite on the front, Supabase or Firebase for data, Vercel or Node.js on the server, and Stripe or the OpenAI API. Search this page for the first words of your error.
React and Next.js
- 01Next.js hydration mismatchHydration failed because the server rendered HTML didn't match the client
- 02Next.js Server Components render errorAn error occurred in the Server Components render. The specific message is omitted in production builds
- 03React: Too many re-rendersToo many re-renders. React limits the number of renders to prevent an infinite loop.
- 04React: Maximum update depth exceededMaximum update depth exceeded
- 05React: Objects are not valid as a React childObjects are not valid as a React child
- 06React: Invalid hook callInvalid hook call. Hooks can only be called inside of the body of a function component.
- 07ReferenceError: window is not definedReferenceError: window is not defined
Browser and network
- 08Cannot read properties of undefinedTypeError: Cannot read properties of undefined (reading 'map')
- 09CORS: No 'Access-Control-Allow-Origin' headerhas been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource.
- 10TypeError: Failed to fetchTypeError: Failed to fetch
- 11Unexpected token < is not valid JSONSyntaxError: Unexpected token '<', "<!DOCTYPE "... is not valid JSON
- 12ChunkLoadError: Loading chunk failedChunkLoadError: Loading chunk 123 failed.
- 13"Script error." from cross-origin scriptsScript error.
- 14Mixed Content: request blockedMixed Content: The page was loaded over HTTPS, but requested an insecure resource. This request has been blocked
Supabase and Firebase
- 15Supabase row-level security violationnew row violates row-level security policy for table
- 16Supabase Auth session missingAuthSessionMissingError: Auth session missing!
- 17supabaseUrl is requiredsupabaseUrl is required.
- 18Firebase missing or insufficient permissionsFirebaseError: Missing or insufficient permissions.
Servers and hosting
- 19Vercel FUNCTION_INVOCATION_TIMEOUT504: GATEWAY_TIMEOUT Code: FUNCTION_INVOCATION_TIMEOUT
- 20Vercel FUNCTION_INVOCATION_FAILED500: INTERNAL_SERVER_ERROR Code: FUNCTION_INVOCATION_FAILED
- 21Postgres too many clients alreadyFATAL: sorry, too many clients already
- 22Express: Cannot set headers after they are sentError [ERR_HTTP_HEADERS_SENT]: Cannot set headers after they are sent to the client
- 23Node.js unhandled promise rejectionThis error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch()
Payments and AI APIs
- 24Stripe webhook signature verification failedNo signatures found matching the expected signature for payload
- 25OpenAI 429 insufficient quota429 You exceeded your current quota, please check your plan and billing details.
Agents and MCP
- 26Cursor MCP connection failed — BugTape hosted MCPCommon Cursor MCP failures, then BugTape hosted HTTP MCP. Capture keys are rejected. MCP on Free (event reads cost credits; live listen needs Pro).
- 27MCP server not working: checklist for Claude, Cursor, CodexFix a failing MCP server in Claude Code, Cursor or Codex: status commands, transport, sign-in, tokens, proxies and a manual initialize test.
- 28How to give Claude Code your production errorsPaste logs, connect an error tracker over MCP (BugTape, Sentry, PostHog, Datadog), send issues to the agent, and check the fix after a release.
- 29Send production bugs to a Cursor AutomationA BugTape webhook starts a Cursor Automation that reads the bug over MCP and opens a draft PR a human reviews. A schedule is the fallback.
Missing an error you keep hitting? Tell us on the contact page. Agents can read every guide as markdown: add .md to the address in place of the last slash.