Debugging
Finding out why something broke: reading errors, browser dev tools, logs, and the classic works-locally-fails-in-production gap.
130 posts · page 1 of 5
What Is UTF-8? Character Encoding and Garbled Text (Mojibake) Explained
UTF-8 is the character encoding that lets computers store every language and emoji as bytes — and it's the default almost everywhere now. How encoding works, why you see garbled text like ’ or é, and how to fix it in HTML, databases, CSV files and code.
"User Is Not in the Sudoers File": What It Means and How to Fix It
"username is not in the sudoers file. This incident will be reported." means your Linux user isn't allowed to run commands as root with sudo. How to add a user to the sudo (or wheel) group from root, edit sudoers safely with visudo, recover when you've locked yourself out, and the safer alternatives to giving out sudo.
Unexpected End of JSON Input: Causes and Fixes
"SyntaxError: Unexpected end of JSON input" means you tried to parse JSON from an empty or cut-off string — most often calling response.json() on an empty response like a 204 or an error. How to find the real response, handle empty bodies safely, and fix the server side.
Stripe Test Mode and Sandboxes: Test Payments Without Real Money
How to test Stripe payments safely: test keys vs live keys, Stripe sandboxes, the test card numbers for success, declines and 3D Secure, testing webhooks locally with the Stripe CLI, simulating subscriptions with test clocks, and the checklist for switching to live mode.
ReferenceError: X Is Not Defined — What It Means and How to Fix It
"Uncaught ReferenceError: x is not defined" means JavaScript can't find a variable or function with that name in the current scope. The common causes — typos, missing imports, scope, script load order, $ and jQuery, require in the browser, and window or document in server code — with a fix for each.
"Python Is Not Recognized as an Internal or External Command": How to Fix It
On Windows, "'python' is not recognized as an internal or external command, operable program or batch file" (or "pip is not recognized") means Windows can't find Python on your PATH. How to check whether Python is installed, use the py launcher, add Python to PATH, turn off the Microsoft Store alias, and fix pip.
"You Exceeded Your Current Quota" (OpenAI 429): What It Means and How to Fix It
OpenAI's insufficient_quota error signals a billing or usage-limit problem. How to distinguish exhausted credits, project and organization spend limits, and real rate limits; use the right API key; and prevent repeat failures.
Module not found: Can't resolve — How to Fix It (Next.js, Vite, webpack)
"Module not found: Error: Can't resolve 'x'" means your bundler couldn't find a file or package you imported. The fixes for each cause: a package that isn't installed, wrong relative paths, case-sensitive file names that work on Mac but fail on Linux, path aliases like @/, and Node built-ins imported in browser code.
The grep Command: Search Files and Logs Like a Pro
grep searches text for lines that match a pattern — in files, whole folders, or the output of another command. The examples you'll actually use: case-insensitive search, recursive search, line numbers, context around matches, counting, excluding folders, regex, and grepping logs, plus ripgrep.
"You Have Divergent Branches" in git pull: What It Means and How to Fix It
"hint: You have divergent branches and need to specify how to reconcile them" means your local branch and the remote both have commits the other doesn't. What divergence is, the three options (merge, rebase, fast-forward only), which to pick, and how to set a default so git stops asking.
ERR_SSL_PROTOCOL_ERROR: What It Means and How to Fix It
ERR_SSL_PROTOCOL_ERROR means the browser couldn't complete a secure HTTPS connection because the server's response wasn't valid TLS. The usual causes — HTTPS pointed at a port speaking plain HTTP, a missing certificate, localhost over https, Cloudflare SSL modes — and how to fix each.
ERR_NAME_NOT_RESOLVED: What It Means and How to Fix It
ERR_NAME_NOT_RESOLVED means your browser couldn't find an IP address for the domain — DNS lookup failed. How to tell whether the problem is a typo, your own network, or the domain's DNS records, and the fixes for each, including for a domain you just connected to your app.
EADDRINUSE: Address Already in Use — How to Fix It
"Error: listen EADDRINUSE: address already in use :::3000" means another process is already using that port. How to find which process it is on Mac, Linux and Windows, how to stop it safely, why it keeps happening (old dev servers, nodemon, Docker), and how to make your app pick another port.
CPU Steal Time Explained: Why Your VPS Is Slow When Nothing's Running
Steal time (%st in top) is time your virtual machine wanted the CPU but the hypervisor gave it to someone else. How to measure it with top, vmstat and mpstat, what levels are normal, how it differs from high load, why shared vCPUs suffer from it, and what to do when it's hurting your app.
Claude Code "Prompt Is Too Long": Why It Happens and How to Fix It
"Prompt is too long" and "Context limit reached" mean the conversation no longer fits in the model's context window. What fills it up, how to see what's using space with /context, and the fixes: /compact, /clear, smaller reads, fewer MCP tools and better session habits.
Claude Code "529 Overloaded" Error: What It Means and What to Do
"API Error: Repeated 529 Overloaded errors" means Anthropic's API is at capacity for the model you're using — not that you did anything wrong or used up your plan. What a 529 is, how it differs from a 429, and the fixes: wait, switch model, and the retry settings for unattended runs.
How to Check Disk Space and Memory Usage on Linux
The commands to see what's using your server's disk and memory: df -h for free disk space, du and ncdu to find big folders, free -h for memory (and why 'free' memory looks low), and top/htop for which process is using RAM and CPU — plus how to clean up safely.
Cannot Set Headers After They Are Sent to the Client: How to Fix It
"Error [ERR_HTTP_HEADERS_SENT]: Cannot set headers after they are sent to the client" means your Express or Node.js code tried to send a second response to one request. The common causes — a missing return, callbacks and loops that respond twice, next() after res.send(), async errors — and how to fix each.
503 Service Unavailable: What It Means and How to Fix It
A 503 Service Unavailable means the server is temporarily unable to handle the request — overloaded, in maintenance, or with no healthy app behind it. How it differs from 500, 502 and 504, the common causes (crashed app, failed health checks, resource limits, maintenance mode) and how to fix and prevent them.
429 Too Many Requests: What It Means and How to Fix It
A 429 Too Many Requests response means you've hit a rate limit: too many requests in too short a time. How to read the Retry-After and rate-limit headers, how to retry properly with backoff, the usual causes (loops, missing caching, shared IPs, AI API limits), and how to add rate limits to your own app.
405 Method Not Allowed: What It Means and How to Fix It
A 405 Method Not Allowed means the URL exists but doesn't accept the HTTP method you used — a POST to a route that only handles GET, for example. The usual causes in Express, Next.js route handlers, Flask and FastAPI, static hosts and Nginx, plus how CORS preflight OPTIONS requests trigger it.
403 Forbidden Error: What It Means and How to Fix It
A 403 Forbidden means the server understood your request and refuses to allow it. The common causes — file permissions and missing index files in Nginx, wrong API keys or roles, private S3 buckets, CSRF and CORS confusion, Cloudflare and WAF blocks — and how to tell which one you've hit.
400 Bad Request: What It Means and How to Fix It
A 400 Bad Request means the server couldn't or wouldn't process your request because something about the request itself is wrong — invalid JSON, a missing field, the wrong Content-Type, an oversized cookie or a malformed URL. How to find the cause in DevTools and fix it, whether you're a visitor or the developer.
"Your Connection Is Not Private" on Your Own Site: Causes and Fixes
When visitors see NET::ERR_CERT_DATE_INVALID, ERR_CERT_COMMON_NAME_INVALID or ERR_CERT_AUTHORITY_INVALID on your site, the SSL certificate is expired, for the wrong name, or incomplete. How to tell which, and how to fix each one.