aoede icon indicating copy to clipboard operation
aoede copied to clipboard

AuthenticationError(LoginFailed(BadCredentials))

Open koinoniaOG916 opened this issue 1 year ago • 13 comments

This error has been persistent for the last while.

Double checked my login credentials, and all is correct. Reset the Bot token and made sure the user ID is correct. The logs show as follows:

thread 'main' panicked at src/lib/player.rs:233:14: Error creating session: AuthenticationError(LoginFailed(BadCredentials)) note: run with RUST_BACKTRACE=1 environment variable to display a backtrace thread 'main' panicked at src/lib/player.rs:233:14: Error creating session: AuthenticationError(LoginFailed(BadCredentials)) note: run with RUST_BACKTRACE=1 environment variable to display a backtrace thread 'main' panicked at src/lib/player.rs:233:14: Error creating session: AuthenticationError(LoginFailed(BadCredentials)) note: run with RUST_BACKTRACE=1 environment variable to display a backtrace thread 'main' panicked at src/lib/player.rs:233:14: Error creating session: AuthenticationError(LoginFailed(BadCredentials)) note: run with RUST_BACKTRACE=1 environment variable to display a backtrace thread 'main' panicked at src/lib/player.rs:233:14: Error creating session: AuthenticationError(LoginFailed(BadCredentials)) note: run with RUST_BACKTRACE=1 environment variable to display a backtrace thread 'main' panicked at src/lib/player.rs:233:14: Error creating session: AuthenticationError(LoginFailed(BadCredentials)) note: run with RUST_BACKTRACE=1 environment variable to display a backtrace thread 'main' panicked at src/lib/player.rs:233:14: Error creating session: AuthenticationError(LoginFailed(BadCredentials)) note: run with RUST_BACKTRACE=1 environment variable to display a backtrace thread 'main' panicked at src/lib/player.rs:233:14: Error creating session: AuthenticationError(LoginFailed(BadCredentials)) note: run with RUST_BACKTRACE=1 environment variable to display a backtrace thread 'main' panicked at src/lib/player.rs:233:14: Error creating session: AuthenticationError(LoginFailed(BadCredentials)) note: run with RUST_BACKTRACE=1 environment variable to display a backtrace thread 'main' panicked at src/lib/player.rs:233:14: Error creating session: AuthenticationError(LoginFailed(BadCredentials)) note: run with RUST_BACKTRACE=1 environment variable to display a backtrace thread 'main' panicked at src/lib/player.rs:233:14: Error creating session: AuthenticationError(LoginFailed(BadCredentials)) note: run with RUST_BACKTRACE=1 environment variable to display a backtrace

Anyone who shed some light on this error? Is this an issue with Aoede?

koinoniaOG916 avatar Sep 19 '24 05:09 koinoniaOG916

same

DerP4si avatar Sep 26 '24 20:09 DerP4si

same

TheRoyalGhost45 avatar Sep 26 '24 20:09 TheRoyalGhost45

same as #54

DerP4si avatar Sep 26 '24 22:09 DerP4si

same It's hopeless ..

Hippotumux avatar Oct 23 '24 17:10 Hippotumux

same...

codebyant avatar Oct 26 '24 18:10 codebyant

same

TheRoyalGhost45 avatar Nov 02 '24 22:11 TheRoyalGhost45

getting the same error

NekomataGami avatar Jan 22 '25 17:01 NekomataGami

same... 😭

gmail-random1 avatar Feb 06 '25 13:02 gmail-random1

same...

Cardrhyme206113 avatar Mar 17 '25 14:03 Cardrhyme206113

Same

mrhashishah avatar Apr 20 '25 19:04 mrhashishah

It is likely that the issue arises from recent changes to Spotify's API endpoints, while the current version of the bot's Spotify package is outdated.

endrence3 avatar Apr 27 '25 22:04 endrence3

getting the same error

mattdayinbound avatar Apr 28 '25 18:04 mattdayinbound

This is caused by Spotify deprecating username/password authentication in 2024. The "BadCredentials" error is now affecting all librespot-based applications regardless of valid credentials.

Root Cause: Spotify changed their authentication flow around July 2024, disabling the username/password method that librespot 0.4.2 relies on. This affects the entire ecosystem (spotifyd, ncspot, etc.).

Solution: I've created a fork that implements cached credentials authentication using librespot-auth as a workaround: https://github.com/zachlagden/aoede

Quick Fix:

  1. Download librespot-auth from my fork
  2. Generate credentials via Spotify Connect (no username/password needed)
  3. Use the cached credentials instead

This bypasses Spotify's deprecated authentication entirely. The fix is backward compatible and includes detailed migration instructions in the README.

Note: The original project would need to update to librespot 0.6.0+ and implement token-based authentication to resolve this properly, but my fork provides an immediate solution using the existing librespot 0.4.2.

zachlagden avatar Jul 20 '25 03:07 zachlagden