A fatal error occurred: Failed to connect to ESP32
- ESP32
- ESP8266
You may see
Why it happens
- The board didn't switch to download mode.
- A charge-only cable, the wrong port, or another program using the port.
- Parts wired to GPIO 0, 2, 12, 15, RX or TX hold the board in the wrong mode.
How to fix it
- Press Upload. When you see "Connecting…", hold the BOOT button until writing starts.
- Take all wires off the board and try again.
- Check the port and try another cable, straight into the computer.
- Close the Serial Monitor.
- Lower Tools > Upload Speed to 115200.
It worked if: The last lines are "Hash of data verified" and "Hard resetting via RTS pin…".
Related errors
Tutorials where it can happen
- How to upload your first Code to ESP32 ?
- Building a Motion Detection System Using ESP32 and ESP-NOW
- Building an Automated Plant Watering System using ESP32
- Digital Input and Output with the ESP32
- Digital Inputs and Digital Outputs on the NodeMCU ESP8266
- ESP32 / ESP8266 - Realtime Database with Firebase
25 more
- ESP32 Async Web Server Code
- ESP32 BLE Server and Client with Arduino IDE
- ESP32 DHT11 Web Server: Show Temperature and Humidity
- ESP32 PIR Motion Sensor with Interrupts and Timers
- ESP32 PWM with Arduino IDE: LED Brightness Control
- ESP32 Web Server: Control LED Brightness with a Slider
- ESP32/ESP8266 Data Logging to Firebase with Login
- ESP8266 NodeMCU Relay: Control AC Appliances
- Getting Started with ESP8266 WiFi Transceiver
- How to make an ESP32 Web Server?
- How to make an ESP8266 Web Server?
- How to Read Analog Signals with the ESP32?
- How to use Bluetooth on the ESP32 ?
- How to use the BLE on the ESP32?
- Interfacing ESP32 with 16x2 LCD Displays
- Log DHT11 Data to Firebase Realtime Database: the Code
- Programming Environment for ESP32
- Pulse Width Modulation (PWM) with the ESP32
- Pulse Width Modulation with NodeMCU ESP8266
- Put Your Web Page on a Real ESP32
- Send Emails with ESP8266 NodeMCU
- Smart Plant Pot with ESP32 (IoT)
- Task Automation with Simple Timer using the ESP32
- What is a Web Socket Server?
- What is ESP32 development Board?
From the official documentation. Wording from the esptool 4.8 source and Espressif's troubleshooting page. Sources: Arduino ESP32: troubleshooting, Espressif esptool: troubleshooting.
Didn't help? Search another error or ask us.

