Could not open COM…, the port is busy or doesn't exist
- ESP32
- ESP8266
You may see
Why it happens
- FileNotFoundError: the port doesn't exist, so the cable, driver or port choice is wrong.
- PermissionError / Access is denied: another program has it open.
How to fix it
- Read which of the two it is.
- Wrong door: unplug and replug, choose the port that appears, install the CP210x or CH340 driver if none does.
- Busy: close the Serial Monitor, other IDE windows and Python scripts, then replug.
It worked if: "Connecting…" appears after you press Upload.
Related errors
Tutorials where it can happen
- 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
- ESP32 Async Web Server Code
25 more
- 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 upload your first Code to 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?
Seen in a real run (some lines are close variants of it). Produced with esptool 4.8.1 on a port that doesn't exist; the access-denied line is Windows' usual wording. Sources: Espressif esptool: troubleshooting.
Didn't help? Search another error or ask us.

