EspHome stuck at compile step of esp32 on raspberry 3

I am trying to compile binaries for an esp32 module (MH-ET Live Esp32 Dev kit), using EspHome.
Unluckily the process get stack at the compile step, and the only think I can do is to restart the HASSIO but, disconnecting the RPi3 from the power outlet.

I am not sure what is causing the issue.
I have tried reinstalling the addon with no luck.
I was able to compile and upload firmwares before (with older versions of Hassio) with no problem.

Following is the log from EspHope Compile step:

Processing xiaomi_ble_esp32 (board: mhetesp32devkit; framework: arduino; platform: [email protected])
--------------------------------------------------------------------------------
Tool Manager: Installing platformio/tool-scons @ ~4.40001.0
Downloading  [####################################]  100%          
Unpacking  [####################################]  100%
Tool Manager: tool-scons @ 4.40001.0 has been installed!
Tool Manager: Removing tool-scons @ 3.30102.0
Tool Manager: tool-scons @ 3.30102.0 has been removed!
HARDWARE: ESP32 240MHz, 320KB RAM, 4MB Flash
PACKAGES: 
 - framework-arduinoespressif32 3.10004.200129 (1.0.4) 
 - tool-esptoolpy 1.20600.0 (2.6.0) 
 - toolchain-xtensa32 2.50200.80 (5.2.0)
Library Manager: Installing AsyncTCP-esphome @ 1.1.1
Library Manager: AsyncTCP-esphome @ 1.1.1 has been installed!
Library Manager: Installing ESPAsyncWebServer-esphome @ 1.2.7

Downloading  [############################--------]   80%
Downloading  [################################----]   90%
Downloading  [####################################]  100%
Library Manager: ESPAsyncWebServer-esphome @ 1.2.7 has been installed!
Library Manager: Installing dependencies...
Library Manager: Installing ESPAsyncTCP-esphome
Library Manager: ESPAsyncTCP-esphome @ 1.2.3 has been installed!
Library Manager: Installing Hash
Library Manager: Already installed, built-in library
Library Manager: Installing Hash
Library Manager: Already installed, built-in library
Dependency Graph
|-- <AsyncTCP-esphome> 1.1.1
|-- <ESPmDNS> 1.0
|   |-- <WiFi> 1.0
|-- <FS> 1.0
|-- <ESPAsyncWebServer-esphome> 1.2.7
|   |-- <AsyncTCP-esphome> 1.1.1
|   |-- <FS> 1.0
|   |-- <WiFi> 1.0
|-- <DNSServer> 1.1.0
|   |-- <WiFi> 1.0
|-- <Update> 1.0
|-- <WiFi> 1.0
Compiling /data/xiaomi_ble_esp32/.pioenvs/xiaomi_ble_esp32/src/esphome/components/api/api_connection.cpp.o
Compiling /data/xiaomi_ble_esp32/.pioenvs/xiaomi_ble_esp32/src/esphome/components/api/api_pb2.cpp.o
Compiling /data/xiaomi_ble_esp32/.pioenvs/xiaomi_ble_esp32/src/esphome/components/api/api_pb2_service.cpp.o
Compiling /data/xiaomi_ble_esp32/.pioenvs/xiaomi_ble_esp32/src/esphome/components/api/api_server.cpp.o

It proceeds very fast until the compilation of api_server.cpp.o, at the point the system freezes and the only thing I can do is to unplug the RPi3 and plug it back in to restart it.

Thanks a lot for your help

Possibly ESPhome freezes during compile

1 Like

Thanks a lot @nickrout. In the end I am compiling on my linux machine and simply write the esp32 using the USB port.

What I do, as I have the same issue, is restart home assistant just before compiling. If I do that, I will not freeze.

2 Likes

Thank you, I will try that