ESP32-S3-Box-3 Updating

My ESP32-S3-Box-3 has been wanting updating for some weeks. Since wifi updating has never worked for me on this device I always connect to USB for updating. Today I decided to finally update it but it won’t. Updating from within HA either from the settings page where the devices requiring updating are shown or from the ESPHome integration or for that matter from the ESPHome website always fails. When updating is attempted from within HA it appears the compilation is failing with this message “Failed to prepare configuration.” When updating from the ESPHome website it appears to complete the update, i.e. erasing and writing, but then returns to the Install or Logs & Console widget. I have changed the USB cable but it still fails and I cannot see that if it is erasing the device and then showing the progress ring that communication is the problem. Right now the device is offline with no display at all. Checking the install file through the ESPHome integration shows a successful result.

Update: I downloaded the current configuration from the repository, copied it to my HA-Yellow server, renamed old and new files and the “Failed to prepare configuration” popped up again.

HA Config:
Core: 2024.9.3
Supervisor: 2024.9.1

Updating the Box can be a hit and miss action. I have HA on a low end NUC and it often fails when compiling from within the ESPHome-addon. But in the end it works.

First start clean and clear the build cache
If you have like me a low power system then you can try this
The open the xaml and look for the esphome section and add compile_process_limit: 1

esphome:
  name: ${name}
  name_add_mac_suffix: false
  compile_process_limit: 1 # Helps when compiling on light weight systems
  friendly_name: ${friendly_name}

After that compile. It might give an error or telling you that a file is locked.
Just ignore it and retry. Files already compiled and up to date won’t be recompiled again and it will become easier for the build process. The Tensorflow part is the most intensive part and can take a lot of time. Up to 15 minutes or more.
But ounce completely compiled new updates won’t be this difficult to do.