If the ESP32 is new, you will need to flash the bootloader first. This is not required if you had an Arduino sketch running on it before. You can find the bootloader file in the assets for the 0.9.1 ...