- LuzineDebug
- What’s new
What’s new
Every addition to the library: newly explained errors, new tools, new guides.
56
- How to create a minimal reproducible exampleA minimal reproducible example is the smallest possible code that triggers the bug, along with versions and steps to reproduce it. Start from an empty project, copy only what is needed, remove everything else by halves while the bug persists, then share it without any secret.Guide
- Find the commit that broke your code with git bisectgit bisect runs a binary search through history: you mark a commit with the bug (bad) and one without it (good), Git checks out the middle and you say whether it is good or bad. With 1,000 commits, about ten tests are enough. git bisect run automates everything with a script.Guide
- Debug an Arduino with the Serial MonitorCall Serial.begin(115200) in setup(), open the Serial Monitor and pick exactly the same baud rate: garbled characters almost always mean a different speed. Print short labelled messages, wrap them in a macro you can switch off and keep an eye on free RAM.Guide
- Read Docker container logs and debug a crashing containerdocker logs -f --tail 100 my-container shows the last lines and follows the output live. If the container stopped, docker inspect gives its exit code and tells you whether it was killed for lack of memory (OOMKilled). To look inside, use docker exec -it my-container sh.Guide
- Debug PHP with Xdebug 3 (PhpStorm, VS Code)Install Xdebug, set xdebug.mode=debug and xdebug.start_with_request=trigger, then make your IDE listen on port 9003. Start a session with the Xdebug Helper browser extension or the XDEBUG_SESSION parameter: PHP stops on your breakpoints.Guide
- Debug Node.js with breakpoints (VS Code, Chrome)Start Node with --inspect (or --inspect-brk to pause on the first line), then attach a debugger: Chrome through chrome://inspect or VS Code. The easiest option in VS Code is the JavaScript Debug Terminal: any node or npm command started in it stops on your breakpoints.Guide
- Debug JavaScript with Chrome DevToolsOpen DevTools with F12, read the error in the Console, then set a breakpoint in the Sources panel to inspect variables line by line. The Network panel shows the status and response of every request, and the Application panel shows local storage and the service worker.Guide
- How to read a stack trace (JS, Python, PHP, Java)Read a stack trace in three passes: the error type and message, the reading direction of the language, then the first frame that points to your own code. In Python the failing line is at the bottom; in JavaScript, PHP and Java it is at the top. If the trace contains "Caused by", the root cause is the last one.Guide
- Stack trace formatterFormats a stack trace (JS, Python, PHP, Java, .NET, Go), separates your code from libraries and points to the line to open first.Tool
- cURL converterPaste a cURL command (DevTools “Copy as cURL”): get the fetch, axios, Node, PHP (Laravel Http or curl) or Python requests code.Tool
- Chmod calculatorTick the permissions and get 755 or rwxr-xr-x (and back), with the ready-to-copy command and safe presets by use case.Tool
- YAML validatorValidates YAML (docker-compose, GitHub Actions, Kubernetes), shows the faulty line and tabs, and converts it to JSON.Tool
- Cron explainerTurns a cron expression into a plain sentence, lists the next runs and flags the traps (day of month AND day of week, time zone).Tool
- Timestamp converterConverts a Unix timestamp (seconds, milliseconds, microseconds) to a readable date in any time zone, and back.Tool
- Hash generatorComputes MD5, SHA-1, SHA-256, SHA-384, SHA-512 and HMAC of a text or file, and compares with an expected hash.Tool
- Base64 & URL encoderEncode and decode Base64 (standard and URL-safe), URL, HTML entities and Unicode escapes, with proper UTF-8 handling.Tool
- Fix "WARNING: REMOTE HOST IDENTIFICATION HAS CHANGED!" and "Host key verification failed" (SSH)The host key presented by the server no longer matches the one saved in your ~/.ssh/known_hosts: reinstalled server, reassigned IP address… or an attack. Check the fingerprint through another channel, remove the old entry with ssh-keygen -R host, then reconnect and accept the new key.Error page · Systems (Windows, macOS, Linux)
- Fix "fatal error: xxx.h: No such file or directory" in the Arduino IDEThe compiler cannot find the header file included with #include: the library that provides it is not installed, or the selected board is wrong. Install the library (and its dependencies) from the Library Manager, check Tools > Board, then compile again.Error page · Electronics & Arduino
- Fix "1071 Specified key was too long; max key length is 767 bytes" (MySQL, Laravel)The index you are creating exceeds the maximum size allowed by MySQL or MariaDB: in utf8mb4, a VARCHAR(255) takes up to 1020 bytes, more than the 767-byte limit of older servers. With Laravel, add Schema::defaultStringLength(191); in AppServiceProvider, or better, move to MySQL 5.7.7+ / MariaDB 10.2.2+, which accept 3072 bytes.Error page · Databases (SQL)
- Fix "The connection to the server localhost:8080 was refused" with kubectlkubectl finds no kubeconfig file and falls back to localhost:8080, where no cluster is listening. Copy the cluster configuration to ~/.kube/config (or point KUBECONFIG at it) and select the right context; if the address is a real IP such as :6443, the cluster itself is stopped or unreachable.Error page · DevOps, servers & cloud
- Fix "An error occurred (AccessDenied) when calling the PutObject operation" on AWS S3The AWS identity in use is not allowed to write to this bucket, or a rule explicitly prevents it. First check who you are with aws sts get-caller-identity, then that the IAM policy allows s3:PutObject on arn:aws:s3:::my-bucket/* (with /*), and that no bucket policy, Block Public Access or KMS key blocks it.Error page · DevOps, servers & cloud
- Fix the 404 on refresh of a SPA on Vercel ("404: NOT_FOUND"), Netlify and NginxYour React, Vue or Angular app handles its routes in the browser, but when you refresh /dashboard, the host looks for a /dashboard file that does not exist. Add a rule that serves index.html for every route: rewrites in vercel.json, a _redirects file on Netlify, try_files $uri /index.html on Nginx.Error page · DevOps, servers & cloud
- Fix "Resource not accessible by integration" in GitHub ActionsThe workflow’s GITHUB_TOKEN is not allowed to make the requested call (comment on a PR, push, create a release…). Declare the needed permissions with a permissions: block in the workflow, for example contents: write or pull-requests: write; for a pull request from a fork, the token stays read-only.Error page · DevOps, servers & cloud
- Fix "Certbot failed to authenticate some domains" (Let’s Encrypt, Timeout during connect, acme-challenge 404)Let’s Encrypt could not verify that you control the domain: it did not reach your server on port 80 (Timeout during connect), or it found something other than the validation file there (Invalid response … 404). Check that DNS points to this server (A and AAAA), that port 80 is open from the internet, then run sudo certbot --nginx -d example.com again.Error page · DevOps, servers & cloud
- Fix "413 Request Entity Too Large" (Nginx, PHP, Express, Cloudflare)The request body (often an uploaded file) is larger than the server accepts. On Nginx the default limit is 1 MB: raise client_max_body_size, then align upload_max_filesize and post_max_size on the PHP side, or the express.json() limit on the Node side.Error page · DevOps, servers & cloud
- Fix "nginx: [emerg] bind() to 0.0.0.0:80 failed (98: Address already in use)"Another program is already listening on port 80 (or 443): often Apache, a second Nginx instance started by hand, or a Docker container. Find it with sudo ss -ltnp 'sport = :80', stop it, then start Nginx with sudo systemctl start nginx.Error page · DevOps, servers & cloud
- Fix "upstream timed out (110: Connection timed out)" and 504 Gateway Time-out in NginxNginx did reach your application (PHP-FPM, Node, Python…), but it did not answer within the allowed time (60 seconds by default), so Nginx returns 504. The real fix is to find and speed up the slow request; raising proxy_read_timeout or fastcgi_read_timeout is only a complement for legitimate long jobs.Error page · DevOps, servers & cloud
- Fix "pull access denied for …, repository does not exist or may require docker login"Docker did not find the image locally and could not download it: its name does not exist on the registry, or it is private and you are not logged in. Check the full name (registry/account/image:tag), build the image if it is local (docker build -t myapp .), or log in with docker login.Error page · Docker & DevOps
- Fix "error: src refspec main does not match any" on git pushThe branch you want to push does not exist locally: either you have not made any commit yet, or your branch is called master, not main. Make a first commit, rename the branch with git branch -M main, then run git push -u origin main.Error page · Git & GitHub
- Fix "fatal: not a git repository (or any of the parent directories): .git"Git cannot find a .git folder in the current directory or any of its parents: you are not inside a repository. Move into the project folder (cd my-project), or create the repository with git init or git clone.Error page · Git & GitHub
- Fix "Android Gradle plugin requires Java 17 to run"Gradle runs with a JDK that is too old (often Java 11 or 8) while Android Gradle plugin 8 or later requires Java 17. Select a JDK 17 or newer as the Gradle JDK in Android Studio, or point JAVA_HOME to it on the command line (and flutter config --jdk-dir for Flutter).Error page · Mobile (Android, iOS)
- Fix "Command PhaseScriptExecution failed with a nonzero exit code" in XcodeA "Run Script" phase of the Xcode build (CocoaPods, React Native, Flutter…) exited with an error. This message is only the summary: open the full log of the phase in the Report navigator to read the real error, then fix it (often pod install, node not found or script sandboxing).Error page · Mobile (Android, iOS)
- Fix "Error(s) in loading state_dict" (size mismatch, Missing key(s)) in PyTorchThe checkpoint does not match the model architecture: layers of different sizes (1000 classes versus 10), keys prefixed with module. (DataParallel, DDP) or _orig_mod. (torch.compile), or a file holding the whole checkpoint (model_state_dict, optimizer_state_dict) instead of just the weights. Compare keys and shapes, then rebuild the model with the same hyperparameters, strip the prefix or load selectively.Error page · AI & LLMs
- Fix "The model … does not exist or you do not have access to it" (404 model_not_found)The API does not recognise the model name you sent, or your key (organization, project, workspace) is not allowed to use it. Typical causes: a typo, a retired model (gpt-4-32k, claude-3-5-sonnet-20241022) or a model reserved for some accounts. List the models your key can see with GET /v1/models and copy the exact ID.Error page · AI & LLMs
- Fix "lateinit property binding has not been initialized" in Kotlin (Android)You read a lateinit property before giving it a value. With ViewBinding, assign binding in onCreate() (Activity) or onCreateView() (Fragment) before any use; elsewhere, check the initialisation order, test ::binding.isInitialized or replace lateinit with by lazy or a nullable type.Error page · Java, Kotlin & .NET
- Fix "Object reference not set to an instance of an object" (NullReferenceException) in C#You use a member (method, property, indexer) of a variable that is null. Find the line shown in the stack trace, identify which reference is null with the debugger, then initialise it or handle the case with ?., ?? or an is null check; enable nullable reference types so the compiler warns you.Error page · Java, Kotlin & .NET
- Fix "java.lang.OutOfMemoryError: Java heap space" (and GC overhead limit exceeded)The JVM has no room left in its heap to create an object. If the need is legitimate, raise the maximum size with -Xmx (or org.gradle.jvmargs for a Gradle build); if memory keeps climbing and never drops, it is a leak: take a heap dump with -XX:+HeapDumpOnOutOfMemoryError and analyse it.Error page · Java, Kotlin & .NET
- Fix "Failed to configure a DataSource: 'url' attribute is not specified" in Spring BootSpring Boot sees a database starter (JPA or JDBC) but finds neither spring.datasource.url nor an embedded database. Add your database URL, user and driver to application.properties, activate the right profile if the configuration lives in application-dev.properties, or remove the starter if the application needs no database.Error page · Java, Kotlin & .NET
- Fix "Web server failed to start. Port 8080 was already in use" in Spring BootAnother program is already listening on port 8080, often a previous instance of your application still running in the IDE. Find it with lsof -i :8080 (macOS / Linux) or netstat -ano | findstr :8080 (Windows) and stop it, or change the port with server.port=8081.Error page · Java, Kotlin & .NET
- Fix "Could not resolve all files for configuration" and "Could not find" in GradleGradle could not find a dependency in any of the declared repositories. Check that the group:name:version coordinates really exist, that the right repository (google(), mavenCentral(), JitPack…) is declared in settings.gradle.kts, then turn off offline mode and run again with --refresh-dependencies.Error page · Java, Kotlin & .NET
- Fix "UnsupportedClassVersionError: compiled by a more recent version of the Java Runtime"The code was compiled for a newer Java version than the one running it (here class 65 = Java 21, JVM 61 = Java 17). Run it with a JDK at least as recent (fix JAVA_HOME and the IDE JDK), or recompile for the older version with --release, the Gradle toolchain or maven.compiler.release.Error page · Java, Kotlin & .NET
- Fix "java.lang.NullPointerException: Cannot invoke … because … is null" in JavaYou call a method or read a field on a reference that is null. Since Java 14, the message tells you exactly which expression was null: read the "because … is null" part and the first at line of your own code, then initialise the value or handle the null case before using it.Error page · Java, Kotlin & .NET
- Fix "error: subprocess-exited-with-error" and "Failed building wheel" with pippip did not find a prebuilt wheel for your Python version, OS or CPU, so it tried to compile the package from source and the build failed (missing compiler, headers or Rust). "subprocess-exited-with-error" is only the wrapper: the real cause is higher up in the log. Most of the time, using a Python version the package ships wheels for, or a newer version of the package, is enough; otherwise, install the build tools.Error page · Python
- Fix "ValueError: invalid literal for int() with base 10" in Pythonint() received a string that is not a whole number: text, an empty string '', a decimal '3.5' or a thousands separator '1,234'. Look at the quoted value at the end of the message, then clean or validate the data before converting: try/except ValueError, int(float(s)) for a decimal, .replace() for separators.Error page · Python
- Fix "Call to a member function … on null" in PHP and LaravelYou are calling a method (->update()) on a variable that is null. In Laravel it is almost always a query that found nothing (first(), find() return null), an empty relation or auth()->user() for a guest. Use findOrFail() / firstOrFail() to return a clean 404, or handle the null case with an if or the ?-> operator.Error page · PHP & Laravel
- Fix "Warning: Undefined array key" in PHP 8 (formerly "Undefined index")You are reading $array['email'] while that key does not exist in the array. Since PHP 8.0 this is a Warning (before: the "Undefined index" notice), and Laravel turns it into an ErrorException that stops the request. Check the key with isset() or array_key_exists(), or provide a default value: $email = $_POST['email'] ?? '';.Error page · PHP & Laravel
- Fix net::ERR_BLOCKED_BY_CLIENT (ad blocker, analytics, "ads" files)The request never left: a browser extension (uBlock Origin, AdBlock, Privacy Badger) or Brave Shields blocked it because its URL looks like advertising or tracking. Check in a private window without extensions, rename your own files and routes containing ads, banner or track, and make your site resilient to missing analytics scripts.Error page · Web, HTML & CSS
- Fix "ResizeObserver loop completed with undelivered notifications"A ResizeObserver callback changed the size of an observed element during the same frame, and the browser postponed the remaining notifications to the next frame. It is usually harmless: nothing breaks for the user. If the code is yours, apply the change inside requestAnimationFrame; if it comes from a library, filter this message in the dev overlay, Cypress and Sentry.Error page · Web, HTML & CSS
- Fix "Your connection is not private" NET::ERR_CERT_DATE_INVALID and ERR_CERT_AUTHORITY_INVALIDThe browser rejects the site HTTPS certificate. ERR_CERT_DATE_INVALID: expired certificate or wrong computer clock. ERR_CERT_AUTHORITY_INVALID: self-signed certificate or incomplete chain. On your server, renew the certificate (certbot renew) and serve fullchain.pem; locally, create a trusted certificate with mkcert.Error page · Web, HTML & CSS
- Fix ERR_TOO_MANY_REDIRECTS "redirected you too many times" (redirect loop)The server redirects the page to a URL that in turn redirects back to the first one, forever. The number one cause is Cloudflare in "Flexible" SSL mode with a server that forces HTTPS: switch Cloudflare to "Full (strict)". Otherwise, look for two conflicting rules (HTTP/HTTPS, www/non-www, login) with curl -IL.Error page · Web, HTML & CSS
- Fix "Refused to execute inline script because it violates the following Content Security Policy directive"The page Content Security Policy only allows scripts loaded from files on your domain (script-src 'self'), so the browser blocks every <script> written in the HTML and every onclick attribute. Move the code to a .js file, or allow that specific script with a nonce or a hash; only add 'unsafe-inline' as a last resort.Error page · Web, HTML & CSS
- Fix "Failed to load module script: Expected a JavaScript module script … MIME type of text/html" (Vite, SPA)The browser requested a JavaScript file (type="module") and the server sent back index.html. On a deployed Vite app, it is almost always the base option not matching the subfolder, assets/ files missing after a new deployment, or a SPA fallback rule returning index.html instead of a 404.Error page · Web, HTML & CSS
- Fix "Refused to apply style … MIME type ('text/html') is not a supported stylesheet MIME type"The browser requested your CSS file but received an HTML page, almost always a 404 page or a SPA home page returned instead of a missing file. Open the CSS URL in a tab: fix the path (often a relative path to make absolute with /) or make the server send the file with Content-Type: text/css.Error page · Web, HTML & CSS
- Fix "Mixed Content: … requested an insecure resource" (HTTPS mixed content)Your page is served over HTTPS but loads a script, stylesheet, API call or form over http://, and the browser blocks that request. Replace the http:// URLs with https:// (or relative paths) and, behind a proxy or Cloudflare, make the application aware it runs over HTTPS so it generates the right URLs.Error page · Web, HTML & CSS
- Fix "ReferenceError: x is not defined" ($, require, process, window)The name you use does not exist in any reachable scope: a variable never declared, a script not loaded yet (jQuery $), a Node.js global used in the browser (require, process) or a browser global run on the server (window, document). Declare or import the name, load the script first, or use the environment equivalent (import, import.meta.env).Error page · JavaScript & Node.js
- Fix "TypeError: x is not a function" in JavaScriptYou are calling with () a value that is not a function: here data.map does not exist because data is not an array (often an object that wraps the array, an unparsed JSON string or undefined). Print the real type of the value, then fix its source: the right response field, the right import, the right method name.Error page · JavaScript & Node.js
24
- Text diffCompare two versions line by line: additions, deletions, invisible whitespace.Tool
- HTTP status codesAll the common HTTP codes (401, 403, 404, 419, 429, 500, 502…): meaning, causes and what to do.Tool
- JWT decoderDecode a JWT: header, payload, readable expiry dates and whether the token has expired.Tool
- Regex testerTest a regular expression live: highlighted matches, groups, replacement.Tool
- JSON validatorValidate, format and minify JSON, with the exact line and column of the error.Tool
- Error finderPaste an error message or a log: the tool recognises the error and opens the right fix.Tool
- Fix "App is damaged and can't be opened" on macOS (Gatekeeper)Gatekeeper is blocking a downloaded app whose signature is missing, invalid or modified. Download it again from the official website or the Mac App Store and check its signature with codesign and spctl. Only remove the quarantine attribute with xattr if you are sure the app comes from a trusted source.Error page · Systems (Windows, macOS, Linux)
- Fix "E: Could not get lock /var/lib/dpkg/lock-frontend" (apt, Ubuntu, Debian)Another program is already using apt or dpkg, most often automatic updates (unattended-upgrades) right after boot. Wait for it to finish or close the other package manager. Do not delete the lock files: while the process is running, that can corrupt the package database.Error page · Systems (Windows, macOS, Linux)
- Fix "/bin/bash^M: bad interpreter: No such file or directory"Your script has Windows line endings (CRLF): Linux reads #!/bin/bash followed by an invisible carriage return and looks for a program named /bin/bash\r, which does not exist. Convert the file to LF with dos2unix or sed, then prevent it from coming back with a .gitattributes and the right editor setting.Error page · Systems (Windows, macOS, Linux)
- Fix "user is not in the sudoers file. This incident will be reported."Your account is not allowed to use sudo: it is neither in the admin group (sudo on Debian and Ubuntu, wheel on Fedora, RHEL and Arch) nor in a rule in /etc/sudoers. Log in as root, add the user to the group with usermod -aG, then log out and back in.Error page · Systems (Windows, macOS, Linux)
- Fix "SSL certificate problem: unable to get local issuer certificate" (git, curl, pip, npm)The tool cannot find, in its certificate store, the authority that signed the server's certificate. In a company, it is almost always a proxy or antivirus inspecting HTTPS with its own root certificate. Add that root certificate to the system or tool store; do not disable SSL verification.Error page · Systems (Windows, macOS, Linux)
- Fix "xcrun: error: invalid active developer path" on macOSApple's Command Line Tools (CLT) are missing or broken, often after a macOS update, while git, make or clang depend on them. Run xcode-select --install to reinstall them; if macOS says they are already installed, delete the /Library/Developer/CommandLineTools folder and run the install again.Error page · Systems (Windows, macOS, Linux)
- Fix "running scripts is disabled on this system" in PowerShellPowerShell's execution policy blocks .ps1 files, including those from npm, yarn or a Python venv's Activate.ps1. The recommended fix is Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Scope CurrentUser: your local scripts run, and downloaded scripts must be signed or unblocked.Error page · Systems (Windows, macOS, Linux)
- Fix "command not found" and "is not recognized as an internal or external command"The shell cannot find any executable with that name in the folders listed in the PATH variable. Either the program is not installed, its folder is not in PATH, or the terminal was opened before the install. Check with which or where, add the right folder to PATH, then open a new terminal.Error page · Systems (Windows, macOS, Linux)
- Fix "OSError: [Errno 121] Remote I/O error" with I2C on Raspberry PiThe I2C bus is open, but no device answered at the requested address. Run i2cdetect -y 1 to see the module's real address, then check the SDA/SCL wiring, the common ground and the 3.3 V supply. If /dev/i2c-1 does not exist, enable I2C in raspi-config first.Error page · Electronics & Arduino
- Fix "Sketch too big" on Arduino and ESP32 (flash memory full)The compiled program does not fit in the board's available flash memory, so the IDE refuses to upload it. Remove debug code and heavy libraries, swap the biggest parts for lighter ones, and on ESP32 pick a partition scheme with a larger app partition.Error page · Electronics & Arduino
- Fix "error: 'x' was not declared in this scope" (Arduino, C++)The compiler meets a name it does not know at that point in the code. It is almost always a typo or wrong case, a variable declared in another function, a missing #include or library, or a wrong board selection that does not define that name (such as LED_BUILTIN).Error page · Electronics & Arduino
- Fix "Guru Meditation Error: Core 1 panic'ed (LoadProhibited)" on ESP32The ESP32 crashed on a CPU exception and reboots: with LoadProhibited, the program read an invalid memory address, most often through a null pointer. Decode the backtrace to get the faulty file and line, then fix the pointer, the task stack size or the out-of-bounds access.Error page · Electronics & Arduino
- Fix "can't open device /dev/ttyUSB0: Permission denied" (Arduino, ESP32)On Linux, your user is not allowed to open the serial port. Add it to the dialout group (or uucp on Arch), then log out and back in. If the port does not exist at all, it is a cable, driver (CH340, CP210x) or port name issue.Error page · Electronics & Arduino
- Fix "Brownout detector was triggered" on ESP32The ESP32 supply voltage dropped below the safety threshold, so the chip resets to protect itself. The cause is almost always electrical: weak USB port or cable, undersized regulator, current spike when Wi-Fi starts. Fix the power supply and add a capacitor rather than disabling the detector.Error page · Electronics & Arduino
- Fix "Failed to connect to ESP32" (Wrong boot mode, No serial data received)esptool could not put the ESP32 into download mode: the chip booted its normal program instead of waiting to be flashed. Hold the BOOT button during "Connecting...", check the cable and port, and lower the upload speed if needed.Error page · Electronics & Arduino
- Fix "avrdude: stk500_getsync(): not in sync" on Arduinoavrdude cannot talk to the board's bootloader, so the upload fails before anything is written. Most of the time, selecting the right board and port, choosing "ATmega328P (Old Bootloader)" for a Nano clone, or disconnecting whatever is wired to pins 0 and 1 fixes it.Error page · Electronics & Arduino
- Fix "ERROR: relation "users" does not exist" (PostgreSQL)PostgreSQL cannot find the table: it was not created in this database (migrations not run), you are connected to another database, it lives in a schema missing from search_path, or it was created with quoted capital letters ("Users"). Check current_database() and SHOW search_path;, look for the table with \dt *.users, then run the migrations or qualify the name.Error page · Databases (SQL)
- Fix "ERROR 1054 (42S22): Unknown column in 'field list'" (MySQL)The query uses a column that does not exist in the target table: migration not run on this database, a typo, a wrong alias, or a value wrapped in backticks instead of single quotes. Check the real structure with SHOW COLUMNS FROM users;, run the missing migrations, then fix the name or the quotes in the query.Error page · Databases (SQL)