Possible Bug - - wifi.enable causes core 0 to panic after update to 2026.6 (when ESPNow is active)

Hi folks,
Just want to check this isn't something I've done wrong here.

Currently the wifi is set as follows

wifi:
  id: ota_connectivity
  ssid: !secret wifi_ssid
  password: !secret wifi_password
  enable_on_boot: False
  reboot_timeout: 0s
  min_auth_mode: WPA3

ESPNow is also present, and does initialise on boot.

espnow:
  id: espnow_out
  peers:
    - ${peer_mac}
  channel: 1
  enable_on_boot: True

(note, this is a file that runs on two identical devices, hence the substitution).

This leads into packet_transport which then manages sending all the stuff out (standard setup).

We have a script that triggers when the receiver over packet transport sends a value back on a specific sensor (linked to a template switch on the reciever).

  - id: ota_prepare
    mode: single
    then:
      - if: 
          condition:
            - lambda: |-
                return cycles_rtc == 1 && is_cold_boot;
          then:
            - script.stop: ota_prepare
      - deep_sleep.prevent: deep_sleep_control
      - delay: 1000ms
      - component.suspend: packet_link
      - wifi.enable
      - delay: 500ms
      - wait_until:
          condition:
            - lambda: |-
                return id(ota_connectivity).is_connected();
      - delay: 1000ms
      - if:
          condition:
            - lambda: |-
                return id(ota_requested).has_state() && id(ota_requested).state > 0.5;
          then:
            - ota.http_request.flash:
                md5_url: http://192.168.1.66/${device_name}.ota.bin.md5
                url: http://192.168.1.66/${device_name}.ota.bin

Prior to 2026.6.0, this worked absolutely fine.
But now:

[13:00:12][V][wifi_esp32:783]: Connected ssid='IoT' bssid=[MAC] channel=1, authmode=WPA3 PSK
[13:00:14]Guru Meditation Error: Core  0 panic'ed (InstrFetchProhibited). Exception was unhandled.
[13:00:14]
[13:00:14]Core  0 register dump:
[13:00:14]PC      : 0x00000000  PS      : 0x00060a30  A0      : 0x800f30c1  A1      : 0x3ffcd150  
[13:00:14]A2      : 0x3ffd42cc  A3      : 0x3ffd4604  A4      : 0x0000002a  A5      : 0x3ffd590c  
[13:00:14]A6      : 0x3ffb2734  A7      : 0x3ffd4fa8  A8      : 0x8015979c  A9      : 0x3ffcd130  
[13:00:14]A10     : 0x3ffd4fa8  A11     : 0x3ffd42cc  A12     : 0x3ffd4fa8  A13     : 0x3ffd590c  
[13:00:14]A14     : 0x3ffcd2fc  A15     : 0x3ffd4604  SAR     : 0x0000001b  EXCCAUSE: 0x00000014  
[13:00:14]EXCVADDR: 0x00000000  LBEG    : 0x4000c2e0  LEND    : 0x4000c2f6  LCOUNT  : 0xffffffff  
[13:00:14]
[13:00:14]
[13:00:14]Backtrace: 0xfffffffd:0x3ffcd150 0x400f30be:0x3ffcd170 0x40088a85:0x3ffcd1a0 0x4008ca73:0x3ffcd1c0 0x4008cb29:0x3ffcd220 0x40091221:0x3ffcd240 0x4008e0df:0x3ffcd260

We do also have a single .h file that just sets RTC variables to hold in memory across deep sleeps. This device wakes up to just throw out humidity/temperature and then goes back to sleep for a defined amount of time unless the OTA switch is flicked on the receiver. These variables are just the previous humidity/temperature so it can calculate whether it needs to send out (ie. if it's changed too much) and a few other little bits. Nothing that relates to these scripts/the wifi.

My thought here is a bug. Possibly linked the wifi driver no longer taking up RAM if enable_on_boot is set to false?

IDF version is set to recommended. Version is 2026.6.2 (at present, flashed via USB). Issue persisted across all the 2026.6.x versions so far. Device is a classic non-variant ESP32 (Firebeetle 2 ESP32-E).

Is there a simple solution I'm not seeing? I would put this on the issues on ESPHome's GitHub, but never done that before, so don't want to throw something on there that is something stupid I'm missing.

Thanks :slight_smile:

Timestamp points to ota.http_request.flash, but you could add long delay and log print before to confirm that.

Or you could dig the decoded backtrace.

[19:45:19.798][V][wifi_esp32:783]: Connected ssid='IoT' bssid=[mac] channel=1, authmode=WPA3 PSK
[19:45:22.792]Guru Meditation Error: Core  0 panic'ed (InstrFetchProhibited). Exception was unhandled.

[19:45:22.795]Core  0 register dump:
[19:45:22.803]PC      : 0x00000000  PS      : 0x00060a30  A0      : 0x800f2dbd  A1      : 0x3ffcd140  
[19:45:22.812]A2      : 0x3ffd432c  A3      : 0x3ffd41a4  A4      : 0x0000002a  A5      : 0x3ffd5c58  
[19:45:22.820]A6      : 0x3ffb9370  A7      : 0x3ffd55a0  A8      : 0x80159484  A9      : 0x3ffcd120  
[19:45:22.826]A10     : 0x3ffd55a0  A11     : 0x3ffd432c  A12     : 0x3ffd55a0  A13     : 0x3ffd5c58  
[19:45:22.834]A14     : 0x3ffcb220  A15     : 0x3ffd41a4  SAR     : 0x00000019  EXCCAUSE: 0x00000014  
[19:45:22.842]EXCVADDR: 0x00000000  LBEG    : 0x4000c2e0  LEND    : 0x4000c2f6  LCOUNT  : 0xffffffff  


[19:45:22.856]Backtrace: 0xfffffffd:0x3ffcd140 0x400f2dba:0x3ffcd160 0x40088a85:0x3ffcd190 0x4008ca73:0x3ffcd1b0 0x4008cb29:0x3ffcd210 0x40091221:0x3ffcd230 0x4008e0df:0x3ffcd250
WARNING Found stack trace! Trying to decode it
WARNING Decoded 0x400f2dba: esp_netif_receive at /COMPONENT_ESP_NETIF_DIR/lwip/esp_netif_lwip.c:1403
WARNING Decoded 0x40088a85: wifi_sta_receive at /COMPONENT_ESP_WIFI_DIR/src/wifi_netif.c:39
WARNING Decoded 0x4008ca73: sta_input
WARNING Decoded 0x4008cb29: sta_rx_cb
WARNING Decoded 0x40091221: ppRxPkt
WARNING Decoded 0x4008e0df: ppTask

Is what we got? I assume that points to WiFi?

This is little bit out of my competences, but yes it looks like wifi is the problem, not ota flash. Try to comment out everything after wifi.enable to see if it crashes .

Crashes with the same stack trace unfortunately. Assuming it's WiFi. I've put an issue on GitHub.

Thanks for directing me to how to get the backtrace decoded, somehow missed that part of the documentation :slight_smile:

At least you can describe the issue with decent details, helps a lot for developers. Hopefully your issue gets resolved soon by more skilled people.