Esp32 integration problems

Hey everyone, all of the sudden I’ve been having some issues trying to connect esp32’s to HA. This specific one is a devkitc, and i flash esphome via web.esphome per usual. However when I try to adopt it into home assistant, I get this error. Tried on two brand new esp’s, same thing. Any help would be greatly appreciated

INFO Reading configuration /config/esphome/esphome-web-113150.yaml...
INFO Generating C++ source...
INFO Compiling app...
Processing esphome-web-113150 (board: esp32dev; framework: arduino; platform: platformio/espressif32 @ 5.2.0)
--------------------------------------------------------------------------------
Library Manager: Installing esphome/AsyncTCP-esphome @ 1.2.2
INFO Installing esphome/AsyncTCP-esphome @ 1.2.2
Unpacking  [####################################]  100%
Library Manager: [email protected] has been installed!
INFO [email protected] has been installed!
Library Manager: Installing esphome/ESPAsyncWebServer-esphome @ 2.1.0
INFO Installing esphome/ESPAsyncWebServer-esphome @ 2.1.0
Unpacking  [####################################]  100%
Library Manager: [email protected] has been installed!
INFO [email protected] has been installed!
Library Manager: Resolving dependencies...
INFO Resolving dependencies...
Library Manager: Installing esphome/noise-c @ 0.1.4
INFO Installing esphome/noise-c @ 0.1.4
Unpacking  [####################################]  100%
Library Manager: [email protected] has been installed!
INFO [email protected] has been installed!
Library Manager: Resolving dependencies...
INFO Resolving dependencies...
Library Manager: Installing esphome/libsodium @ 1.10018.1
INFO Installing esphome/libsodium @ 1.10018.1
Unpacking  [####################################]  100%
Library Manager: [email protected] has been installed!
INFO [email protected] has been installed!
HARDWARE: ESP32 240MHz, 320KB RAM, 4MB Flash
 - toolchain-xtensa-esp32 @ 8.4.0+2021r2-patch3
LDF: Library Dependency Finder -> https://bit.ly/configure-pio-ldf
Dependency Graph
|-- AsyncTCP-esphome @ 1.2.2
|-- WiFi @ 2.0.0
|-- FS @ 2.0.0
|-- Update @ 2.0.0
|-- ESPAsyncWebServer-esphome @ 2.1.0
|   |-- AsyncTCP-esphome @ 1.2.2
|-- DNSServer @ 2.0.0
|-- ESPmDNS @ 2.0.0
|-- noise-c @ 0.1.4
|   |-- libsodium @ 1.10018.1
Compiling /data/esphome-web-113150/.pioenvs/esphome-web-113150/src/esphome/components/api/api_connection.cpp.o
Compiling /data/esphome-web-113150/.pioenvs/esphome-web-113150/src/esphome/components/api/api_frame_helper.cpp.o
Compiling /data/esphome-web-113150/.pioenvs/esphome-web-113150/src/esphome/components/api/api_pb2.cpp.o
Compiling /data/esphome-web-113150/.pioenvs/esphome-web-113150/src/esphome/components/api/api_pb2_service.cpp.o
Compiling /data/esphome-web-113150/.pioenvs/esphome-web-113150/src/esphome/components/api/api_server.cpp.o
Compiling /data/esphome-web-113150/.pioenvs/esphome-web-113150/src/esphome/components/api/list_entities.cpp.o
Compiling /data/esphome-web-113150/.pioenvs/esphome-web-113150/src/esphome/components/api/proto.cpp.o
Compiling /data/esphome-web-113150/.pioenvs/esphome-web-113150/src/esphome/components/api/subscribe_state.cpp.o
src/esphome/components/api/proto.cpp:91:1: internal compiler error: Segmentation fault
 }  // namespace esphome
 ^
Please submit a full bug report,
with preprocessed source if appropriate.
See <https://gcc.gnu.org/bugs/> for instructions.
*** [/data/esphome-web-113150/.pioenvs/esphome-web-113150/src/esphome/components/api/proto.cpp.o] Error 1
========================= [FAILED] Took 24.18 seconds =========================

It seems like I get a different error every time, now it’s this

HARDWARE: ESP32 240MHz, 320KB RAM, 4MB Flash
 - toolchain-xtensa-esp32 @ 8.4.0+2021r2-patch3
LDF: Library Dependency Finder -> https://bit.ly/configure-pio-ldf
Dependency Graph
|-- AsyncTCP-esphome @ 1.2.2
|-- WiFi @ 2.0.0
|-- FS @ 2.0.0
|-- Update @ 2.0.0
|-- ESPAsyncWebServer-esphome @ 2.1.0
|   |-- AsyncTCP-esphome @ 1.2.2
|-- DNSServer @ 2.0.0
|-- ESPmDNS @ 2.0.0
|-- noise-c @ 0.1.4
|   |-- libsodium @ 1.10018.1
Compiling /data/esphome-web-113150/.pioenvs/esphome-web-113150/src/esphome/components/network/util.cpp.o
Compiling /data/esphome-web-113150/.pioenvs/esphome-web-113150/src/esphome/components/ota/ota_backend_arduino_esp32.cpp.o
In file included from /data/cache/platformio/packages/framework-arduinoespressif32/cores/esp32/Arduino.h:166,
                 from /data/cache/platformio/packages/framework-arduinoespressif32/libraries/Update/src/Update.h:4,
                 from src/esphome/components/ota/ota_backend_arduino_esp32.cpp:8:
/data/cache/platformio/packages/framework-arduinoespressif32/cores/esp32/WString.h:27: internal compiler error: Segmentation fault
 #include <string.h>
 
Please submit a full bug report,
with preprocessed source if appropriate.
See <https://gcc.gnu.org/bugs/> for instructions.
*** [/data/esphome-web-113150/.pioenvs/esphome-web-113150/src/esphome/components/ota/ota_backend_arduino_esp32.cpp.o] Error 1
In file included from /data/cache/platformio/packages/toolchain-xtensa-esp32/xtensa-esp32-elf/include/c++/8.4.0/string:52,
                 from src/esphome/components/network/util.h:3,
                 from src/esphome/components/network/util.cpp:1:
/data/cache/platformio/packages/toolchain-xtensa-esp32/xtensa-esp32-elf/include/c++/8.4.0/bits/basic_string.h:6656:7: internal compiler error: Segmentation fault
       operator()(const wstring& __s) const noexcept
       ^~~~~~~~
Please submit a full bug report,
with preprocessed source if appropriate.
See <https://gcc.gnu.org/bugs/> for instructions.
*** [/data/esphome-web-113150/.pioenvs/esphome-web-113150/src/esphome/components/network/util.cpp.o] Error 1
========================== [FAILED] Took 6.97 seconds ==========================

I would be happy to pay someone to work this out with me, really like using these esp32’s

Looks like you’re getting a segmentation fault. That indicates that there’s probably nothing wrong with the ESP32s. Are you per chance running ESPHome on a Raspberry Pi? If yes, have you tried updating the firmware?

I found this earlier post that might help.

Hey thanks for the help, I’m running HASSIO on a dedicated always on computer, using a Virtualbox VM

Alright, then I’ll suggest you try and search for something like segmentation fault virtualbox and see where that leads you. :slight_smile: