Skip to content

Six spurious audio errors are logged on every engine-backed track load #605

Description

@thcp

What happens

Opening any track that plays through the Web Audio engine logs one error per stem, six lines, before the user has done anything:

[player] audio error stem[0] vocals: MEDIA_ELEMENT_ERROR: Empty src attribute 4
[player] audio error stem[1] drums:  MEDIA_ELEMENT_ERROR: Empty src attribute 4
... one per stem

Why

The elements really do have no source, and that part is correct. When the engine owns playback, static/js/player.js builds the multitrack with url: null for every stem, because the engine streams the audio itself and the multitrack is only there for the lanes.

The guard that was meant to skip logging for exactly those stems tests stemsByName[name]?.url instead. That is the original stem descriptor, which still holds the real URL the engine is streaming from. So the guard passes, an error listener is attached to an element that was deliberately never given a src, and the element duly reports one.

The comment above it states the intent correctly. The check just reads the wrong object.

Impact

Playback is unaffected, and has always been unaffected. The cost is diagnostic: anyone who opens a console, or attaches one to a bug report, sees six errors that have nothing to do with their problem. It makes healthy installs look broken and buries real errors underneath.

Found while verifying #600, and unrelated to it.

Activity

  1. thcp commented on Sep 9, 2026

    @thcp
    CollaboratorAuthor

    Fixed in #606, landed on main as 53a6c04.

    The guard now tests useEngine alongside the stem descriptor. When the engine owns playback every multitrack stem is deliberately given url: null, so those elements have no src by design; testing only the descriptor passed, attached an error listener to an element that was never given a source, and it duly reported one.

    Playback was never affected. The cost was six errors in every console and every bug report that had nothing to do with the problem being reported.

  2. self-assigned this
    on Oct 1, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions