Production error fixes
136 errors from Node.js, Next.js and Python apps. Find the exact one you got: each page starts with the fix that works in most cases, then lists the causes and the less common fixes.
By Jake Marsh, who builds Runheed, error tracking your coding agent can read. Updated 2026-11-23.
Catch these in production: Next.js, Express, FastAPI, Django, Flask.
Network and HTTP
- Error: read ECONNRESETNode.js
- Error: connect ECONNREFUSED 127.0.0.1:5432Node.js
- Error: connect ETIMEDOUT 10.0.4.12:5432Node.js
- TypeError: fetch failedNode.js
- Error: self-signed certificate in certificate chainNode.js
- Error: getaddrinfo ENOTFOUND api.example.comNode.js
- Error: write EPIPENode.js
- Access to fetch at 'https://api.example.com/orders' from origin 'https://app.example.com' has been blocked ...Node.js
- AxiosError: Request failed with status code 401Node.js
- FunctionsHttpError: Edge Function returned a non-2xx status codeSupabase
- requests.exceptions.ConnectionError: HTTPSConnectionPool(host='api.example.com', port=443): Max retries exc...Python
- httpx.ReadTimeout: The read operation timed outPython
- ConnectionResetError: [Errno 104] Connection reset by peerPython
- BrokenPipeError: [Errno 32] Broken pipePython
- [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificatePython
- Error [ERR_HTTP_HEADERS_SENT]: Cannot set headers after they are sent to the clientNode.js
- 422 Unprocessable Entity: {"detail":[{"type":"missing","loc":["body","email"],"msg":"Field required"}]}Python
- Error: No signatures found matching the expected signature for payload. Are you passing the raw request bod...Node.js
- TokenExpiredError: jwt expiredNode.js
- AuthSessionMissingError: Auth session missing!Supabase
- Error: 429 You exceeded your current quota, please check your plan and billing details.Node.js
Databases
- PrismaClientKnownRequestError: Unique constraint failed on the fields: (`email`)Node.js
- PrismaClientInitializationError: Can't reach database server at `db.example.com:5432`Node.js
- MongoServerError: E11000 duplicate key error collection: app.users index: email_1 dup key: { email: "ada@ex...Node.js
- [ioredis] Unhandled error event: Error: connect ECONNREFUSED 127.0.0.1:6379Node.js
- psycopg2.OperationalError: server closed the connection unexpectedlyPython
- django.db.utils.OperationalError: no such table: orders_orderPython
- psycopg.errors.UniqueViolation: duplicate key value violates unique constraint "users_email_key"Python
- error: new row violates row-level security policy for table "todos"Node.js
- error: relation "todo" does not existNode.js
- psycopg.errors.UndefinedColumn: column "titel" does not existPython
- error: infinite recursion detected in policy for relation "members"Node.js
- error: permission denied for table profilesNode.js
- error: null value in column "total" of relation "orders" violates not-null constraintNode.js
- error: insert or update on table "orders" violates foreign key constraint "orders_user_id_fkey"Node.js
- error: invalid input syntax for type uuid: "undefined"Node.js
- sqlalchemy.exc.PendingRollbackError: This Session's transaction has been rolled back due to a previous exce...Python
- sqlite3.OperationalError: database is lockedPython
- pymongo.errors.ServerSelectionTimeoutError: localhost:27017: [Errno 111] Connection refused (configured tim...Python
- redis.exceptions.ConnectionError: Error 111 connecting to localhost:6379. Connection refused.Python
Imports and modules
- Error [ERR_REQUIRE_ESM]: require() of ES Module ... not supported.Node.js
- TypeError [ERR_UNKNOWN_FILE_EXTENSION]: Unknown file extension ".ts" for /app/src/index.tsNode.js
- Error: Cannot find module 'x'Node.js
- SyntaxError: Cannot use import statement outside a moduleNode.js
- Module not found: Can't resolve 'fs'Next.js
- Module not found: Can't resolve '@/components/OrderTable'Next.js
- ModuleNotFoundError: No module named 'x'Python
- ImportError: cannot import name 'x' from partially initialized module 'y' (most likely due to a circular im...Python
- ImportError: attempted relative import with no known parent packagePython
- AttributeError: module 'requests' has no attribute 'get'Python
- TypeError: 'module' object is not callablePython
- ImportError: libGL.so.1: cannot open shared object file: No such file or directoryPython
- Error: Could not load the "sharp" module using the linux-x64 runtimeNode.js
React and Next.js rendering
- ResizeObserver loop completed with undelivered notifications.Browser
- Hydration failed because the server rendered HTML didn't match the client. As a result this tree will be re...Next.js
- Error: An error occurred in the Server Components render. The specific message is omitted in production bui...Next.js
- Error: Dynamic server usage: Route /x couldn't be rendered statically because it used `headers`.Next.js
- ReferenceError: window is not definedNext.js
- Error: Event handlers cannot be passed to Client Component props.Next.js
- Error: Only plain objects, and a few built-ins, can be passed to Client Components from Server Components.Next.js
- Error: Route "/orders/[id]" used `params.id`. `params` should be awaited before using its properties.Next.js
- Error: NEXT_REDIRECTNext.js
- Error: NextRouter was not mounted.Next.js
- Error: Invalid src prop (https://cdn.example.com/p/42.jpg) on `next/image`, hostname "cdn.example.com" is n...Next.js
- TypeError: Failed to parse URL from /api/ordersNext.js
- Error: Too many re-renders. React limits the number of renders to prevent an infinite loop.Next.js
- useSearchParams() should be wrapped in a suspense boundary at page "/search".Next.js
- You're importing a module that depends on `useState` into a React Server Component module. This API is only...Next.js
- Error: Objects are not valid as a React child (found: object with keys {id, name, total}). If you meant to ...Next.js
- Error: Element type is invalid: expected a string (for built-in components) or a class/function (for compos...Next.js
- Error: Failed to find Server Action "7f3a9c2e5d1b4a6f8c0e2d7b9a1c3e5f7d9b0a2c4e". This request might be fro...Next.js
- ChunkLoadError: Loading chunk 4512 failed. (error: https://example.com/_next/static/chunks/4512-a1b2c3d4.js)Next.js
Undefined, None and type errors
- panic: assignment to entry in nil mapGo
- TypeError: slugify(): Argument #1 ($title) must be of type string, null givenPHP
- System.InvalidOperationException: Sequence contains no elements.NET
- panic: runtime error: invalid memory address or nil pointer dereferenceGo
- NoMethodError: undefined method 'email' for nilRuby
- java.lang.NullPointerException: Cannot invoke "String.toLowerCase()" because the return value of "Customer....Java
- System.NullReferenceException: Object reference not set to an instance of an object..NET
- TypeError: Cannot read properties of undefined (reading 'x')Node.js
- TypeError: Cannot destructure property 'id' of 'undefined' as it is undefined.Node.js
- TypeError: Cannot convert undefined or null to objectNode.js
- TypeError: items is not iterableNode.js
- TypeError: x is not a functionNode.js
- TypeError: Client is not a constructorNode.js
- ReferenceError: x is not definedNode.js
- TypeError [ERR_INVALID_ARG_TYPE]: The "path" argument must be of type string. Received undefinedNode.js
- TypeError: 'NoneType' object is not subscriptablePython
- AttributeError: 'NoneType' object has no attribute 'x'Python
- TypeError: 'NoneType' object is not iterablePython
- KeyError: 'email'Python
- TypeError: unhashable type: 'list'Python
- AttributeError: 'dict' object has no attribute 'name'Python
- IndexError: list index out of rangePython
- TypeError: unsupported operand type(s) for +: 'int' and 'str'Python
- ValueError: invalid literal for int() with base 10: ''Python
- TypeError: __init__() got an unexpected keyword argument 'proxies'Python
- UnboundLocalError: cannot access local variable 'total' where it is not associated with a valuePython
- RuntimeError: dictionary changed size during iterationPython
- ValueError: too many values to unpack (expected 2)Python
- TypeError: 'str' object is not callablePython
JSON, parsing and validation
- SyntaxError: Unexpected token '<', "<!DOCTYPE "... is not valid JSONNode.js
- SyntaxError: Unexpected end of JSON inputNode.js
- TypeError: Converting circular structure to JSONNode.js
- ZodError: [ { "expected": "string", "code": "invalid_type", "path": [ "email" ], "message": "Invalid input:...Node.js
- RangeError: Invalid time valueNode.js
- json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0)Python
- TypeError: Object of type datetime is not JSON serializablePython
- pydantic_core._pydantic_core.ValidationError: 1 validation error for User email Field required [type=miss...Python
- UnicodeDecodeError: 'utf-8' codec can't decode byte 0xff in position 0: invalid start bytePython
Memory, async and the process
- [UnhandledPromiseRejection: This error originated either by throwing inside of an async function without a ...Node.js
- FATAL ERROR: Reached heap limit Allocation failed - JavaScript heap out of memoryNode.js
- RangeError: Maximum call stack size exceededNode.js
- RecursionError: maximum recursion depth exceededPython
- RuntimeError: Event loop is closedPython
- RuntimeWarning: coroutine 'fetch_user' was never awaitedPython
- Error: listen EADDRINUSE: address already in use :::3000Node.js
- OSError: [Errno 98] Address already in usePython
- Error: error:0308010C:digital envelope routines::unsupportedNode.js
- MaxListenersExceededWarning: Possible EventEmitter memory leak detected. 11 error listeners added to [Socke...Node.js
- Error: ENOENT: no such file or directory, open '/app/config.json'Node.js
- Error: EACCES: permission denied, open '/app/data/cache.json'Node.js
- Error: EMFILE: too many open files, open '/app/uploads/0412.jpg'Node.js
- PermissionError: [Errno 13] Permission denied: '/app/data/report.csv'Python
- CredentialsProviderError: Could not load credentials from any providersNode.js
- botocore.exceptions.NoCredentialsError: Unable to locate credentialsPython
- django.core.exceptions.ImproperlyConfigured: The SECRET_KEY setting must not be empty.Python
MCP servers and clients
- McpError: MCP error -32000: Connection closedNode.js
- McpError: MCP error -32001: Request timed outNode.js
- MCP error -32602: Input validation error: Invalid arguments for tool get_orderNode.js
- Error: spawn npx ENOENTNode.js
- Bad Request: No valid session ID providedNode.js
- Not Acceptable: Client must accept both application/json and text/event-streamNode.js
- ModuleNotFoundError: No module named 'mcp.server.fastmcp'Python
- Error executing tool get_orderPython
- Bad Request: Unsupported protocol version: 2026-07-28Node.js