Need help with ESP32 device - Can't install anything

I bought MELIFE 2 Pack for ESP32 ESP-32 ESP-32S ESP32S for WeMos Mini D1 4 MB Flash WiFi Bluetooth Wireless Board Based ESP-WROOM-32 Dual Cores Mode CPU

I tried installing ESPHome on it through Home Assistant and I got the error:

Unable to compile the configuration

I then tried installing the Bluetooth Proxy and after a few seconds I get the error:

The device has been lost.

And I look at the logs I see the following log messages repeated over and over

rst:0x10 (RTCWDT_RTC_RESET),boot:0x13 (SPI_FAST_FLASH_BOOT)
invalid header: 0xffffffff
invalid header: 0xffffffff
invalid header: 0xffffffff
invalid header: 0xffffffff
invalid header: 0xffffffff
invalid header: 0xffffffff
invalid header: 0xffffffff
invalid header: 0xffffffff
ets Jul 29 2019 12:21:46

What am I doing wrong? How do I get ESPHome on this device?

Hard to tell without some info. Post your yaml. What sort of ESPHome are you running and what install method?

After choosing a different cable and rebooting my computer I was able to connect and install the Bluetooth Proxy.

I also had to force reset the device a few times.

In my experience USB cable Is very important. I went crazy with installation failing till I bought a better cable.

I had a 6ft cable I used to setup my ratgdo so I knew it worked. I found another that was 3ft that I used.

I also think I was impatient with connecting. Sometimes if the “connecting” box was taking too long I would refresh the browser. I think this held the connection open and a reboot was needed.

ESP Tool was the best tool for me. I was able to use it to verify I could connect to the device and that the device booted. After confirming with this I could then use ESPHome to connect to it to install firmware.