[GH-ISSUE #842] [Issue]: Client build fails — HTMLAudioElement.stop / setVolume / setMuted don't exist (regression in fd768bfe) #406

Closed
opened 2026-10-20 17:28:30 +07:00 by bsakaguchi · 0 comments
Owner

Originally created by @Romuromylus on GitHub (May 14, 2026).
Original GitHub issue: https://github.com/Pasta-Devs/Marinara-Engine/issues/842

Originally assigned to: @cha1latte on GitHub.

Summary

Client build is broken on main (fd768bfe "rizz"). pnpm --filter @marinara-engine/client run build fails with three TS errors in packages/client/src/components/game/GameCombatUI.tsx, because the commit calls stop() / setVolume() / setMuted() on a combatVoiceAudioRef that is typed as (and holds) a raw HTMLAudioElement, which has none of those methods.

Expected behavior

pnpm check (and the client build it runs) passes on main.

Actual behavior

src/components/game/GameCombatUI.tsx(732,35): error TS2339: Property 'stop' does not exist on type 'HTMLAudioElement'.
src/components/game/GameCombatUI.tsx(844,33): error TS2551: Property 'setVolume' does not exist on type 'HTMLAudioElement'. Did you mean 'volume'?
src/components/game/GameCombatUI.tsx(845,33): error TS2339: Property 'setMuted' does not exist on type 'HTMLAudioElement'.
ERR_PNPM_RECURSIVE_RUN_FIRST_FAIL  @marinara-engine/client@1.5.9 build: `tsc -b && vite build`

Root cause: in fd768bfe, the three call sites were refactored from direct HTMLAudioElement property access (.pause() / .volume = … / .muted = …) to method calls that only exist on the OneShotAudioLayer / LoopingAudioLayer handle interfaces in packages/client/src/lib/game-audio.ts:30-34. combatVoiceAudioRef is still useRef<HTMLAudioElement | null>(null) (line 634) and assigned via new Audio(url) (line 781), so the calls don't compile.

Note: the rest of the same commit DID use the new audioManager surface correctly on the creation path — audioManager.unlock() (line 747) and audioManager.setMediaElementVolume(audio, …) (line 783). The three failing call sites look like a missed pass of the same refactor.

Steps to reproduce

  1. Check out main at fd768bfe.
  2. pnpm install --frozen-lockfile
  3. pnpm --filter @marinara-engine/client run build (or just pnpm check).
  4. See the three errors above.

Environment

  • Marinara Engine version: 1.5.9 (commit fd768bfe on main)
  • Install type: source
  • OS + version: Windows 11
  • Browser or app shell: n/a — build-time, not runtime

Logs, screenshots, or video

See "Actual behavior" above for the full tsc output.

Additional context

The published v1.5.9 tag is at 1968e5b6, which predates fd768bfe and ba27f75f ("Add TTS playback controls", #715), so released artifacts are unaffected. The breakage only hits anyone building from main (including any autoDeploy pipeline pointed at main).

Fix is straightforward — restore the three call sites to the HTMLAudioElement surface that the rest of the component already uses (line 821 already calls .pause() directly; the creation path on line 784 already sets .muted directly; the volume update can route through audioManager.setMediaElementVolume(...) to match line 783). PR incoming.

Template check

  • I DID NOT read this template and provide the requested details.
Originally created by @Romuromylus on GitHub (May 14, 2026). Original GitHub issue: https://github.com/Pasta-Devs/Marinara-Engine/issues/842 Originally assigned to: @cha1latte on GitHub. ## Summary Client build is broken on `main` (`fd768bfe` "rizz"). `pnpm --filter @marinara-engine/client run build` fails with three TS errors in `packages/client/src/components/game/GameCombatUI.tsx`, because the commit calls `stop()` / `setVolume()` / `setMuted()` on a `combatVoiceAudioRef` that is typed as (and holds) a raw `HTMLAudioElement`, which has none of those methods. ## Expected behavior `pnpm check` (and the client build it runs) passes on `main`. ## Actual behavior ``` src/components/game/GameCombatUI.tsx(732,35): error TS2339: Property 'stop' does not exist on type 'HTMLAudioElement'. src/components/game/GameCombatUI.tsx(844,33): error TS2551: Property 'setVolume' does not exist on type 'HTMLAudioElement'. Did you mean 'volume'? src/components/game/GameCombatUI.tsx(845,33): error TS2339: Property 'setMuted' does not exist on type 'HTMLAudioElement'. ERR_PNPM_RECURSIVE_RUN_FIRST_FAIL @marinara-engine/client@1.5.9 build: `tsc -b && vite build` ``` Root cause: in `fd768bfe`, the three call sites were refactored from direct `HTMLAudioElement` property access (`.pause()` / `.volume = …` / `.muted = …`) to method calls that only exist on the `OneShotAudioLayer` / `LoopingAudioLayer` handle interfaces in `packages/client/src/lib/game-audio.ts:30-34`. `combatVoiceAudioRef` is still `useRef<HTMLAudioElement | null>(null)` (line 634) and assigned via `new Audio(url)` (line 781), so the calls don't compile. Note: the rest of the same commit DID use the new `audioManager` surface correctly on the creation path — `audioManager.unlock()` (line 747) and `audioManager.setMediaElementVolume(audio, …)` (line 783). The three failing call sites look like a missed pass of the same refactor. ## Steps to reproduce 1. Check out `main` at `fd768bfe`. 2. `pnpm install --frozen-lockfile` 3. `pnpm --filter @marinara-engine/client run build` (or just `pnpm check`). 4. See the three errors above. ## Environment - Marinara Engine version: 1.5.9 (commit `fd768bfe` on `main`) - Install type: source - OS + version: Windows 11 - Browser or app shell: n/a — build-time, not runtime ## Logs, screenshots, or video See "Actual behavior" above for the full `tsc` output. ## Additional context The published `v1.5.9` tag is at `1968e5b6`, which predates `fd768bfe` and `ba27f75f` ("Add TTS playback controls", #715), so released artifacts are unaffected. The breakage only hits anyone building from `main` (including any autoDeploy pipeline pointed at `main`). Fix is straightforward — restore the three call sites to the `HTMLAudioElement` surface that the rest of the component already uses (line 821 already calls `.pause()` directly; the creation path on line 784 already sets `.muted` directly; the volume update can route through `audioManager.setMediaElementVolume(...)` to match line 783). PR incoming. ## Template check - [ ] I DID NOT read this template and provide the requested details.
bsakaguchi 2026-10-20 17:28:30 +07:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
Pasta-Devs/Marinara-Engine#406
No description provided.