esphome / issues

Issue Tracker for ESPHome
https://esphome.io/
290 stars 34 forks source link

Error: The program size is greater than maximum allowed. But worked on version 2022.10 #4057

Open quizzical86 opened 1 year ago

quizzical86 commented 1 year ago

The problem

I updated ESPHOME to 2022.12 and wanted to upgrade my devices. However one of them can't compile and generates the error: Error: The program size (1874625 bytes) is greater than maximum allowed (1835008 bytes)

On ESPHome version 2022.10.2 the YAML compiled just fine. I wonder whether the issue is due to the changes in the flash partition table in version 2022.12? I understand those are for the bluetooth proxy and I am using that. Is there a way I could solve this issue?

Which version of ESPHome has the issue?

2022.12.4

What type of installation are you using?

Home Assistant Add-on

Which version of Home Assistant has the issue?

2023.1.4

What platform are you using?

ESP32

Board

MH-ET LIVE D1 mini ESP32

Component causing the issue

No response

Example YAML snippet

No response

Anything in the logs that might be useful for us?

Linking /data/kamerlo/.pioenvs/kamerlo/firmware.elf
Error: The program size (1874625 bytes) is greater than maximum allowed (1835008 bytes)
RAM:   [==        ]  18.6% (used 61000 bytes from 327680 bytes)
Flash: [==========]  102.2% (used 1874625 bytes from 1835008 bytes)
*** [checkprogsize] Explicit exit, status 1
========================= [FAILED] Took 399.23 seconds

Additional information

No response

quizzical86 commented 1 year ago

Could this change be the cause of my problem? https://github.com/esphome/esphome/pull/4171

jgracio commented 1 year ago

Here same error without any code change

quizzical86 commented 1 year ago

The only solution I found was to cut parts of my code, e.g. the logger functionality so no more checking the logs for issues :-(

marek-vrana commented 1 year ago

same here, using nspanel with ble proxy configuration. Program is too big to fit even with the minimal features and no logging. Before it worked without any issues.

lukin79 commented 1 year ago

Same issue w/o code change. Quite annoying.

elik745i commented 1 year ago

same thing: Error: The program size (1939513 bytes) is greater than maximum allowed (1835008 bytes)

toomone commented 1 year ago

Also same with Home Assistant 2023.7.3 and ESPHome v2023.2.2 :

Linking .pioenvs/irrigation-controller/firmware.elf
RAM:   [====      ]  43.2% (used 35388 bytes from 81920 bytes)
Flash: [==========]  106.6% (used 532625 bytes from 499696 bytes)
Error: The program size (532625 bytes) is greater than maximum allowed (499696 bytes)
*** [checkprogsize] Explicit exit, status 1
========================= [FAILED] Took 149.29 seconds =========================

Update: Same behavior with esphome 2023.7.0 Update2: after removing captive_portal, webserver and logger. This is better but still not ok.

Linking .pioenvs/irrigation-controller/firmware.elf
RAM:   [====      ]  39.4% (used 32276 bytes from 81920 bytes)
Flash: [========= ]  90.6% (used 452479 bytes from 499696 bytes)
Building .pioenvs/irrigation-controller/firmware.bin
esp8266_copy_factory_bin([".pioenvs/irrigation-controller/firmware.bin"], [".pioenvs/irrigation-controller/firmware.elf"])
======================== [SUCCESS] Took 128.56 seconds ========================
INFO Successfully compiled program.
INFO Connecting to 192.168.68.42
INFO Uploading /config/.esphome/build/irrigation-controller/.pioenvs/irrigation-controller/firmware.bin (456624 bytes)
INFO Compressed to 321025 bytes
ERROR Error binary size: Error: ESP does not have enough space to store OTA file. Please try flashing a minimal firmware (remove everything except ota)
marek-vrana commented 1 year ago

If you're using BLE proxies with arduino and having this issue, try to switch to esp-idf framework. For nspanel, we'll just need to wait until esp-idf is supported (see this issue).

toomone commented 1 year ago

I got it working by doing the firmware update not over the air. Plug on the computer and with web Esphome works nicely. Then the OTA update works again.

dabepp commented 8 months ago

Plug on the computer and with web Esphome works nicely.

Same issue with my esp32 :-(

Linking .pioenvs/esphome-web-ee267c/firmware.elf RAM: [== ] 18.3% (used 60076 bytes from 327680 bytes) Flash: [==========] 112.8% (used 2070677 bytes from 1835008 bytes) Error: The program size (2070677 bytes) is greater than maximum allowed (1835008 bytes) *** [checkprogsize] Explicit exit, status 1 ========================= [FAILED] Took 117.91 seconds =========================

Gonna post my YAML later if anybody is intrested in.

Tscherno commented 6 months ago

Same issue here with three different devices. None of them can be updated OTA. I also can't easily reach them anymore for wired updating. That's really bad!

lsdlsd88 commented 4 months ago

still an issue... any ideas?