[GH-ISSUE #1674] (librespot_connect::spirc) Client specified an invalid argument { Response status code: 400 Bad Request } #760

Open
opened 2026-02-27 19:32:20 +03:00 by kerem · 1 comment
Owner

Originally created by @bai-yi-bai on GitHub (Jan 6, 2026).
Original GitHub issue: https://github.com/librespot-org/librespot/issues/1674

Description

Hello, today I caught an error, where sometimes librespot stops abruptly with this:

(librespot_connect::spirc) Client specified an invalid argument { Response status code: 400 Bad Request }

I'm running librespot through Snapcast on a Debian server. I typically control it using Home Assistant, with the Spotify and SpotifyPlus plug ins.

After catching the error and beginning to create the issue. I'm not sure if the log I have posted contains 'verbose' information. I have added '--verbose` to the source in my snapserver.conf file, but I'm not sure if it is correct. I will post an updated log if I can catch it.

source = spotify:///librespot?name=Spotify&devicename=MultiroomSpotify&cache=%2Fvar%2Flib%2Fsnapserver%2F&enable-oauth&oauth-port=0--cache-size-limit%3D2G--verbose

I'm using the oauth login method.

Version

What version(s) of librespot does this problem exist in?

I build from source:

root@snapcastserver:~# librespot -v
[2026-01-06T05:24:44Z INFO  librespot] librespot 0.8.0 d36f9f1 (Built on 2025-11-13, Build ID: JXZml7Px, Profile: release)

I usually install the snapserver .deb from the releases page.

root@snapcastserver:~# snapserver -v
snapserver v0.34.0 (rev 0ac55084)

How to reproduce

It's intermittent. It typically occurs after about an hour of playback.

Log

NON-VERBOSE version:

root@snapcastserver:~# journalctl -u snapserver --since "2026-01-06 05:00:00" -f
Jan 06 05:02:12 snapcastserver snapserver[11930]: (librespot_playback::player) Loading <BAD OMENS> with Spotify URI <spotify:track:2PJl57wx6Hm8HQBzZYfHcU>
Jan 06 05:02:12 snapcastserver snapserver[11930]: (librespot_playback::player) <BAD OMENS> (147625 ms) loaded
Jan 06 05:02:12 snapcastserver snapserver[11930]: (LibrespotStream) metadata: <BAD OMENS>
Jan 06 05:04:40 snapcastserver snapserver[11930]: (librespot_playback::player) Loading <Long Night of Solace> with Spotify URI <spotify:track:6Bv5v4qnrm6P9zfiQPd3a7>
Jan 06 05:04:40 snapcastserver snapserver[11930]: (librespot_playback::player) <Long Night of Solace> (245625 ms) loaded
Jan 06 05:04:40 snapcastserver snapserver[11930]: (LibrespotStream) metadata: <Long Night of Solace>
Jan 06 05:08:45 snapcastserver snapserver[11930]: (librespot_playback::player) Loading <Warmlight Eyes> with Spotify URI <spotify:track:6eAtwpugamYFjM301Fpf1d>
Jan 06 05:08:45 snapcastserver snapserver[11930]: (librespot_playback::player) <Warmlight Eyes> (163947 ms) loaded
Jan 06 05:08:45 snapcastserver snapserver[11930]: (LibrespotStream) metadata: <Warmlight Eyes>
Jan 06 05:11:29 snapcastserver snapserver[11930]: (librespot_playback::player) Loading <trickle down> with Spotify URI <spotify:track:4Vk85kwwJKP6ppacSswCeg>
Jan 06 05:11:29 snapcastserver snapserver[11930]: (librespot_playback::player) <trickle down> (174357 ms) loaded
Jan 06 05:11:29 snapcastserver snapserver[11930]: (LibrespotStream) metadata: <trickle down>
Jan 06 05:11:59 snapcastserver snapserver[11930]: (librespot_connect::spirc) Client specified an invalid argument { Response status code: 400 Bad Request }
Jan 06 05:14:24 snapcastserver snapserver[11930]: (librespot_playback::player) Loading <Grass> with Spotify URI <spotify:track:7AThGw4boHMLdqzxFWZ73Y>
Jan 06 05:14:24 snapcastserver snapserver[11930]: (librespot_playback::player) <Grass> (207854 ms) loaded
Jan 06 05:14:24 snapcastserver snapserver[11930]: (LibrespotStream) metadata: <Grass>
Jan 06 05:14:54 snapcastserver snapserver[11930]: (librespot_connect::spirc) Client specified an invalid argument { Response status code: 400 Bad Request }
Jan 06 05:18:21 snapcastserver snapserver[11930]: (librespot_connect::spirc) Not playing next track because there are no more tracks left in queue.
Jan 06 05:18:22 snapcastserver snapserver[11930]: (AsioStream) No data since 150 ms, switching to idle
Jan 06 05:18:22 snapcastserver snapserver[11930]: (PcmStream) State changed: Spotify, state: playing => idle
Jan 06 05:18:22 snapcastserver snapserver[11930]: (Server) onStateChanged (Spotify): idle

Host (what you are running librespot on):

  • OS: Debian
  • Platform: x86
uname -a
Linux snapcastserver 6.1.0-41-amd64 #1 SMP PREEMPT_DYNAMIC Debian 6.1.158-1 (2025-11-09) x86_64 GNU/Linux

Thank you!

Originally created by @bai-yi-bai on GitHub (Jan 6, 2026). Original GitHub issue: https://github.com/librespot-org/librespot/issues/1674 ### Description Hello, today I caught an error, where sometimes librespot stops abruptly with this: ` (librespot_connect::spirc) Client specified an invalid argument { Response status code: 400 Bad Request }` I'm running librespot through Snapcast on a Debian server. I typically control it using Home Assistant, with the Spotify and SpotifyPlus plug ins. After catching the error and beginning to create the issue. I'm not sure if the log I have posted contains 'verbose' information. I have added '--verbose` to the source in my snapserver.conf file, but I'm not sure if it is correct. I will post an updated log if I can catch it. `source = spotify:///librespot?name=Spotify&devicename=MultiroomSpotify&cache=%2Fvar%2Flib%2Fsnapserver%2F&enable-oauth&oauth-port=0--cache-size-limit%3D2G--verbose` I'm using the oauth login method. ### Version What version(s) of *librespot* does this problem exist in? I build from source: ``` root@snapcastserver:~# librespot -v [2026-01-06T05:24:44Z INFO librespot] librespot 0.8.0 d36f9f1 (Built on 2025-11-13, Build ID: JXZml7Px, Profile: release) ``` I usually install the snapserver .deb from the releases page. ``` root@snapcastserver:~# snapserver -v snapserver v0.34.0 (rev 0ac55084) ``` ### How to reproduce It's intermittent. It typically occurs after about an hour of playback. ### Log NON-VERBOSE version: ``` root@snapcastserver:~# journalctl -u snapserver --since "2026-01-06 05:00:00" -f Jan 06 05:02:12 snapcastserver snapserver[11930]: (librespot_playback::player) Loading <BAD OMENS> with Spotify URI <spotify:track:2PJl57wx6Hm8HQBzZYfHcU> Jan 06 05:02:12 snapcastserver snapserver[11930]: (librespot_playback::player) <BAD OMENS> (147625 ms) loaded Jan 06 05:02:12 snapcastserver snapserver[11930]: (LibrespotStream) metadata: <BAD OMENS> Jan 06 05:04:40 snapcastserver snapserver[11930]: (librespot_playback::player) Loading <Long Night of Solace> with Spotify URI <spotify:track:6Bv5v4qnrm6P9zfiQPd3a7> Jan 06 05:04:40 snapcastserver snapserver[11930]: (librespot_playback::player) <Long Night of Solace> (245625 ms) loaded Jan 06 05:04:40 snapcastserver snapserver[11930]: (LibrespotStream) metadata: <Long Night of Solace> Jan 06 05:08:45 snapcastserver snapserver[11930]: (librespot_playback::player) Loading <Warmlight Eyes> with Spotify URI <spotify:track:6eAtwpugamYFjM301Fpf1d> Jan 06 05:08:45 snapcastserver snapserver[11930]: (librespot_playback::player) <Warmlight Eyes> (163947 ms) loaded Jan 06 05:08:45 snapcastserver snapserver[11930]: (LibrespotStream) metadata: <Warmlight Eyes> Jan 06 05:11:29 snapcastserver snapserver[11930]: (librespot_playback::player) Loading <trickle down> with Spotify URI <spotify:track:4Vk85kwwJKP6ppacSswCeg> Jan 06 05:11:29 snapcastserver snapserver[11930]: (librespot_playback::player) <trickle down> (174357 ms) loaded Jan 06 05:11:29 snapcastserver snapserver[11930]: (LibrespotStream) metadata: <trickle down> Jan 06 05:11:59 snapcastserver snapserver[11930]: (librespot_connect::spirc) Client specified an invalid argument { Response status code: 400 Bad Request } Jan 06 05:14:24 snapcastserver snapserver[11930]: (librespot_playback::player) Loading <Grass> with Spotify URI <spotify:track:7AThGw4boHMLdqzxFWZ73Y> Jan 06 05:14:24 snapcastserver snapserver[11930]: (librespot_playback::player) <Grass> (207854 ms) loaded Jan 06 05:14:24 snapcastserver snapserver[11930]: (LibrespotStream) metadata: <Grass> Jan 06 05:14:54 snapcastserver snapserver[11930]: (librespot_connect::spirc) Client specified an invalid argument { Response status code: 400 Bad Request } Jan 06 05:18:21 snapcastserver snapserver[11930]: (librespot_connect::spirc) Not playing next track because there are no more tracks left in queue. Jan 06 05:18:22 snapcastserver snapserver[11930]: (AsioStream) No data since 150 ms, switching to idle Jan 06 05:18:22 snapcastserver snapserver[11930]: (PcmStream) State changed: Spotify, state: playing => idle Jan 06 05:18:22 snapcastserver snapserver[11930]: (Server) onStateChanged (Spotify): idle ``` ### Host (what you are running `librespot` on): - OS: Debian - Platform: x86 ``` uname -a Linux snapcastserver 6.1.0-41-amd64 #1 SMP PREEMPT_DYNAMIC Debian 6.1.158-1 (2025-11-09) x86_64 GNU/Linux ``` Thank you!
Author
Owner

@kingosticks commented on GitHub (Jan 6, 2026):

Do you mean playback stops abruptly? Or the librespot process stops abruptly? It doesn't look like a verbose log, I didn't think arbitrary options were passed through like that, but it has been a long time since I used snapcast. Maybe you could just launch librespot on its own, outside of snapcast?

<!-- gh-comment-id:3714641058 --> @kingosticks commented on GitHub (Jan 6, 2026): Do you mean playback stops abruptly? Or the librespot process stops abruptly? It doesn't look like a verbose log, I didn't think arbitrary options were passed through like that, but it has been a long time since I used snapcast. Maybe you could just launch librespot on its own, outside of snapcast?
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/librespot#760
No description provided.