[GH-ISSUE #1330] username/password authentication method broken, results in "bad credentials" error #607

Closed
opened 2026-02-27 19:31:33 +03:00 by kerem · 2 comments
Owner

Originally created by @fivebanger on GitHub (Sep 8, 2024).
Original GitHub issue: https://github.com/librespot-org/librespot/issues/1330

Describe the bug
I have compiled a recent dev-version of Librelspot (3rd Sep., build with --release) and tried to authenticate with username and password. As a result I get an error "Login failed with reason: Bad credentials". This happens with blocking "https://apresolve.spotify.com" as well as without blocking "https://apresolve.spotify.com", see log below. This is also seen on related projects, e.g. here:

https://github.com/librespot-org/librespot-java/issues/921

To reproduce
Steps to reproduce the behavior:

  1. Launch librespot with ./librespot --system-cache ./cache --username my_username --password my_password --verbose

Log
Without blocked "https://apresolve.spotify.com":
[2024-09-07T21:14:48Z INFO librespot] librespot 0.5.0-dev VERGEN_IDEMPOTENT_OUTPUT (Built on 2024-09-03, Build ID: upyelh1p, Profile: release)
[2024-09-07T21:14:48Z TRACE librespot] Command line argument(s):
[2024-09-07T21:14:48Z TRACE librespot] system-cache "./cache"
[2024-09-07T21:14:48Z TRACE librespot] username "XXXXXXXX"
[2024-09-07T21:14:48Z TRACE librespot] password "XXXXXXXX"
[2024-09-07T21:14:48Z TRACE librespot] verbose
[2024-09-07T21:14:48Z DEBUG librespot_core::session] new Session
[2024-09-07T21:14:48Z DEBUG librespot_discovery::server] Zeroconf server listening on 0.0.0.0:40595
[2024-09-07T21:14:48Z INFO librespot_playback::mixer::softmixer] Mixing with softvol and volume control: Log(60.0)
[2024-09-07T21:14:48Z DEBUG librespot_connect::spirc] new Spirc[0]
[2024-09-07T21:14:48Z DEBUG librespot::component] new MercuryManager
[2024-09-07T21:14:48Z DEBUG librespot::component] new ApResolver
[2024-09-07T21:14:48Z DEBUG librespot_playback::player] new Player [0]
[2024-09-07T21:14:48Z DEBUG librespot_core::http_client] Requesting https://apresolve.spotify.com/?type=accesspoint&type=dealer&type=spclient
[2024-09-07T21:14:48Z INFO librespot_playback::convert] Converting with ditherer: tpdf
[2024-09-07T21:14:48Z INFO librespot_playback::audio_backend::rodio] Using Rodio sink with format S16 and cpal host: ALSA
[2024-09-07T21:14:48Z INFO librespot_playback::audio_backend::rodio] Using audio device: default
[2024-09-07T21:14:48Z DEBUG librespot_playback::audio_backend::rodio] Rodio sink was created
[2024-09-07T21:14:48Z INFO librespot_core::session] Connecting to AP "ap2-gew4.spotify.com:4070"
[2024-09-07T21:14:48Z ERROR librespot] could not initialize spirc: Permission denied { Login failed with reason: Bad credentials }

With blocked "https://apresolve.spotify.com":
[2024-09-08T08:25:24Z INFO librespot] librespot 0.5.0-dev VERGEN_IDEMPOTENT_OUTPUT (Built on 2024-09-03, Build ID: upyelh1p, Profile: release)
[2024-09-08T08:25:24Z TRACE librespot] Command line argument(s):
[2024-09-08T08:25:24Z TRACE librespot] system-cache "./cache"
[2024-09-08T08:25:24Z TRACE librespot] username "XXXXXXXX"
[2024-09-08T08:25:24Z TRACE librespot] password "XXXXXXXX"
[2024-09-08T08:25:24Z TRACE librespot] verbose
[2024-09-08T08:25:24Z DEBUG librespot_core::session] new Session
[2024-09-08T08:25:24Z DEBUG librespot_discovery::server] Zeroconf server listening on 0.0.0.0:39319
[2024-09-08T08:25:24Z INFO librespot_playback::mixer::softmixer] Mixing with softvol and volume control: Log(60.0)
[2024-09-08T08:25:24Z DEBUG librespot_connect::spirc] new Spirc[0]
[2024-09-08T08:25:24Z DEBUG librespot::component] new MercuryManager
[2024-09-08T08:25:24Z DEBUG librespot::component] new ApResolver
[2024-09-08T08:25:24Z DEBUG librespot_core::http_client] Requesting https://apresolve.spotify.com/?type=accesspoint&type=dealer&type=spclient
[2024-09-08T08:25:24Z DEBUG librespot_playback::player] new Player [0]
[2024-09-08T08:25:24Z INFO librespot_playback::convert] Converting with ditherer: tpdf
[2024-09-08T08:25:24Z INFO librespot_playback::audio_backend::rodio] Using Rodio sink with format S16 and cpal host: ALSA
[2024-09-08T08:25:24Z INFO librespot_playback::audio_backend::rodio] Using audio device: default
[2024-09-08T08:25:24Z WARN librespot_core::apresolve] Failed to resolve all access points, using fallbacks
[2024-09-08T08:25:24Z WARN librespot_core::apresolve] Resolve access points error: Service unavailable { client error (Connect) }
[2024-09-08T08:25:24Z INFO librespot_core::session] Connecting to AP "ap.spotify.com:443"
[2024-09-08T08:25:24Z DEBUG librespot_playback::audio_backend::rodio] Rodio sink was created
[2024-09-08T08:25:24Z ERROR librespot] could not initialize spirc: Permission denied { Login failed with reason: Bad credentials }

Host (what you are running librespot on):

  • OS: Linux
Originally created by @fivebanger on GitHub (Sep 8, 2024). Original GitHub issue: https://github.com/librespot-org/librespot/issues/1330 **Describe the bug** I have compiled a recent dev-version of Librelspot (3rd Sep., build with --release) and tried to authenticate with username and password. As a result I get an error "Login failed with reason: Bad credentials". This happens with blocking "https://apresolve.spotify.com" as well as without blocking "https://apresolve.spotify.com", see log below. This is also seen on related projects, e.g. here: https://github.com/librespot-org/librespot-java/issues/921 **To reproduce** Steps to reproduce the behavior: 1. Launch `librespot` with ./librespot --system-cache ./cache --username my_username --password my_password --verbose **Log** Without blocked "https://apresolve.spotify.com": [2024-09-07T21:14:48Z INFO librespot] librespot 0.5.0-dev VERGEN_IDEMPOTENT_OUTPUT (Built on 2024-09-03, Build ID: upyelh1p, Profile: release) [2024-09-07T21:14:48Z TRACE librespot] Command line argument(s): [2024-09-07T21:14:48Z TRACE librespot] system-cache "./cache" [2024-09-07T21:14:48Z TRACE librespot] username "XXXXXXXX" [2024-09-07T21:14:48Z TRACE librespot] password "XXXXXXXX" [2024-09-07T21:14:48Z TRACE librespot] verbose [2024-09-07T21:14:48Z DEBUG librespot_core::session] new Session [2024-09-07T21:14:48Z DEBUG librespot_discovery::server] Zeroconf server listening on 0.0.0.0:40595 [2024-09-07T21:14:48Z INFO librespot_playback::mixer::softmixer] Mixing with softvol and volume control: Log(60.0) [2024-09-07T21:14:48Z DEBUG librespot_connect::spirc] new Spirc[0] [2024-09-07T21:14:48Z DEBUG librespot::component] new MercuryManager [2024-09-07T21:14:48Z DEBUG librespot::component] new ApResolver [2024-09-07T21:14:48Z DEBUG librespot_playback::player] new Player [0] [2024-09-07T21:14:48Z DEBUG librespot_core::http_client] Requesting https://apresolve.spotify.com/?type=accesspoint&type=dealer&type=spclient [2024-09-07T21:14:48Z INFO librespot_playback::convert] Converting with ditherer: tpdf [2024-09-07T21:14:48Z INFO librespot_playback::audio_backend::rodio] Using Rodio sink with format S16 and cpal host: ALSA [2024-09-07T21:14:48Z INFO librespot_playback::audio_backend::rodio] Using audio device: default [2024-09-07T21:14:48Z DEBUG librespot_playback::audio_backend::rodio] Rodio sink was created [2024-09-07T21:14:48Z INFO librespot_core::session] Connecting to AP "ap2-gew4.spotify.com:4070" [2024-09-07T21:14:48Z ERROR librespot] could not initialize spirc: Permission denied { Login failed with reason: Bad credentials } With blocked "https://apresolve.spotify.com": [2024-09-08T08:25:24Z INFO librespot] librespot 0.5.0-dev VERGEN_IDEMPOTENT_OUTPUT (Built on 2024-09-03, Build ID: upyelh1p, Profile: release) [2024-09-08T08:25:24Z TRACE librespot] Command line argument(s): [2024-09-08T08:25:24Z TRACE librespot] system-cache "./cache" [2024-09-08T08:25:24Z TRACE librespot] username "XXXXXXXX" [2024-09-08T08:25:24Z TRACE librespot] password "XXXXXXXX" [2024-09-08T08:25:24Z TRACE librespot] verbose [2024-09-08T08:25:24Z DEBUG librespot_core::session] new Session [2024-09-08T08:25:24Z DEBUG librespot_discovery::server] Zeroconf server listening on 0.0.0.0:39319 [2024-09-08T08:25:24Z INFO librespot_playback::mixer::softmixer] Mixing with softvol and volume control: Log(60.0) [2024-09-08T08:25:24Z DEBUG librespot_connect::spirc] new Spirc[0] [2024-09-08T08:25:24Z DEBUG librespot::component] new MercuryManager [2024-09-08T08:25:24Z DEBUG librespot::component] new ApResolver [2024-09-08T08:25:24Z DEBUG librespot_core::http_client] Requesting https://apresolve.spotify.com/?type=accesspoint&type=dealer&type=spclient [2024-09-08T08:25:24Z DEBUG librespot_playback::player] new Player [0] [2024-09-08T08:25:24Z INFO librespot_playback::convert] Converting with ditherer: tpdf [2024-09-08T08:25:24Z INFO librespot_playback::audio_backend::rodio] Using Rodio sink with format S16 and cpal host: ALSA [2024-09-08T08:25:24Z INFO librespot_playback::audio_backend::rodio] Using audio device: default [2024-09-08T08:25:24Z WARN librespot_core::apresolve] Failed to resolve all access points, using fallbacks [2024-09-08T08:25:24Z WARN librespot_core::apresolve] Resolve access points error: Service unavailable { client error (Connect) } [2024-09-08T08:25:24Z INFO librespot_core::session] Connecting to AP "ap.spotify.com:443" [2024-09-08T08:25:24Z DEBUG librespot_playback::audio_backend::rodio] Rodio sink was created [2024-09-08T08:25:24Z ERROR librespot] could not initialize spirc: Permission denied { Login failed with reason: Bad credentials } **Host (what you are running `librespot` on):** - OS: Linux
kerem 2026-02-27 19:31:33 +03:00
  • closed this issue
  • added the
    bug
    label
Author
Owner

@michaelherger commented on GitHub (Sep 8, 2024):

Spotify has officially announced that they're no longer supporting authentication using username/password. See https://github.com/librespot-org/librespot/issues/1308#issuecomment-2276196094

<!-- gh-comment-id:2336630284 --> @michaelherger commented on GitHub (Sep 8, 2024): Spotify has officially announced that they're no longer supporting authentication using username/password. See https://github.com/librespot-org/librespot/issues/1308#issuecomment-2276196094
Author
Owner

@roderickvd commented on GitHub (Sep 8, 2024):

Duplicate of #1308

<!-- gh-comment-id:2336631279 --> @roderickvd commented on GitHub (Sep 8, 2024): Duplicate of #1308
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#607
No description provided.