Skip to content

bug: headphone check stalls after correct answer on Firefox #1237

Description

@JamesPHoughton

Summary

The headphone check stalls after the user interacts with the sound test on Firefox. The stall timeout fires because headphonesStatus stays at "started" and never transitions to "pass" or "fail".

What we know from Sentry breadcrumbs

Event a75ac668 (Firefox 148, Windows):

  • User selected "LG ULTRAGEAR (NVIDIA High Definition Audio)" as speaker
  • play().then() resolved 7 times → browser accepted the playback request
  • User selected "I did not hear anything" (value: "none")
  • The soundSelected === "clock" condition was never met, so setHeadphonesStatus("pass") never fired
  • But selecting "none" doesn't set setHeadphonesStatus("fail") either — it just shows troubleshooting tips
  • headphonesStatus stays at "started" → stall timeout fires

Events 3edf3e8e and 2b00ce36 (Firefox 149, Windows, same user):

  • Selected a speaker, played chime multiple times, never got Sound played successfully (never selected a radio option)
  • Stall timeout fired

What we don't know

Whether audio actually played. play().then() resolving only means the browser accepted the playback request — not that audio data reached the output. The audioPlaying event (DOM playing listener added in PR #1234) would tell us, but it only logs to player.append, not console.log, so it doesn't appear in Sentry breadcrumbs.

Possible causes:

  1. Audio played through the wrong device (NVIDIA HDMI = monitor speakers, not headphones)
  2. setSinkId succeeded but the device wasn't producing sound
  3. Firefox audio routing silently failed — play() resolves but no data flows
  4. The audio element never reached the playing state

Two problems to fix

1. Selecting "I did not hear anything" is a dead end

When the user selects "none", the component shows troubleshooting tips but doesn't transition headphonesStatus. The check sits in "started" until the stall timeout fires. It should either:

  • Set headphonesStatus("fail") so the equipment check restarts
  • Or loop the user back to speaker selection

2. Insufficient instrumentation to diagnose playback failures

Add console.log to the audio element's playing and ended event handlers so they appear in Sentry breadcrumbs. This will let us distinguish:

  • "Audio played through wrong device" (playing + ended fire, user selects "none")
  • "Audio never actually played" (playing never fires despite play() resolving)
  • "Audio started but didn't complete" (playing fires, ended doesn't)

Metadata

Metadata

Assignees

No one assigned

    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