mirror of
https://github.com/Pasta-Devs/Marinara-Engine.git
synced 2026-12-03 19:00:50 +07:00
[GH-ISSUE #659] [Issue]: Game Mode Spotify scene music fails with no active session, even when the mini-player SDK device is registered #312
Labels
No labels
android
bug
bugfix
ci
client
code freeze pause
container
dependencies
docs
documentation
duplicate
enhancement
feature
feature
feature
feature-creep
fixed-in-refactor
fixed-in-staging
good first issue
help wanted
in-pr
in-pr
needs-codeowner-decision
normal-scope
old-codebase
old-codebase
pull-request
qol
question
refactor
regression
revisit later
roadmap
scope-risk
scope-risk
server
server
shared
soup
upstream
windows
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
Pasta-Devs/Marinara-Engine#312
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @Romuromylus on GitHub (May 10, 2026).
Original GitHub issue: https://github.com/Pasta-Devs/Marinara-Engine/issues/659
Originally assigned to: @Romuromylus on GitHub.
Summary
Game Mode Spotify scene music silently fails with a generic "Spotify scene music failed." toast whenever the user has no currently-active Spotify playback session, even if the in-app Spotify Web Playback SDK has registered "Marinara Engine" as an available device. The server-side play call is sent without a
device_id, so Spotify responds 404NO_ACTIVE_DEVICE.Expected behavior
When the user enables the Spotify mini player (which registers an SDK device named "Marinara Engine"), Game Mode scene music should be able to play to that device even if no other Spotify app is currently playing — i.e. the SDK device should be discovered and targeted automatically. If genuinely no device is available, the toast should be actionable ("enable the mini player, or open Spotify on another device") instead of a generic failure message.
Actual behavior
packages/server/src/services/spotify/game-spotify-music.service.ts→playGameSpotifyTrackreads the current playback state viaGET /me/player. When there's no active session, Spotify returns 204 No Content, soreadPlaybackSnapshotreturnsnullandbefore?.deviceIdisnull.PUT /me/player/playwith nodevice_idquery parameter.{"error":{"status":404,"message":"Player command failed: No active device found","reason":"NO_ACTIVE_DEVICE"}}.GameSpotifyError. The client (GameSurface.tsx) catches it and shows the generic toast"Spotify scene music failed."— the actual error message is discarded.Steps to reproduce
streaming,user-modify-playback-state).is_active: false).Spotify scene music failed.— andGET /me/player/devicesconfirms "Marinara Engine" is present withis_active: false. The play call never targets it.Environment
41b7cd48)sdk.scdn.co/spotify-player.js)Logs, screenshots, or video
Reproduced by calling Spotify Web API directly with the same access token:
Additional context
readPlaybackSnapshotreturns nodeviceId, fall back toGET /me/player/devicesand select a target (prefer active, then "Marinara Engine" SDK device by name, then any non-restricted device). When the device list is empty, return 404 with an actionable message that the client can surface.SpotifyMiniPlayer.runControl→/spotify/player/transfer+/spotify/player/play) is not affected — it setsdevice_idfrom the SDKreadyevent.Template check