esphome / issues

Issue Tracker for ESPHome
https://esphome.io/
291 stars 36 forks source link

Compilation error: MissingPackageManifestError for esp-idf framework since esphome version 2024.2.0b1 #6086

Open czikocz opened 3 months ago

czikocz commented 3 months ago

The problem

I have tried all esphome versions and compilations go well until and including version 2023.12.9. Compilation is impossible starting with version 2024.2.0b13 and newer for my Shelly devices (P1PM, P1 which use esp-idf framework), I am also unable to flash my new NSPanel with NSPanel_HA_Blueprint, which uses same framework.

I have tried number of possible workarounds for similar errors from past without success. This bug is clearly linked to esphome version for me - installing any 2024.x.x version results in the error which disappears with reinstallation of any older 2023.x.x. It does not matter if installation is fresh and clean, or only reinstalled in existing env. I have spent one day testing and this is getting frustrating.

Compilation ends up with error:

Processing 0-gar-zas-1-p1pm (board: esp32doit-devkit-v1; framework: espidf; platform: platformio/espressif32@5.4.0)
----------------------------------------------------------------------------------------------------------------
MissingPackageManifestError: Could not find one of 'package.json' manifest files in the package
Processing nspanel (board: esp32dev; framework: espidf; platform: platformio/espressif32@5.4.0)
----------------------------------------------------------------------------------------------------------------
MissingPackageManifestError: Could not find one of 'package.json' manifest files in the package

Which version of ESPHome has the issue?

2024.2.0b1 and newer

What type of installation are you using?

pip

Which version of Home Assistant has the issue?

No response

What platform are you using?

ESP32

Board

Shelly, NSPanel

Component causing the issue

platformio

Example YAML snippet

Shelly Plus 1 PM config:

esp32:
  board: esp32doit-devkit-v1
  framework:
    type: esp-idf
    sdkconfig_options:
      CONFIG_FREERTOS_UNICORE: y
      CONFIG_ESP32_DEFAULT_CPU_FREQ_160: y
      CONFIG_ESP32_DEFAULT_CPU_FREQ_MHZ: "160"

===================================================

NSPanel config:

esp32:
  board: esp32dev
  framework:
    type: esp-idf

Anything in the logs that might be useful for us?

No response

Additional information

No response

czikocz commented 3 months ago

One of the changes in version 2024.2.0b1 was platformio bump: Bump platformio from 6.1.11 to 6.1.13 https://github.com/esphome/esphome/pull/6086 by @dependabot[bot]

Problem does not seem to be caused by the platformio version itself though, 2023.12.9 works fine with 6.1.13...

czikocz commented 3 months ago

I was able to pinpoint the problem!

@kbx81 Problem is in following commit : https://github.com/esphome/esphome/commit/ec3162282cd5a2c3455dd7a8669b4f762c481a20

I tested on version 2024.2.0 + 2024.7.2 and changed esphome/init.py, line 229 to: RECOMMENDED_ESP_IDF_FRAMEWORK_VERSION = cv.Version(4, 4, 5)

Compilation suddenly works OK! For both Shellys and my NSPanel!