Happened the same to me, after checking my connections I found that it was a loose wire between the USB-serial converter TX pin and the ESP32 RX pin.