spotify-player icon indicating copy to clipboard operation
spotify-player copied to clipboard

Cannot start any playback in GUI

Open theadepti opened this issue 10 months ago • 9 comments

Describe the bug In the GUI it just says "No playback found." When I press enter on a song, it doesn't start playback.

To Reproduce Go to any playlist and highlight a song. Then press enter

Expected behaviour I expected the playback to start playing the highlighted song

Log and backtrace My logs seem to have a lot of id's. So I'm not sure if I should upload them here. If it is perfectly safe to upload them here, let me know, I'll send all the logs right away

Screenshots

Image

Environment

  • OS: Ubuntu 22.04.5 LTS x86_64
  • Application version: spotify_player 0.20.4 from homebrew
  • Application features: I used homebrew, and didn't install any additional features explicitly

Additional context

I do get this error in the terminal when I close the player

ALSA lib conf.c:4029:(snd_config_hooks_call) Cannot open shared library libasound_module_conf_pulse.so (/home/linuxbrew/.linuxbrew/Cellar/alsa-lib/1.2.13/lib/alsa-lib/libasound_module_conf_pulse.so: cannot open shared object file: No such file or directory)
ALSA lib pcm.c:2722:(snd_pcm_open_noupdate) Unknown PCM default

theadepti avatar Feb 25 '25 14:02 theadepti

Does a device show up when you press shift+d?

DOD-101 avatar Mar 03 '25 19:03 DOD-101

Nope, just shows empty list

theadepti avatar Mar 16 '25 10:03 theadepti

shift+d will always show empty device list if you haven't set up Spotify Connect as described in https://github.com/aome510/spotify-player#spotify-connect.

ALSA lib conf.c:4029:(snd_config_hooks_call) Cannot open shared library libasound_module_conf_pulse.so (/home/linuxbrew/.linuxbrew/Cellar/alsa-lib/1.2.13/lib/alsa-lib/libasound_module_conf_pulse.so: cannot open shared object file: No such file or directory) ALSA lib pcm.c:2722:(snd_pcm_open_noupdate) Unknown PCM default

Regarding the above error, maybe you don't have some dependencies installed. Double check https://github.com/aome510/spotify-player#dependencies. Can also search up the error in the repo cause I think I saw a similar one before. I think the error is the reason why you cannot start any playback

aome510 avatar Mar 24 '25 16:03 aome510

I have the same issue, except that I do not have the error after closing the client, and all the necessary dependencies are present. I use spotify-player-full AUR package.

I also saw the command spotify_player playback start command, thought it would fix the issue, but I do not know what to provide next. Tried to run spotify_player playback start context --name spotify-player artist, but received a 404 not found. What else could be the issue that prevents playback?

SignificantNose avatar Mar 30 '25 13:03 SignificantNose

What else could be the issue that prevents playback?

hard to tell without any logs/backtraces. Refer to https://github.com/aome510/spotify-player?tab=readme-ov-file#logging for info on how to get one

aome510 avatar Mar 30 '25 15:03 aome510

output of the latest log I found:

2025-03-30T13:43:38.104558Z  INFO spotify_player: Configurations: Configs { ... }
2025-03-30T13:43:38.104667Z  INFO spotify_player::state::data: Loading Playlists data from /home/significantnose/.cache/spotify-player/Playlists_cache.json...

...

2025-03-30T13:43:38.255473Z  INFO spotify_player::streaming: Application's connect configurations: ConnectConfig { name: "spotify-player", device_type: Speaker, is_group: false, initial_volume: Some(45875), has_volume_ctrl: true }
2025-03-30T13:43:38.255486Z  INFO librespot_playback::mixer::softmixer: Mixing with softvol and volume control: Log(60.0)    
2025-03-30T13:43:38.255507Z  INFO spotify_player::streaming: Initializing a new integrated player with device_id=100f7e87-1040-46e4-ba90-7d964a02293c
2025-03-30T13:43:38.255553Z  INFO spotify_player::streaming: Starting an integrated Spotify player using librespot's spirc protocol
2025-03-30T13:43:38.255675Z  INFO librespot_playback::convert: Converting with ditherer: tpdf    
2025-03-30T13:43:38.255691Z  INFO librespot_playback::audio_backend::pulseaudio: Using PulseAudioSink with format: S16    
2025-03-30T13:43:38.907317Z  INFO librespot_core::session: Connecting to AP "ap-gew1.spotify.com:4070"    
2025-03-30T13:43:39.412895Z  INFO librespot_core::session: Authenticated as '...' !    
2025-03-30T13:43:39.412984Z  INFO librespot_core::session: Country: "..."    
2025-03-30T13:43:39.413013Z  INFO spotify_player::streaming: New streaming connection has been established!
2025-03-30T13:43:39.413018Z  INFO spotify_player::client: Used a new session for Spotify client.
2025-03-30T13:43:39.413023Z  INFO spotify_player::token: Getting a new authentication token...
2025-03-30T13:43:39.710022Z  INFO spotify_player::token: Got new token: Token { access_token: "...", expires_in: TimeDelta { secs: 3600, nanos: 0 }, expires_at: ..., refresh_token: None, scopes: {} }
2025-03-30T13:43:39.710115Z  INFO spotify_player: Starting a client socket at 127.0.0.1:8080
2025-03-30T13:43:39.710590Z  INFO spotify_player::media_control: Initializing application's media control event watcher...
2025-03-30T13:43:39.821740Z  INFO client_request{request=GetUserSavedShows}: spotify_player::client: Successfully handled the client request, took: 111ms
2025-03-30T13:43:39.830802Z  INFO client_request{request=GetCurrentUser}: spotify_player::client: Successfully handled the client request, took: 120ms
2025-03-30T13:43:40.242359Z  INFO client_request{request=GetUserPlaylists}: spotify_player::client: Successfully handled the client request, took: 532ms
2025-03-30T13:43:40.808382Z ERROR librespot_core::mercury: error 400 for uri hm://keymaster/token/authenticated?scope=user-read-recently-played,user-top-read,user-read-playback-position,user-read-playback-state,user-modify-playback-state,user-read-currently-playing,streaming,playlist-read-private,playlist-modify-private,playlist-modify-public,playlist-read-collaborative,user-follow-read,user-follow-modify,user-library-read,user-library-modify&client_id=...
&device_id=100f7e87-1040-46e4-ba90-7d964a02293c    
2025-03-30T13:43:40.808407Z ERROR spotify_player::client: Failed to find an available device: get access token: Service unavailable { error handling Mercury response: MercuryResponse { uri: "hm://keymaster/token/authenticated?scope=user-read-recently-played,user-top-read,user-read-playback-position,user-read-playback-state,user-modify-playback-state,user-read-currently-playing,streaming,playlist-read-private,playlist-modify-private,playlist-modify-public,playlist-read-collaborative,user-follow-read,user-follow-modify,user-library-read,user-library-modify&client_id=...\n&device_id=100f7e87-1040-46e4-ba90-7d964a02293c", status_code: 400, payload: [] } }
2025-03-30T13:43:40.845319Z ERROR librespot_core::mercury: error 400 for uri hm://keymaster/token/authenticated?scope=user-read-recently-played,user-top-read,user-read-playback-position,user-read-playback-state,user-modify-playback-state,user-read-currently-playing,streaming,playlist-read-private,playlist-modify-private,playlist-modify-public,playlist-read-collaborative,user-follow-read,user-follow-modify,user-library-read,user-library-modify&client_id=...
&device_id=100f7e87-1040-46e4-ba90-7d964a02293c    
2025-03-30T13:43:40.845396Z ERROR spotify_player::client: Failed to find an available device: get access token: Service unavailable { error handling Mercury response: MercuryResponse { uri: "hm://keymaster/token/authenticated?scope=user-read-recently-played,user-top-read,user-read-playback-position,user-read-playback-state,user-modify-playback-state,user-read-currently-playing,streaming,playlist-read-private,playlist-modify-private,playlist-modify-public,playlist-read-collaborative,user-follow-read,user-follow-modify,user-library-read,user-library-modify&client_id=...\n&device_id=100f7e87-1040-46e4-ba90-7d964a02293c", status_code: 400, payload: [] } }
2025-03-30T13:43:41.041026Z  INFO client_request{request=GetUserSavedAlbums}: spotify_player::client: Successfully handled the client request, took: 1330ms
2025-03-30T13:43:41.068176Z  INFO client_request{request=GetUserFollowedArtists}: spotify_player::client: Successfully handled the client request, took: 1357ms
2025-03-30T13:43:41.645418Z ERROR librespot_core::mercury: error 400 for uri hm://keymaster/token/authenticated?scope=user-read-recently-played,user-top-read,user-read-playback-position,user-read-playback-state,user-modify-playback-state,user-read-currently-playing,streaming,playlist-read-private,playlist-modify-private,playlist-modify-public,playlist-read-collaborative,user-follow-read,user-follow-modify,user-library-read,user-library-modify&client_id=...
&device_id=100f7e87-1040-46e4-ba90-7d964a02293c    
2025-03-30T13:43:41.645455Z ERROR client_request{request=GetDevices}: spotify_player::client::handlers: Failed to handle client request: get access token: Service unavailable { error handling Mercury response: MercuryResponse { uri: "hm://keymaster/token/authenticated?scope=user-read-recently-played,user-top-read,user-read-playback-position,user-read-playback-state,user-modify-playback-state,user-read-currently-playing,streaming,playlist-read-private,playlist-modify-private,playlist-modify-public,playlist-read-collaborative,user-follow-read,user-follow-modify,user-library-read,user-library-modify&client_id=...\n&device_id=100f7e87-1040-46e4-ba90-7d964a02293c", status_code: 400, payload: [] } }
2025-03-30T13:43:41.894802Z ERROR librespot_core::mercury: error 400 for uri hm://keymaster/token/authenticated?scope=user-read-recently-played,user-top-read,user-read-playback-position,user-read-playback-state,user-modify-playback-state,user-read-currently-playing,streaming,playlist-read-private,playlist-modify-private,playlist-modify-public,playlist-read-collaborative,user-follow-read,user-follow-modify,user-library-read,user-library-modify&client_id=...
&device_id=100f7e87-1040-46e4-ba90-7d964a02293c    
2025-03-30T13:43:41.894828Z ERROR spotify_player::client: Failed to find an available device: get access token: Service unavailable { error handling Mercury response: MercuryResponse { uri: "hm://keymaster/token/authenticated?scope=user-read-recently-played,user-top-read,user-read-playback-position,user-read-playback-state,user-modify-playback-state,user-read-currently-playing,streaming,playlist-read-private,playlist-modify-private,playlist-modify-public,playlist-read-collaborative,user-follow-read,user-follow-modify,user-library-read,user-library-modify&client_id=...\n&device_id=100f7e87-1040-46e4-ba90-7d964a02293c", status_code: 400, payload: [] } }
2025-03-30T13:43:41.935090Z ERROR librespot_core::mercury: error 400 for uri hm://keymaster/token/authenticated?scope=user-read-recently-played,user-top-read,user-read-playback-position,user-read-playback-state,user-modify-playback-state,user-read-currently-playing,streaming,playlist-read-private,playlist-modify-private,playlist-modify-public,playlist-read-collaborative,user-follow-read,user-follow-modify,user-library-read,user-library-modify&client_id=...
&device_id=100f7e87-1040-46e4-ba90-7d964a02293c    
2025-03-30T13:43:41.935117Z ERROR spotify_player::client: Failed to find an available device: get access token: Service unavailable { error handling Mercury response: MercuryResponse { uri: "hm://keymaster/token/authenticated?scope=user-read-recently-played,user-top-read,user-read-playback-position,user-read-playback-state,user-modify-playback-state,user-read-currently-playing,streaming,playlist-read-private,playlist-modify-private,playlist-modify-public,playlist-read-collaborative,user-follow-read,user-follow-modify,user-library-read,user-library-modify&client_id=...\n&device_id=100f7e87-1040-46e4-ba90-7d964a02293c", status_code: 400, payload: [] } }
2025-03-30T13:43:42.977364Z ERROR librespot_core::mercury: error 400 for uri hm://keymaster/token/authenticated?scope=user-read-recently-played,user-top-read,user-read-playback-position,user-read-playback-state,user-modify-playback-state,user-read-currently-playing,streaming,playlist-read-private,playlist-modify-private,playlist-modify-public,playlist-read-collaborative,user-follow-read,user-follow-modify,user-library-read,user-library-modify&client_id=...
&device_id=100f7e87-1040-46e4-ba90-7d964a02293c    
2025-03-30T13:43:42.977399Z ERROR spotify_player::client: Failed to find an available device: get access token: Service unavailable { error handling Mercury response: MercuryResponse { uri: "hm://keymaster/token/authenticated?scope=user-read-recently-played,user-top-read,user-read-playback-position,user-read-playback-state,user-modify-playback-state,user-read-currently-playing,streaming,playlist-read-private,playlist-modify-private,playlist-modify-public,playlist-read-collaborative,user-follow-read,user-follow-modify,user-library-read,user-library-modify&client_id=...\n&device_id=100f7e87-1040-46e4-ba90-7d964a02293c", status_code: 400, payload: [] } }
2025-03-30T13:43:43.031015Z ERROR librespot_core::mercury: error 400 for uri hm://keymaster/token/authenticated?scope=user-read-recently-played,user-top-read,user-read-playback-position,user-read-playback-state,user-modify-playback-state,user-read-currently-playing,streaming,playlist-read-private,playlist-modify-private,playlist-modify-public,playlist-read-collaborative,user-follow-read,user-follow-modify,user-library-read,user-library-modify&client_id=...
&device_id=100f7e87-1040-46e4-ba90-7d964a02293c    
2025-03-30T13:43:43.031038Z ERROR spotify_player::client: Failed to find an available device: get access token: Service unavailable { error handling Mercury response: MercuryResponse { uri: "hm://keymaster/token/authenticated?scope=user-read-recently-played,user-top-read,user-read-playback-position,user-read-playback-state,user-modify-playback-state,user-read-currently-playing,streaming,playlist-read-private,playlist-modify-private,playlist-modify-public,playlist-read-collaborative,user-follow-read,user-follow-modify,user-library-read,user-library-modify&client_id=...\n&device_id=100f7e87-1040-46e4-ba90-7d964a02293c", status_code: 400, payload: [] } }
2025-03-30T13:43:44.065927Z ERROR librespot_core::mercury: error 400 for uri hm://keymaster/token/authenticated?scope=user-read-recently-played,user-top-read,user-read-playback-position,user-read-playback-state,user-modify-playback-state,user-read-currently-playing,streaming,playlist-read-private,playlist-modify-private,playlist-modify-public,playlist-read-collaborative,user-follow-read,user-follow-modify,user-library-read,user-library-modify&client_id=...
&device_id=100f7e87-1040-46e4-ba90-7d964a02293c    
2025-03-30T13:43:44.066007Z ERROR spotify_player::client: Failed to find an available device: get access token: Service unavailable { error handling Mercury response: MercuryResponse { uri: "hm://keymaster/token/authenticated?scope=user-read-recently-played,user-top-read,user-read-playback-position,user-read-playback-state,user-modify-playback-state,user-read-currently-playing,streaming,playlist-read-private,playlist-modify-private,playlist-modify-public,playlist-read-collaborative,user-follow-read,user-follow-modify,user-library-read,user-library-modify&client_id=...\n&device_id=100f7e87-1040-46e4-ba90-7d964a02293c", status_code: 400, payload: [] } }
2025-03-30T13:43:44.123260Z ERROR librespot_core::mercury: error 400 for uri hm://keymaster/token/authenticated?scope=user-read-recently-played,user-top-read,user-read-playback-position,user-read-playback-state,user-modify-playback-state,user-read-currently-playing,streaming,playlist-read-private,playlist-modify-private,playlist-modify-public,playlist-read-collaborative,user-follow-read,user-follow-modify,user-library-read,user-library-modify&client_id=...
&device_id=100f7e87-1040-46e4-ba90-7d964a02293c    
2025-03-30T13:43:44.123289Z ERROR spotify_player::client: Failed to find an available device: get access token: Service unavailable { error handling Mercury response: MercuryResponse { uri: "hm://keymaster/token/authenticated?scope=user-read-recently-played,user-top-read,user-read-playback-position,user-read-playback-state,user-modify-playback-state,user-read-currently-playing,streaming,playlist-read-private,playlist-modify-private,playlist-modify-public,playlist-read-collaborative,user-follow-read,user-follow-modify,user-library-read,user-library-modify&client_id=...\n&device_id=100f7e87-1040-46e4-ba90-7d964a02293c", status_code: 400, payload: [] } }
2025-03-30T13:43:45.169716Z ERROR librespot_core::mercury: error 400 for uri hm://keymaster/token/authenticated?scope=user-read-recently-played,user-top-read,user-read-playback-position,user-read-playback-state,user-modify-playback-state,user-read-currently-playing,streaming,playlist-read-private,playlist-modify-private,playlist-modify-public,playlist-read-collaborative,user-follow-read,user-follow-modify,user-library-read,user-library-modify&client_id=...
&device_id=100f7e87-1040-46e4-ba90-7d964a02293c    
2025-03-30T13:43:45.169776Z ERROR spotify_player::client: Failed to find an available device: get access token: Service unavailable { error handling Mercury response: MercuryResponse { uri: "hm://keymaster/token/authenticated?scope=user-read-recently-played,user-top-read,user-read-playback-position,user-read-playback-state,user-modify-playback-state,user-read-currently-playing,streaming,playlist-read-private,playlist-modify-private,playlist-modify-public,playlist-read-collaborative,user-follow-read,user-follow-modify,user-library-read,user-library-modify&client_id=...\n&device_id=100f7e87-1040-46e4-ba90-7d964a02293c", status_code: 400, payload: [] } }
2025-03-30T13:43:45.218924Z ERROR librespot_core::mercury: error 400 for uri hm://keymaster/token/authenticated?scope=user-read-recently-played,user-top-read,user-read-playback-position,user-read-playback-state,user-modify-playback-state,user-read-currently-playing,streaming,playlist-read-private,playlist-modify-private,playlist-modify-public,playlist-read-collaborative,user-follow-read,user-follow-modify,user-library-read,user-library-modify&client_id=...
&device_id=100f7e87-1040-46e4-ba90-7d964a02293c    
2025-03-30T13:43:45.218960Z ERROR spotify_player::client: Failed to find an available device: get access token: Service unavailable { error handling Mercury response: MercuryResponse { uri: "hm://keymaster/token/authenticated?scope=user-read-recently-played,user-top-read,user-read-playback-position,user-read-playback-state,user-modify-playback-state,user-read-currently-playing,streaming,playlist-read-private,playlist-modify-private,playlist-modify-public,playlist-read-collaborative,user-follow-read,user-follow-modify,user-library-read,user-library-modify&client_id=...\n&device_id=100f7e87-1040-46e4-ba90-7d964a02293c", status_code: 400, payload: [] } }
2025-03-30T13:43:45.686599Z  INFO client_request{request=GetUserSavedTracks}: spotify_player::client: Successfully handled the client request, took: 5976ms

SignificantNose avatar Mar 30 '25 15:03 SignificantNose

Thanks for reporting. I think

ERROR librespot_core::mercury: error 400 for uri hm://keymaster/token/authenticated?scope=user-read-recently-played,user-top-read,user-read-playback-position,user-read-playback-state,user-modify-playback-state,user-read-currently-playing,streaming,playlist-read-private,playlist-modify-private,playlist-modify-public,playlist-read-collaborative,user-follow-read,user-follow-modify,user-library-read,user-library-modify&client_id=... &device_id=100f7e87-1040-46e4-ba90-7d964a02293c

is the reason for failing to start playback. That said, this is the first time I see such error though, so don't really know how to fix it

aome510 avatar Mar 30 '25 20:03 aome510

Was having a similar issue where no devices would show up in shift + d menu. Adding the spotify connect functionality (https://github.com/aome510/spotify-player?tab=readme-ov-file#spotify-connect) fixed it on my end, so I figured I'd say something just in case someone has the same problem.

Fireye04 avatar May 04 '25 21:05 Fireye04

I had the same issue when installing with the pulseaudio-backend backend without setting --no-default-features. Installing again with the flag set solved the issue

Domerpig avatar May 07 '25 21:05 Domerpig