• Also before flashing, its a good idea to erase the firmware entirely. I use something like:

    esptool.py --port [insert_port_here] erase_flash
    
    

    if you're using esptool. I noticed that the ESP32 was more sensitive to this issue (requiring the flash to be erased before uploading the firmware) than the ESP8266.

About