When flashing an ESP32 with 16MB flash chip, during flash of spiffs partition (~13MB) there is a long delay when the first block is written. This causes a time-out and results in the flash failing. Increasing the DEFAULT_TIMEOUT value from 3000 to 40000 fixes this problem. I found that the actual delay is around 25 seconds so a timeout of 40 seconds seems reasonable and probably doesn't make the user experience too much worse in cases where communication really does break down.
When flashing an ESP32 with 16MB flash chip, during flash of spiffs partition (~13MB) there is a long delay when the first block is written. This causes a time-out and results in the flash failing. Increasing the DEFAULT_TIMEOUT value from 3000 to 40000 fixes this problem. I found that the actual delay is around 25 seconds so a timeout of 40 seconds seems reasonable and probably doesn't make the user experience too much worse in cases where communication really does break down.