[GH-ISSUE #830] App fails to accept spotify api credentials #1434

Closed
opened 2026-03-14 14:55:40 +03:00 by kerem · 2 comments
Owner

Originally created by @jasht1 on GitHub (Sep 12, 2025).
Original GitHub issue: https://github.com/aome510/spotify-player/issues/830

Describe the bug

The app will fail to launch reporting "Bad credentials" after an authentication request despite ~/.cache/spotify-player/user_client_token.json being generated correctly.

$ spotify_player 
Opened https://accounts.spotify.com/authorize?code_challenge_method=S256&redirect_uri=http%3A%2F%2F127.0.0.1%3A8989%2Flogin&code_challenge=gomGN-6zAWFpJJeJ1nnmAmT2Yjria7cwEVGmA71TT2Q&state=k4E245lsjbUFtC6P&response_type=code&scope=user-read-playback-state&client_id=4a76566db19243abbd54beea7abdc599 in your browser.
Error: initialize new Spotify session

Caused by:
    0: new streaming connection
    1: initialize spirc
    2: Permission denied { Login failed with reason: Bad credentials }

I have tried:

  • deleted the ~/.cache/spotify-player/user_client_token.json file each time
  • approving the authentication request with both librewolf and brave-browser.
  • excepting accounts.spotify.com from strict mode / enhanced tracking protection
  • removing and fully reinstalling from the latest github release cargo install --git https://github.com/aome510/spotify-player --features image,notify,fzf

To Reproduce

cargo install --git https://github.com/aome510/spotify-player --features image,notify,fzf

## Librewolf browser

rm ~/.cache/spotify-player/user_client_token.json
sudo apt update && sudo apt install extrepo -y
sudo extrepo enable librewolf
sudo apt update && sudo apt install librewolf -y
spotify_player
# aprove the authentication request with librewolf

## Brave browser

rm ~/.cache/spotify-player/user_client_token.json
curl -fsS https://dl.brave.com/install.sh | sh
export BROWSER=brave-browser
spotify_player
# aprove the authentication request with brave

Expected behaviour

The app should accept the credentials.

Log and backtrace

Consistently the .backtrace will be empty and the last line of the .log will be with everything looking normal up to that point:

INFO librespot_core::session: Connecting to AP "ap-gew1.spotify.com:4070"

Environment

OS: debian / POPOS
Application version: 0.21.0 (built from github)
Application features: image,notify,fzf

Originally created by @jasht1 on GitHub (Sep 12, 2025). Original GitHub issue: https://github.com/aome510/spotify-player/issues/830 **Describe the bug** The app will fail to launch reporting "Bad credentials" after an authentication request despite `~/.cache/spotify-player/user_client_token.json` being generated correctly. ``` $ spotify_player Opened https://accounts.spotify.com/authorize?code_challenge_method=S256&redirect_uri=http%3A%2F%2F127.0.0.1%3A8989%2Flogin&code_challenge=gomGN-6zAWFpJJeJ1nnmAmT2Yjria7cwEVGmA71TT2Q&state=k4E245lsjbUFtC6P&response_type=code&scope=user-read-playback-state&client_id=4a76566db19243abbd54beea7abdc599 in your browser. Error: initialize new Spotify session Caused by: 0: new streaming connection 1: initialize spirc 2: Permission denied { Login failed with reason: Bad credentials } ``` I have tried: - deleted the `~/.cache/spotify-player/user_client_token.json` file each time - approving the authentication request with both `librewolf` and `brave-browser`. - excepting `accounts.spotify.com` from strict mode / enhanced tracking protection - removing and fully reinstalling from the latest github release `cargo install --git https://github.com/aome510/spotify-player --features image,notify,fzf` **To Reproduce** ``` cargo install --git https://github.com/aome510/spotify-player --features image,notify,fzf ## Librewolf browser rm ~/.cache/spotify-player/user_client_token.json sudo apt update && sudo apt install extrepo -y sudo extrepo enable librewolf sudo apt update && sudo apt install librewolf -y spotify_player # aprove the authentication request with librewolf ## Brave browser rm ~/.cache/spotify-player/user_client_token.json curl -fsS https://dl.brave.com/install.sh | sh export BROWSER=brave-browser spotify_player # aprove the authentication request with brave ``` **Expected behaviour** The app should accept the credentials. **Log and backtrace** Consistently the `.backtrace` will be empty and the last line of the `.log` will be with everything looking normal up to that point: ``` INFO librespot_core::session: Connecting to AP "ap-gew1.spotify.com:4070" ``` **Environment** OS: debian / POPOS Application version: 0.21.0 (built from github) Application features: image,notify,fzf
kerem 2026-03-14 14:55:40 +03:00
  • closed this issue
  • added the
    bug
    label
Author
Owner

@aome510 commented on GitHub (Sep 12, 2025):

deleted the ~/.cache/spotify-player/user_client_token.json file each time

did you try to delete ~/.cache/spotify-player/credentials.json? that is the actual credentials used to authenticate the app. The one you deleted is only used for Spotify Connect feature

<!-- gh-comment-id:3286634252 --> @aome510 commented on GitHub (Sep 12, 2025): > deleted the ~/.cache/spotify-player/user_client_token.json file each time did you try to delete `~/.cache/spotify-player/credentials.json`? that is the actual credentials used to authenticate the app. The one you deleted is only used for Spotify Connect feature
Author
Owner

@jasht1 commented on GitHub (Sep 12, 2025):

deleted the ~/.cache/spotify-player/user_client_token.json file each time

did you try to delete ~/.cache/spotify-player/credentials.json? that is the actual credentials used to authenticate the app. The one you deleted is only used for Spotify Connect feature

I see, thank you for the quick response!

<!-- gh-comment-id:3286636753 --> @jasht1 commented on GitHub (Sep 12, 2025): > > deleted the ~/.cache/spotify-player/user_client_token.json file each time > > did you try to delete `~/.cache/spotify-player/credentials.json`? that is the actual credentials used to authenticate the app. The one you deleted is only used for Spotify Connect feature I see, thank you for the quick response!
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/spotify-player#1434
No description provided.