ESP32 error messages, explained
The Guru Meditation Errors, watchdog messages, reset reasons, WiFi disconnect reasons and esp_err_t codes an ESP32 prints: what each means, why it usually happens, and what to do.
Each page has the message exactly as the ESP32 prints it, what it means, the usual causes and how to find the line in your code. All of it from ESP-IDF's panic handler and Espressif's own guides.
Guru Meditation Errors
LoadProhibited
Guru Meditation Error: Core 0 panic'ed (LoadProhibited) means the firmware read from an invalid address, usually through a NULL or uninitialized pointer. How to find the line and fix it.StoreProhibited
Guru Meditation Error: Core 0 panic'ed (StoreProhibited) means the firmware wrote to an invalid address: a NULL pointer, a stale pointer or an array index past the end. How to find it.InstrFetchProhibited
InstrFetchProhibited means the ESP32 jumped to an address with no code: a NULL or corrupted function pointer, or a return address overwritten on the stack. How to find which.IllegalInstruction
IllegalInstruction on the ESP32: a FreeRTOS task that returned, a C++ function missing its return, flash pins reused, or a bad function pointer. How to tell which one it is.Interrupt wdt timeout on CPU0
Guru Meditation Error: Core 0 panic'ed (Interrupt wdt timeout on CPU0) means interrupts were blocked too long: a slow ISR, a long critical section, or code waiting with interrupts off.Cache disabled but cached memory region accessed
Guru Meditation Error: Core 0 panic'ed (Cache error)… Cache disabled but cached memory region accessed: an interrupt ran code or read data from flash while flash was being written. Fix with IRAM_ATTR.
Other errors and restarts
Task watchdog got triggered
E (…) task_wdt: Task watchdog got triggered. The following tasks/users did not reset the watchdog in time: IDLE0 (CPU 0). Which task starved it, and how to fix it without just raising the timeout.Stack canary watchpoint triggered
Debug exception reason: Stack canary watchpoint triggered (task), or ***ERROR*** A stack overflow in task has been detected: a FreeRTOS task ran out of stack. How to size it.CORRUPT HEAP: Bad head
CORRUPT HEAP: Bad head at 0x3ffb… Expected 0xabba1234 got … then abort(): a buffer overrun or a use after free on the heap. How to catch the code that did it.Brownout detector was triggered
Brownout detector was triggered, then a reset (rst:0xf on the ESP32): the supply voltage dipped, usually when WiFi starts transmitting. What to change in the power supply, not in the code.rst:0xc (SW_CPU_RESET)
What the rst:0x… line at ESP32 boot means: POWERON_RESET, SW_CPU_RESET after a panic, TG0WDT/TG1WDT watchdog resets, RTCWDT_BROWN_OUT_RESET, DEEPSLEEP_RESET. The full table.
Flashing and uploading
- "Failed to connect to ESP32: No serial data received"
esptool cannot reach the chip: "Failed to connect to ESP32: No serial data received" (or "Timed out waiting for packet header" in older versions). The cable, the port, the boot mode and power, in the order to check them. - ESP32 "Wrong boot mode detected! The chip needs to be in download mode"
esptool saw the ESP32 boot normally instead of into download mode: GPIO0 (GPIO9 on the C3/C6) was not low at reset. Why the auto-reset failed, and how to enter download mode by hand. - esptool "Invalid head of packet: Possible serial noise or corruption"
esptool got bytes from the ESP32 that are not its protocol: a bad cable, noise, a flash pin shorted on a breadboard, or a brownout. Also "Packet content transfer stopped". What to try. - "Could not open port, the port is busy or doesn't exist"
esptool cannot open the serial port: another program has it open, the board is on another port, or (on Linux) your user lacks permission. How to find which.
WiFi disconnects
- ESP32 WiFi reason 201: NO_AP_FOUND
WIFI_REASON_NO_AP_FOUND (201): the ESP32 scanned and did not find the SSID. Usually a 5 GHz network, a typo, a hidden SSID or the wrong password setting. How to tell which. - ESP32 WiFi reason 15 and 204: handshake timeout
WIFI_REASON_4WAY_HANDSHAKE_TIMEOUT (15) and WIFI_REASON_HANDSHAKE_TIMEOUT (204) on the ESP32: most often a wrong WiFi password, otherwise a signal too weak to finish the handshake. - ESP32 WiFi reason 200: BEACON_TIMEOUT
WIFI_REASON_BEACON_TIMEOUT (200): the ESP32 stopped hearing its access point and disconnected. A weak or noisy signal, an access point that restarted, or power and antenna problems. - ESP32 WiFi reason 202: AUTH_FAIL
WIFI_REASON_AUTH_FAIL (202): authentication failed, but not by timing out. Usually the security mode, MAC filtering, or an access point with too many clients. What to check. - ESP32 WiFi reason 210: NO_AP_FOUND_W_COMPATIBLE_SECURITY
WIFI_REASON_NO_AP_FOUND_W_COMPATIBLE_SECURITY (210): the ESP32 found the SSID but its security does not match the station config: open vs secured, WPA3/SAE, PMF, Enterprise. - ESP32 WiFi reason 2: AUTH_EXPIRE
WIFI_REASON_AUTH_EXPIRE (2) on the ESP32: authentication timed out while connecting, or the access point dropped the station. On an ESP32 soft-AP: a client silent for five minutes. - ESP32 WiFi reason 8: ASSOC_LEAVE
WIFI_REASON_ASSOC_LEAVE (8) on the ESP32: reported when esp_wifi_disconnect() or WiFi.disconnect() is called, or when the access point sends it. Often a reconnect loop in your own code. - ESP32 WiFi disconnect reasons
Every WIFI_REASON code the ESP32 reports on disconnect, from 1 (UNSPECIFIED) to 212 (NO_AP_FOUND_IN_RSSI_THRESHOLD), with what it means and the common ones explained.
esp_err_t codes
- ESP_ERR_NVS_NO_FREE_PAGES and ESP_ERR_NVS_NEW_VERSION_FOUND
nvs_flash_init() returns ESP_ERR_NVS_NO_FREE_PAGES (0x110d) or ESP_ERR_NVS_NEW_VERSION_FOUND (0x1110): the NVS partition is full, truncated or written by a newer ESP-IDF. Erase and init, and what you lose. - ESP_ERR_NO_MEM (0x101) on the ESP32
ESP_ERR_NO_MEM (0x101): an allocation failed. Often there is enough free heap, but not in one block, or not of the kind needed (internal, DMA). How to measure it and what to change. - ESP_ERR_INVALID_STATE (0x103) on the ESP32
ESP_ERR_INVALID_STATE (0x103): the function was called when the driver or component was not ready, or already set up. Examples: GPIO ISR service already installed, WiFi not started. - ESP_ERR_OTA_VALIDATE_FAILED (0x1503)
esp_ota_write or esp_ota_end returns ESP_ERR_OTA_VALIDATE_FAILED (0x1503): not an app image (a merged or bootloader binary), a truncated download, or a secure boot signature that does not verify. - ESP32 esp_err_t error codes
Look up an ESP-IDF error code: every esp_err_t from 0x101 ESP_ERR_NO_MEM to the NVS, WiFi, OTA, HTTP, TLS and flash codes, with hex and decimal values and what each means.
Decode a crash now
Paste the crash and drop in the ELF: the free ESP32 exception decoder and core dump decoder run in your browser and send nothing anywhere.
When it happens in the field
On your desk the crash prints to the serial monitor. On a device in someone else's building it prints to a port nobody is reading, the chip restarts, and all you hear is that it "sometimes hangs". Pinscope keeps the panic reason and backtrace across the restart, sends them on the next connection and decodes them with the ELF of the build that crashed, so you get the function and line without anyone at the device. Free for three devices. How crash reporting from the field works.
More
- Remote access to an ESP32 without TLS: what it measured and what it costs
- Reaching an ESP32 web server from outside its network
- Updating ESP32 firmware over the internet, with rollback
- Guru Meditation Error: decoding the backtrace, and crashes from the field
- Remote logging: ESP_LOG without a serial cable
- Heap and stack monitoring in the field
- An ESP32 behind CGNAT, 4G or Starlink
- TLS memory usage on the ESP32, and how to reduce it
- Sharing an ESP32 sensor page with anyone, without port forwarding
- ArduinoOTA over the internet, with a rollback
- ESP32 remote access compared: port forwarding, ngrok, Cloudflare Tunnel, Tailscale
- esp_http_server slow? The 250 ms delay and the fix
- Before the first ESP32 ships: a field support checklist
- ESP32 exception decoder: a Guru Meditation backtrace to lines, in the browser