Common problems in AI-built apps
Getting an error from your AI-generated code? We've seen it before. Find your issue below for causes, fixes, and when to get professional help.
Next.js Hydration Error
Hydration errors occur when the server-rendered HTML doesn't match what React expects on the client.
Next.js Dynamic Server Usage
This error occurs when you try to use dynamic APIs like cookies(), headers(), or searchParams in a route that Next.
Next.js Module Not Found
Module not found errors happen when Next.
Next.js Build Fails
Build failures in Next.
Next.js Server Component Error
Server Component errors arise when you mix server and client paradigms incorrectly.
Next.js Route Not Found
Routes returning 404 in Next.
React White Screen
A white screen (or blank page) in React typically means the app crashed during rendering without a visible error.
React Infinite Loop
Infinite re-render loops happen when a component triggers a state update on every render, creating an endless cycle.
React Hooks Error
React enforces strict rules for hooks: they must be called at the top level of a function component, not inside loops, conditions, or nested functions.
React State Not Updating
State not updating is usually caused by stale closures, mutating state directly, or misunderstanding that setState is asynchronous.
React Memory Leak
Memory leaks in React occur when subscriptions, timers, or async operations continue running after a component unmounts.
Supabase RLS Denied
Row Level Security (RLS) blocks all access to tables by default when enabled.
Supabase Auth Session Missing
A missing auth session means getSession() or getUser() returns null when you expect an authenticated user.
Supabase Realtime Not Working
Supabase Realtime subscriptions may silently fail to deliver events if the table isn't configured for replication, RLS blocks the subscription, or the channel setup is incorrect.
Supabase Edge Function Error
Supabase Edge Functions run on Deno, not Node.
Vercel Build Fails
Vercel builds fail for reasons that don't surface locally: missing environment variables, case-sensitive file paths, memory limits, or dependencies that require native compilation.
Vercel Serverless Function Timeout
Vercel serverless functions have execution time limits (10s on Hobby, 60s on Pro).
CORS Error
CORS errors occur when your frontend makes requests to a different origin (domain, port, or protocol) and the server doesn't include the correct Access-Control-Allow-Origin headers.
Environment Variables Not Loading
Environment variables showing as undefined is a common issue caused by missing .
Works Locally But Not in Production
The 'works on my machine' problem stems from differences between your local environment and production: missing env vars, different Node versions, file system case sensitivity, or build-time vs runtime behavior differences.
JWT Token Expired
JWT expiration errors occur when access tokens pass their expiry time and the application doesn't have proper token refresh logic.
OAuth Callback Error
OAuth callback errors happen when the redirect URI configured in your OAuth provider doesn't match what your application sends, or when the callback handler fails to exchange the authorization code for tokens.
Session Not Persisting
Session persistence issues cause users to lose their login state between page navigations or refreshes.
NextAuth Error
NextAuth errors typically stem from misconfigured providers, missing environment variables, or incorrect callback URL settings.
TypeScript Type Error
TypeScript type errors catch bugs at compile time but can be frustrating when types don't match runtime behavior.
TypeScript Build Error
TypeScript build errors prevent your project from compiling.
Prisma Migration Error
Prisma migration errors occur when the migration SQL can't be applied to your database.
Prisma N+1 Query Problem
The N+1 problem occurs when your code makes one query to fetch a list, then N additional queries to fetch related data for each item.
Database Connection Refused
Database connection failures happen when your application can't reach the database server.
Slow Page Load
Slow page loads frustrate users and hurt SEO.
Large Bundle Size
Your production JavaScript bundle is bloated, causing slow page loads and poor Core Web Vitals.
API Response Slow
Your API endpoints take seconds to respond, degrading user experience.
Memory Usage High
Your application consumes excessive memory, leading to crashes and OOM kills.
Dependency Vulnerability
Your project has known security vulnerabilities in dependencies.
Package Version Conflict
Incompatible package versions cause build failures or runtime errors.
WebSocket Connection Failed
WebSocket connections fail to establish or drop unexpectedly.
Rate Limiting Not Working
Your API rate limiting is ineffective, leaving endpoints vulnerable to abuse.
Docker Build Fails
Docker image builds fail due to incorrect Dockerfiles, missing dependencies, or platform mismatches.
Port Binding Error
Your application fails to start because the required port is already in use or inaccessible.
SSL Certificate Error
HTTPS connections fail due to expired, self-signed, or misconfigured SSL certificates.
Clerk Auth Error
Clerk authentication fails with cryptic errors during sign-in, token verification, or middleware.
Auth Middleware Bypass
Authentication middleware can be bypassed, exposing protected routes.
TypeScript Any Types
Your codebase is riddled with `any` types that defeat the purpose of TypeScript.
TypeScript Generic Error
Generic type parameters cause confusing compilation errors.
TypeScript Strict Mode Errors
Enabling strict mode in tsconfig reveals hundreds of errors in AI-generated code.
Drizzle Schema Error
Drizzle ORM schema definitions cause migration failures or type mismatches.
SQL Injection Vulnerability
Your application is vulnerable to SQL injection attacks because AI-generated code concatenates user input directly into SQL queries.
Database Deadlock
Concurrent database operations cause deadlocks, hanging requests and eventually timing out.
Supabase Migration Conflict
Supabase migrations fail due to conflicts between local and remote states.
Supabase Storage Upload Error
File uploads to Supabase Storage fail silently or throw permission errors.
Supabase Connection Pool Exhausted
Your app runs out of database connections, causing queries to hang or fail.
Supabase TypeScript Types Wrong
Generated Supabase TypeScript types don't match the actual database schema.
Next.js Metadata API Error
Next.
Next.js Middleware Error
Next.
Next.js API Route Timeout
API routes hit the execution time limit and return 504 errors.
Next.js Image Optimization Error
The Next.
React Key Warning
React warns about missing or incorrect keys in lists, causing unpredictable UI behavior.
React Context Undefined
React context returns undefined when consumed in child components.
React Ref Not Working
React refs return null or don't attach to the expected DOM element.
TypeScript Module Augmentation
TypeScript module augmentation fails to extend existing types, causing missing properties or duplicate identifier errors.
Don't see your error listed?
Send us the error message and your repo. We'll diagnose it and give you a fix quote within 24 hours.