Skip to content

WASM: completeness check skipped entirely when an asset's size is unknown #4024

Closed

Description

@zackees

Defect

The completeness check silently disables itself when the size is unknown:

const complete = file.size === 0 || written === file.size;   // index.ts:913

file.size is 0 whenever the declaration carries no size and the server sends no Content-Length -- chunked responses, some CDNs, any text-form .lnk served by a host that omits it. Those are exactly the cases where a truncated download is most likely, and they are the ones that skip verification.

AudioUrl passes only because raw.githubusercontent.com sends Content-Length. The check has never been exercised against an unknown-size asset.

Why it matters

A truncated asset is invisible at runtime. FileData keeps its declared capacity, so is_eof() stays false while read() returns 0 -- the sketch waits on bytes that never arrive, with nothing in the log.

Fix

Research: whether .lnk should require size for on-chip storage targets, the way fbuild already requires sha256.

Activity

  1. added 2 commits that reference this issue on Aug 31, 2026
    39dceb6
    ea44317
  2. moved this from Triage to Done in FastLED Trackeron Aug 31, 2026
  3. added a commit that references this issue on Aug 31, 2026
    5464059
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