Spotifyd / spotifyd

A spotify daemon
https://spotifyd.rs
GNU General Public License v3.0
9.83k stars 450 forks source link

spotifyd gives "Bad credentials" error when a password contains special characters #1269

Closed coyotepunk05 closed 6 months ago

coyotepunk05 commented 6 months ago

Description

To Reproduce Steps to reproduce the behavior:

  1. Run spotifyd --no-daemon --verbose -u "username" -p "password"
  2. Choose a password that includes a special character (such as *) and use spotify generated username
  3. Get error failed to connect to spotify: Login failed with reason: Bad credentials

Expected behavior

spotifyd successfully connects to Spotify with a password that contains special characters.

Logs

Click to show logs ``` Loading config from "/home/cody/.config/spotifyd/spotifyd.conf" CliConfig { config_path: Some("/home/cody/.config/spotifyd/spotifyd.conf"), no_daemon: true, verbose: true, pid: None, shared_config: SharedConfigValues { username: Some("taken out for privacy"), username_cmd: None, password: Some("taken out for privacy"), password_cmd: None, use_keyring: false, use_mpris: None, dbus_type: None, on_song_change_hook: None, cache_path: None, no-audio-cache: false, backend: None, volume_controller: None, device: None, control: None, mixer: None, device_name: None, bitrate: None, audio_format: None, initial_volume: None, volume_normalisation: false, normalisation_pregain: None, zeroconf_port: None, proxy: None, device_type: None, autoplay: false, max_cache_size: None } } Found user shell: Some("/usr/bin/bash") No proxy specified registering event source with poller: token=Token(2147483649), interests=READABLE Using software volume controller. registering event source with poller: token=Token(0), interests=READABLE | WRITABLE signal: Want signal found waiting giver, notifying poll_want: taker wants! signal: Want signal: Want deregistering event source from poller Ignoring blacklisted access point ap-gue1.spotify.com:443 Ignoring blacklisted access point ap-gew4.spotify.com:80 Connecting to AP "ap-guc3.spotify.com:443" signal: Closed registering event source with poller: token=Token(16777216), interests=READABLE | WRITABLE deregistering event source from poller failed to connect to spotify: Login failed with reason: Bad credentials ```

Compilation flags

Versions (please complete the following information):

eladyn commented 6 months ago

Thank you for the report. Unfortunately, I cannot reproduce that issue. My password contains several special characters and even when including a * it still works. Have you verified that without a star it actually works?

coyotepunk05 commented 6 months ago

I can't seem to replicate the issue either today. I'm not sure what was going on, but with the same command it seems to launch correctly now. I'll update if I find out what the problem was but I'll just mark this as closed I guess.

X0RW3LL commented 5 months ago

This issue has been persistent for a good few days now—spotifyd will no longer login successfully regardless of password length/strength. Prior to that, I received an email from Spotify that "suspicious activity" was detected on my account and that I had to reset the password. I believe that's when spotifyd practically died for me.

Edit: as it turns out, username now uses the email address, not the random account string.

DavidHospital commented 2 months ago

~This issue has been persistent for a good few days now—spotifyd will no longer login successfully regardless of password length/strength. Prior to that, I received an email from Spotify that "suspicious activity" was detected on my account and that I had to reset the password. I believe that's when spotifyd practically died for me.~

Edit: as it turns out, username now uses the email address, not the random account string.

I'm having a similar issue, I've tried to replace my username with my email, but still no luck. I am able to login just fine on my phone, etc. but just with spotifyd I am having this problem. Anything I should try?

X0RW3LL commented 2 months ago

None that I know of; I only had to set username = "<email>" and that's that. You can try looking at what's happening with spotifyd --no-daemon --debug-credentials

X0RW3LL commented 1 month ago

~This issue has been persistent for a good few days now—spotifyd will no longer login successfully regardless of password length/strength. Prior to that, I received an email from Spotify that "suspicious activity" was detected on my account and that I had to reset the password. I believe that's when spotifyd practically died for me.~ Edit: as it turns out, username now uses the email address, not the random account string.

I'm having a similar issue, I've tried to replace my username with my email, but still no luck. I am able to login just fine on my phone, etc. but just with spotifyd I am having this problem. Anything I should try?

Latest release apparently switched back to using your account identifier as opposed to Email, so now I just switch back and forth whenever creds misbehave :shrug: