Skip to content

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

@bai-yi-bai

Description

@bai-yi-bai

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!

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions