Skip to content

ci: esp32dev_idf5_component fails on master — fbuild spawns bare esptool, PIO installs tool-esptoolpy #3774

Closed

Description

@zackees

The esp32dev_idf5_component build workflow has been failing on master since 2026-07-30. It is not PR-specific — it blocks every PR that runs the matrix.

Evidence it is master, not a PR

run branch / commit result
30431062347 master, #3766 (2026-07-29) success
30434174906 master, #3768 (2026-07-29) success
30509160746 master, WS2814 #3770 (2026-07-30) failure
30599312224 PR #3771 failure, same cause

The PR #3771 branch is a Python-only build-system change that never touches the ESP path; it inherits the breakage.

The failure

PIO: Tool Manager: Installing https://github.com/pioarduino/esptool/releases/download/v4.8.5/esptool.zip
PIO: Tool Manager: [email protected] has been installed!
...
build error: build failed: esptool not found — cannot convert firmware.elf to firmware.bin.
Error: failed to spawn ["esptool", "--chip", "esp32", "elf2image", ...]:
  No such file or directory (os error 2)

Note the two lines are consistent, not contradictory: PlatformIO successfully installs tool-esptoolpy into its own package directory, and fbuild then spawns a bare esptool resolved through PATH, where it does not exist. The C++ compile itself succeeds — firmware.elf is produced, and only the elf→bin conversion fails. So this is purely a tool-resolution problem, not a code problem.

Reproducible: re-running the failed job produced the identical error, so it is deterministic rather than a transient provisioning flake.

Where the fix belongs

Per CLAUDE.md → "Deployment (flash / upload) is fbuild's job — ALWAYS", FastLED must not shell out to esptool directly or paper over this with a pip install esptool step in the workflow — that is exactly the kind of "temporary" direct-tool call the rule exists to prevent. The provisioning gap is fbuild's: it should either resolve esptool from the PlatformIO tool-esptoolpy package it just triggered, or provision its own and invoke it by absolute path rather than relying on PATH.

Filing here for visibility since it is red on master and blocking PR merges; the actual fix likely belongs at https://github.com/FastLED/fbuild/issues.

Worth checking alongside

check_teensy32_size, check_teensy35_size and check_teensy36_size are also failing on master on the same WS2814 commit (#3770). Possibly related to that change rather than to tooling — but master is currently red on four checks, which makes "all green" unreachable as a merge bar.

Activity

  1. zackees commented on Jul 31, 2026

    @zackees
    MemberAuthor

    Broader than originally filed: esp32s3 fails with the identical error, so this is not specific to esp32dev_idf5_component.

    From run 30604595328 (PR #3778, a Python-only change that never touches the ESP path):

    build error: build failed: esptool not found — cannot convert firmware.elf to firmware.bin.
    Error: failed to spawn ["esptool", "--chip", "esp32s3", "elf2image", "--flash-mode", "dio",
      "--flash-freq", "80m", "--flash-size", "4MB", ".../esp32s3/.fbuild/build/release/firmware.elf",
      "-o", ".../firmware.bin"]: No such file or directory (os error 2)
    FAILED: AnalogOutput
    

    Same signature as the esp32dev case — differs only in --chip and --flash-freq. So the missing esptool on PATH breaks every ESP target that needs elf2image, not one board. Worth assuming the whole ESP matrix is affected when scoping the fix.

  2. zackees commented on Jul 31, 2026

    @zackees
    MemberAuthor

    Root-caused this. Filed upstream as FastLED/fbuild#1217.

    Trigger is narrower than it looks: 5dd05daff (WS2814 RGBW, #3770) is the first red commit, but the WS2814 code is incidental — that commit also bumped pyproject.toml fbuild==2.5.2 → fbuild==2.5.4. That pin bump is the whole regression.

    Scope is wider than the title: this is not esp32dev_idf5_component-specific. Every ESP32 env fails (esp32dev, esp32c3, esp32s3, esp32dev_i2s, esp32dev_idf33/44, idf5_component). esp8266 passes because it converts via objcopy, not esptool.

    Two compounding faults, both fbuild-side:

    1. esptool provisioning has never worked for the platform we resolve. extract_esptool_version() parses the version from the metadata URL's filename, but pioarduino platform-espressif32 53.03.10 publishes .../releases/download/v4.8.5/esptool.zip — version in the path segment, generic filename. It returns "unknown", the download 404s, and fbuild silently degrades to a bare esptool PATH lookup. fbuild's own doc comment and unit test both encode this fallback as expected behavior.

    2. 2.5.4 changed the daemon environment (env_clear, fbuild 84518f8f, tagged v2.5.4), so that PATH fallback stopped finding our venv's esptool. PATH is forwarded only at daemon spawn, and the build runs inside the daemon — so a warm or differently-spawned daemon resolves a different toolchain for identical inputs.

    Net: the "install with pip install esptool" hint is misleading — esptool>=5.0.2 is already a dependency (pyproject.toml:248, resolving 5.1.0) and is installed in the venv.

    Unblocking options, in order of preference:

    • Wait for fbuild#1217 (fix support TLS3001 #1 there — parse the path segment — resolves it outright).
    • Roll the pin back to fbuild==2.5.2. Restores the inherited-PATH behavior with a one-line change and no workflow edits. Needs a check on what else 2.5.3/2.5.4 carried that we depend on.

    Per CLAUDE.md, I did not add a pip install esptool step or PATH-munging to the workflow — tool provisioning is fbuild's job, and a workaround here would mask the upstream bug.

  3. zackees commented on Jul 31, 2026

    @zackees
    MemberAuthor

    Upstream work is now split across three fbuild items:

    fbuild PR #1218 version parse clears this outage
    fbuild #1219 daemon binds tool resolution to spawn-time PATH for 12h why the fallback failed
    fbuild #1220 silent provisioning failure + no FBUILD_ESPTOOL_PATH why it was undebuggable

    To green FastLED master: merge #1218, cut fbuild 2.5.5, bump the pyproject.toml pin. No FastLED-side code change is needed — our dependency set is already correct (esptool>=5.0.2 at pyproject.toml:248 resolves 5.1.0).

    I did not roll the pin back to 2.5.2. It would have worked, but it drops 53 commits including the Windows RP2040 USB recovery path, daemon cold-cache ownership (fbuild#1159), and the CH32V bring-up — too much collateral for a workaround when the real fix is a ~10-line parse change.

    Worth noting for whoever picks this up: #1219 is the one with legs beyond this incident. find_python() resolves python3/python from the daemon's spawn-time PATH the same way esptool did, so which interpreter runs PlatformIO build scripts depends on daemon lineage rather than on anything the build declares. That's a silent correctness hazard — the build succeeds, it just ran under an interpreter nobody chose.

  4. zackees commented on Jul 31, 2026

    @zackees
    MemberAuthor

    This looks resolved on master as of the fbuild 2.5.5 bump (#3789).

    esp32dev_idf5_component on master:

    run result
    2026-07-31T20:24 failure
    2026-07-31T20:43 success
    2026-07-31T22:16 success

    The esptool not found — cannot convert firmware.elf to firmware.bin spawn failure is gone. #3784 ("treat fbuild build error: as failure even on exit code 0") also landed in that window, which is why the failure was surfacing as a hard failure rather than a silent exit-0.

    Worth noting for anyone reading this issue later: the same root cause was hitting esp32s3 too, not just esp32dev_idf5_component — the title understates the blast radius. Both were failing with identical esptool spawn errors.

    Leaving open for a maintainer to confirm and close, since I can't verify the fbuild-side change was intentional rather than incidental. With this fixed, **teensy41 (#3775 / #3777) is the last red check on master.`

  5. zackees commented on Aug 20, 2026

    @zackees
    MemberAuthor

    Resolved upstream and verified on current master:

    No FastLED-side workaround is needed.

  6. moved this from Triage to Done in FastLED Trackeron Aug 20, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions