The ESP32 has a few problems when you are trying to upload new sketches or install the ESP32 add-on. This is the ESP32 troubleshooting guide for Arduino IDE.