[GH-ISSUE #1111] spt keeps returning to error when I connect to Sonos #521

Open
opened 2026-02-28 14:49:39 +03:00 by kerem · 2 comments
Owner

Originally created by @koenichiwa on GitHub (Dec 13, 2023).
Original GitHub issue: https://github.com/Rigellute/spotify-tui/issues/1111

The Sonos box is not detected by spt. This is handled in #426.

When I change the device with another Spotify player to my Sonos box, spt shows an extensive error message, which I can't copy/paste: a convert failure due to a null. The only variable that seems to be null is context.

There is a prompt to "click esc to return", but when I do that, it shows the main window shortly and immediately returns to the error message. This means that I can't control spt in any way anymore when a song is played from my Sonos speaker, and I have to return to the standard Spotify player.

I'm willing to help resolve this issue, but I will need guidance.

Originally created by @koenichiwa on GitHub (Dec 13, 2023). Original GitHub issue: https://github.com/Rigellute/spotify-tui/issues/1111 The Sonos box is not detected by spt. This is handled in #426. When I change the device with another Spotify player to my Sonos box, spt shows an extensive error message, which I can't copy/paste: a convert failure due to a `null`. The only variable that seems to be `null` is `context`. There is a prompt to "click `esc` to return", but when I do that, it shows the main window shortly and immediately returns to the error message. This means that I can't control spt in any way anymore when a song is played from my Sonos speaker, and I have to return to the standard Spotify player. I'm willing to help resolve this issue, but I will need guidance.
Author
Owner

@rubywwwilde commented on GitHub (Dec 16, 2023):

Yes, for me it's the same! And your issue was the first in the issue list for me (god thank you)

{
  "device" : {
    "id" : null,
    "is_active" : true,
    "is_private_session" : false,
    "is_restricted" : true,
    "name" : "Sonos Ream",
    "supports_volume" : true,
    "type" : "Speaker",
    "volume_percent" : 26
  },
  "shuffle_state" : false,
  "repeat_state" : "context",
  "timestamp" : 1702737003008,
  "context" : {
    "external_urls" : {
      "spotify" : "https://open.spotify.com/playlist/37i9dQZEVXcOngvkeB8XNX"
    },
    "href" : "https://api.spotify.com/v1/playlists/37i9dQZEVXcOngvkeB8XNX",
    "type" : "playlist",
    "uri" : "spotify:playlist:37i9dQZEVXcOngvkeB8XNX"
  },
  "progress_ms" : 200437
}

<!-- gh-comment-id:1858833602 --> @rubywwwilde commented on GitHub (Dec 16, 2023): Yes, for me it's the same! And your issue was the first in the issue list for me (god thank you) ``` { "device" : { "id" : null, "is_active" : true, "is_private_session" : false, "is_restricted" : true, "name" : "Sonos Ream", "supports_volume" : true, "type" : "Speaker", "volume_percent" : 26 }, "shuffle_state" : false, "repeat_state" : "context", "timestamp" : 1702737003008, "context" : { "external_urls" : { "spotify" : "https://open.spotify.com/playlist/37i9dQZEVXcOngvkeB8XNX" }, "href" : "https://api.spotify.com/v1/playlists/37i9dQZEVXcOngvkeB8XNX", "type" : "playlist", "uri" : "spotify:playlist:37i9dQZEVXcOngvkeB8XNX" }, "progress_ms" : 200437 } ```
Author
Owner

@rubywwwilde commented on GitHub (Dec 16, 2023):

Maybe it would help just to allow the device ID null

<!-- gh-comment-id:1858834320 --> @rubywwwilde commented on GitHub (Dec 16, 2023): Maybe it would help just to allow the device ID null
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
starred/spotify-tui#521
No description provided.