[GH-ISSUE #924] Strange terminal behaviour after 0.22 update #557

Closed
opened 2026-03-02 23:48:39 +03:00 by kerem · 2 comments
Owner

Originally created by @felprangel on GitHub (Feb 10, 2026).
Original GitHub issue: https://github.com/aome510/spotify-player/issues/924

Describe the bug
Just upgraded to 0.22 and opening the app makes some strange behaviour on the terminal

My terminal is alacritty, tested on kitty and im facing the same error

The inputs in the image are from my mouse movement, any key pressed on the keyboard is also logged

Cntrl + C stops working too

To Reproduce
Just open the app after the new update

Expected behaviour
Expected to not open the terminal after the app launches

Log and backtrace
Backtrace is empty
Log:

2026-02-10T13:34:03.270249Z  INFO spotify_player: Configurations: Configs { app_config: AppConfig { theme: "dracula", client_id: Some("d420a117a32841c2b3474932e49fb54b"), client_id_command: None, client_port: 8080, login_redirect_uri: "http://127.0.0.1:8989/login", log_folder: Some("/home/felipe/.cache/spotify-player"), player_event_hook_command: None, playback_format: "{status} {track} • {artists}\n{album}\n{metadata}", playback_metadata_fields: ["repeat", "shuffle", "volume", "device"], tracks_playback_limit: 50, proxy: None, ap_port: None, app_refresh_duration_in_ms: 32, playback_refresh_duration_in_ms: 0, page_size_in_rows: 20, play_icon: "▶", pause_icon: "▌▌", liked_icon: "♥", explicit_icon: "(E)", border_type: Plain, progress_bar_type: Rectangle, progress_bar_position: Bottom, layout: LayoutConfig { library: LibraryLayoutConfig { playlist_percent: 40, album_percent: 40 }, playback_window_position: Top, playback_window_height: 6 }, genre_num: 2, enable_media_control: true, enable_streaming: Always, enable_cover_image_cache: true, default_device: "spotify-player", device: DeviceConfig { name: "spotify-player", device_type: "speaker", volume: 70, bitrate: 320, audio_cache: false, normalization: false, autoplay: false }, seek_duration_secs: 5, sort_artist_albums_by_type: false }, keymap_config: KeymapConfig { keymaps: [Keymap { key_sequence: KeySequence { keys: [None(Char('n'))] }, command: NextTrack }, Keymap { key_sequence: KeySequence { keys: [None(Char('p'))] }, command: PreviousTrack }, Keymap { key_sequence: KeySequence { keys: [None(Char('.'))] }, command: PlayRandom }, Keymap { key_sequence: KeySequence { keys: [None(Char(' '))] }, command: ResumePause }, Keymap { key_sequence: KeySequence { keys: [Ctrl(Char('r'))] }, command: Repeat }, Keymap { key_sequence: KeySequence { keys: [Ctrl(Char('s'))] }, command: Shuffle }, Keymap { key_sequence: KeySequence { keys: [None(Char('+'))] }, command: VolumeChange { offset: 5 } }, Keymap { key_sequence: KeySequence { keys: [None(Char('-'))] }, command: VolumeChange { offset: -5 } }, Keymap { key_sequence: KeySequence { keys: [None(Char('_'))] }, command: Mute }, Keymap { key_sequence: KeySequence { keys: [None(Char('^'))] }, command: SeekStart }, Keymap { key_sequence: KeySequence { keys: [None(Char('>'))] }, command: SeekForward { duration: None } }, Keymap { key_sequence: KeySequence { keys: [None(Char('<'))] }, command: SeekBackward { duration: None } }, Keymap { key_sequence: KeySequence { keys: [None(Enter)] }, command: ChooseSelected }, Keymap { key_sequence: KeySequence { keys: [None(Char('r'))] }, command: RefreshPlayback }, Keymap { key_sequence: KeySequence { keys: [None(Char('/'))] }, command: Search }, Keymap { key_sequence: KeySequence { keys: [None(Char('z'))] }, command: Queue }, Keymap { key_sequence: KeySequence { keys: [Ctrl(Char('z'))] }, command: AddSelectedItemToQueue }, Keymap { key_sequence: KeySequence { keys: [None(Char('Z'))] }, command: AddSelectedItemToQueue }, Keymap { key_sequence: KeySequence { keys: [Ctrl(Char('g'))] }, command: JumpToHighlightTrackInContext }, Keymap { key_sequence: KeySequence { keys: [Ctrl(Char(' '))] }, command: ShowActionsOnSelectedItem }, Keymap { key_sequence: KeySequence { keys: [None(Char('g')), None(Char('a'))] }, command: ShowActionsOnSelectedItem }, Keymap { key_sequence: KeySequence { keys: [None(Char('a'))] }, command: ShowActionsOnCurrentTrack }, Keymap { key_sequence: KeySequence { keys: [None(Char('A'))] }, command: ShowActionsOnCurrentContext }, Keymap { key_sequence: KeySequence { keys: [None(Char('R'))] }, command: RestartIntegratedClient }, Keymap { key_sequence: KeySequence { keys: [None(Tab)] }, command: FocusNextWindow }, Keymap { key_sequence: KeySequence { keys: [None(BackTab)] }, command: FocusPreviousWindow }, Keymap { key_sequence: KeySequence { keys: [None(Char('T'))] }, command: SwitchTheme }, Keymap { key_sequence: KeySequence { keys: [None(Char('D'))] }, command: SwitchDevice }, Keymap { key_sequence: KeySequence { keys: [None(Char('u')), None(Char('p'))] }, command: BrowseUserPlaylists }, Keymap { key_sequence: KeySequence { keys: [None(Char('u')), None(Char('a'))] }, command: BrowseUserFollowedArtists }, Keymap { key_sequence: KeySequence { keys: [None(Char('u')), None(Char('A'))] }, command: BrowseUserSavedAlbums }, Keymap { key_sequence: KeySequence { keys: [None(Char('g')), None(Char(' '))] }, command: CurrentlyPlayingContextPage }, Keymap { key_sequence: KeySequence { keys: [None(Char('g')), None(Char('t'))] }, command: TopTrackPage }, Keymap { key_sequence: KeySequence { keys: [None(Char('g')), None(Char('r'))] }, command: RecentlyPlayedTrackPage }, Keymap { key_sequence: KeySequence { keys: [None(Char('g')), None(Char('y'))] }, command: LikedTrackPage }, Keymap { key_sequence: KeySequence { keys: [None(Char('g')), None(Char('L'))] }, command: LyricsPage }, Keymap { key_sequence: KeySequence { keys: [None(Char('l'))] }, command: LyricsPage }, Keymap { key_sequence: KeySequence { keys: [None(Char('g')), None(Char('l'))] }, command: LibraryPage }, Keymap { key_sequence: KeySequence { keys: [None(Char('g')), None(Char('s'))] }, command: SearchPage }, Keymap { key_sequence: KeySequence { keys: [None(Char('g')), None(Char('b'))] }, command: BrowsePage }, Keymap { key_sequence: KeySequence { keys: [None(Backspace)] }, command: PreviousPage }, Keymap { key_sequence: KeySequence { keys: [Ctrl(Char('q'))] }, command: PreviousPage }, Keymap { key_sequence: KeySequence { keys: [None(Char('O'))] }, command: OpenSpotifyLinkFromClipboard }, Keymap { key_sequence: KeySequence { keys: [None(Char('?'))] }, command: OpenCommandHelp }, Keymap { key_sequence: KeySequence { keys: [Ctrl(Char('h'))] }, command: OpenCommandHelp }, Keymap { key_sequence: KeySequence { keys: [None(Char('q'))] }, command: Quit }, Keymap { key_sequence: KeySequence { keys: [Ctrl(Char('c'))] }, command: Quit }, Keymap { key_sequence: KeySequence { keys: [None(Esc)] }, command: ClosePopup }, Keymap { key_sequence: KeySequence { keys: [None(Char('j'))] }, command: SelectNextOrScrollDown }, Keymap { key_sequence: KeySequence { keys: [Ctrl(Char('n'))] }, command: SelectNextOrScrollDown }, Keymap { key_sequence: KeySequence { keys: [None(Down)] }, command: SelectNextOrScrollDown }, Keymap { key_sequence: KeySequence { keys: [None(Char('k'))] }, command: SelectPreviousOrScrollUp }, Keymap { key_sequence: KeySequence { keys: [Ctrl(Char('p'))] }, command: SelectPreviousOrScrollUp }, Keymap { key_sequence: KeySequence { keys: [None(Up)] }, command: SelectPreviousOrScrollUp }, Keymap { key_sequence: KeySequence { keys: [None(PageUp)] }, command: PageSelectPreviousOrScrollUp }, Keymap { key_sequence: KeySequence { keys: [Ctrl(Char('b'))] }, command: PageSelectPreviousOrScrollUp }, Keymap { key_sequence: KeySequence { keys: [None(PageDown)] }, command: PageSelectNextOrScrollDown }, Keymap { key_sequence: KeySequence { keys: [Ctrl(Char('f'))] }, command: PageSelectNextOrScrollDown }, Keymap { key_sequence: KeySequence { keys: [None(Char('g')), None(Char('g'))] }, command: SelectFirstOrScrollToTop }, Keymap { key_sequence: KeySequence { keys: [None(Char('G'))] }, command: SelectLastOrScrollToBottom }, Keymap { key_sequence: KeySequence { keys: [None(End)] }, command: SelectLastOrScrollToBottom }, Keymap { key_sequence: KeySequence { keys: [None(Char('s')), None(Char('t'))] }, command: SortTrackByTitle }, Keymap { key_sequence: KeySequence { keys: [None(Char('s')), None(Char('a'))] }, command: SortTrackByArtists }, Keymap { key_sequence: KeySequence { keys: [None(Char('s')), None(Char('A'))] }, command: SortTrackByAlbum }, Keymap { key_sequence: KeySequence { keys: [None(Char('s')), None(Char('d'))] }, command: SortTrackByDuration }, Keymap { key_sequence: KeySequence { keys: [None(Char('s')), None(Char('D'))] }, command: SortTrackByAddedDate }, Keymap { key_sequence: KeySequence { keys: [None(Char('s')), None(Char('r'))] }, command: ReverseTrackOrder }, Keymap { key_sequence: KeySequence { keys: [None(Char('s')), None(Char('l')), None(Char('a'))] }, command: SortLibraryAlphabetically }, Keymap { key_sequence: KeySequence { keys: [None(Char('s')), None(Char('l')), None(Char('r'))] }, command: SortLibraryByRecent }, Keymap { key_sequence: KeySequence { keys: [Ctrl(Char('k'))] }, command: MovePlaylistItemUp }, Keymap { key_sequence: KeySequence { keys: [Ctrl(Char('j'))] }, command: MovePlaylistItemDown }, Keymap { key_sequence: KeySequence { keys: [None(Char('N'))] }, command: CreatePlaylist }, Keymap { key_sequence: KeySequence { keys: [None(Char('g')), None(Char('c'))] }, command: JumpToCurrentTrackInContext }], actions: [] }, theme_config: ThemeConfig { themes: [Theme { name: "default", palette: Palette { background: None, foreground: None, black: Color { color: Black }, blue: Color { color: Blue }, cyan: Color { color: Cyan }, green: Color { color: Green }, magenta: Color { color: Magenta }, red: Color { color: Red }, white: Color { color: Gray }, yellow: Color { color: Yellow }, bright_black: Color { color: DarkGray }, bright_white: Color { color: White }, bright_red: Color { color: LightRed }, bright_magenta: Color { color: LightMagenta }, bright_green: Color { color: LightGreen }, bright_cyan: Color { color: LightCyan }, bright_blue: Color { color: LightBlue }, bright_yellow: Color { color: LightYellow } }, component_style: ComponentStyle { block_title: None, border: None, playback_status: None, playback_track: None, playback_artists: None, playback_album: None, playback_genres: None, playback_metadata: None, playback_progress_bar: None, playback_progress_bar_unfilled: None, current_playing: None, page_desc: None, playlist_desc: None, table_header: None, selection: None, secondary_row: None, like: None, lyrics_played: None, lyrics_playing: None } }] }, cache_folder: "/home/felipe/.cache/spotify-player" }
2026-02-10T13:34:03.270418Z  INFO spotify_player::state::data: Loading Playlists data from /home/felipe/.cache/spotify-player/Playlists_cache.json...
2026-02-10T13:34:03.270474Z  INFO spotify_player::state::data: Successfully loaded Playlists data!
2026-02-10T13:34:03.270481Z  INFO spotify_player::state::data: Loading FollowedArtists data from /home/felipe/.cache/spotify-player/FollowedArtists_cache.json...
2026-02-10T13:34:03.270499Z  INFO spotify_player::state::data: Successfully loaded FollowedArtists data!
2026-02-10T13:34:03.270503Z  INFO spotify_player::state::data: Loading SavedShows data from /home/felipe/.cache/spotify-player/SavedShows_cache.json...
2026-02-10T13:34:03.270513Z  INFO spotify_player::state::data: Successfully loaded SavedShows data!
2026-02-10T13:34:03.270516Z  INFO spotify_player::state::data: Loading SavedAlbums data from /home/felipe/.cache/spotify-player/SavedAlbums_cache.json...
2026-02-10T13:34:03.270559Z  INFO spotify_player::state::data: Successfully loaded SavedAlbums data!
2026-02-10T13:34:03.270563Z  INFO spotify_player::state::data: Loading SavedTracks data from /home/felipe/.cache/spotify-player/SavedTracks_cache.json...
2026-02-10T13:34:03.270571Z  INFO spotify_player::state::data: Successfully loaded SavedTracks data!
2026-02-10T13:34:03.339920Z  INFO spotify_player::auth: Using cached credentials
2026-02-10T13:34:03.339940Z  INFO spotify_player::streaming: Application's connect configurations: ConnectConfig { name: "spotify-player", device_type: Speaker, is_group: false, initial_volume: 45875, disable_volume: false, volume_steps: 64 }
2026-02-10T13:34:03.339959Z  INFO librespot_playback::mixer::softmixer: Mixing with softvol and volume control: Log(60.0)
2026-02-10T13:34:03.339986Z  INFO spotify_player::streaming: Initializing a new integrated player with device_id=aaf2d823-df35-4a78-aefa-847d0e03fbf2
2026-02-10T13:34:03.340076Z  INFO spotify_player::streaming: Starting an integrated Spotify player using librespot's spirc protocol
2026-02-10T13:34:03.340110Z  INFO librespot_playback::convert: Converting with ditherer: tpdf
2026-02-10T13:34:03.340130Z  INFO librespot_playback::audio_backend::rodio: Using Rodio sink with format S16 and cpal host: ALSA
2026-02-10T13:34:03.340134Z  INFO librespot_playback::audio_backend::rodio: Using audio device: default
2026-02-10T13:34:03.792172Z  INFO librespot_core::session: Connecting to AP "ap-gue1.spotify.com:4070"
2026-02-10T13:34:04.350184Z  INFO librespot_core::session: Authenticated as '9pnom570s50z6zm6gogsyledd' !
2026-02-10T13:34:04.350304Z  INFO librespot_core::session: Country: "BR"
2026-02-10T13:34:04.591773Z  INFO spotify_player::streaming: New streaming connection has been established!
2026-02-10T13:34:04.591799Z  INFO spotify_player::client: Used a new session for Spotify client.
2026-02-10T13:34:04.819272Z  INFO librespot_core::spclient: Resolved "gue1-spclient.spotify.com:443" as spclient access point
2026-02-10T13:34:04.825521Z  INFO spotify_player::cli::client: Starting a client socket at 127.0.0.1:8080
2026-02-10T13:34:04.825984Z  INFO spotify_player::media_control: Initializing application's media control event watcher...
2026-02-10T13:34:04.826152Z ERROR client_request{request=GetUserPlaylists}: spotify_player::client::handlers: Failed to handle client request: error sending request for url (https://api.spotify.com/v1/me/playlists?offset=50&market=from_token&limit=50): client error (Connect): dns error: task 69 was cancelled
2026-02-10T13:34:04.826155Z ERROR client_request{request=GetUserSavedTracks}: spotify_player::client::handlers: Failed to handle client request: error sending request for url (https://api.spotify.com/v1/me/tracks?offset=50&market=from_token&limit=50): client error (Connect): dns error: task 70 was cancelled
2026-02-10T13:34:04.826192Z ERROR client_request{request=GetUserSavedAlbums}: spotify_player::client::handlers: Failed to handle client request: error sending request for url (https://api.spotify.com/v1/me/albums?market=from_token&limit=50&offset=0): client error (Connect): dns error: task 67 was cancelled
2026-02-10T13:34:04.826194Z ERROR client_request{request=GetUserSavedShows}: spotify_player::client::handlers: Failed to handle client request: error sending request for url (https://api.spotify.com/v1/me/shows?offset=50&market=from_token&limit=50): client error (Connect): dns error: task 68 was cancelled

Please refer to this URL for more details.

Screenshots
Image

Environment

  • OS: ubuntu
  • Application version: 0.ww

Additional context
Im on hyprland, if its relevant

Originally created by @felprangel on GitHub (Feb 10, 2026). Original GitHub issue: https://github.com/aome510/spotify-player/issues/924 **Describe the bug** Just upgraded to 0.22 and opening the app makes some strange behaviour on the terminal My terminal is alacritty, tested on kitty and im facing the same error The inputs in the image are from my mouse movement, any key pressed on the keyboard is also logged Cntrl + C stops working too **To Reproduce** Just open the app after the new update **Expected behaviour** Expected to not open the terminal after the app launches **Log and backtrace** Backtrace is empty Log: ``` 2026-02-10T13:34:03.270249Z INFO spotify_player: Configurations: Configs { app_config: AppConfig { theme: "dracula", client_id: Some("d420a117a32841c2b3474932e49fb54b"), client_id_command: None, client_port: 8080, login_redirect_uri: "http://127.0.0.1:8989/login", log_folder: Some("/home/felipe/.cache/spotify-player"), player_event_hook_command: None, playback_format: "{status} {track} • {artists}\n{album}\n{metadata}", playback_metadata_fields: ["repeat", "shuffle", "volume", "device"], tracks_playback_limit: 50, proxy: None, ap_port: None, app_refresh_duration_in_ms: 32, playback_refresh_duration_in_ms: 0, page_size_in_rows: 20, play_icon: "▶", pause_icon: "▌▌", liked_icon: "♥", explicit_icon: "(E)", border_type: Plain, progress_bar_type: Rectangle, progress_bar_position: Bottom, layout: LayoutConfig { library: LibraryLayoutConfig { playlist_percent: 40, album_percent: 40 }, playback_window_position: Top, playback_window_height: 6 }, genre_num: 2, enable_media_control: true, enable_streaming: Always, enable_cover_image_cache: true, default_device: "spotify-player", device: DeviceConfig { name: "spotify-player", device_type: "speaker", volume: 70, bitrate: 320, audio_cache: false, normalization: false, autoplay: false }, seek_duration_secs: 5, sort_artist_albums_by_type: false }, keymap_config: KeymapConfig { keymaps: [Keymap { key_sequence: KeySequence { keys: [None(Char('n'))] }, command: NextTrack }, Keymap { key_sequence: KeySequence { keys: [None(Char('p'))] }, command: PreviousTrack }, Keymap { key_sequence: KeySequence { keys: [None(Char('.'))] }, command: PlayRandom }, Keymap { key_sequence: KeySequence { keys: [None(Char(' '))] }, command: ResumePause }, Keymap { key_sequence: KeySequence { keys: [Ctrl(Char('r'))] }, command: Repeat }, Keymap { key_sequence: KeySequence { keys: [Ctrl(Char('s'))] }, command: Shuffle }, Keymap { key_sequence: KeySequence { keys: [None(Char('+'))] }, command: VolumeChange { offset: 5 } }, Keymap { key_sequence: KeySequence { keys: [None(Char('-'))] }, command: VolumeChange { offset: -5 } }, Keymap { key_sequence: KeySequence { keys: [None(Char('_'))] }, command: Mute }, Keymap { key_sequence: KeySequence { keys: [None(Char('^'))] }, command: SeekStart }, Keymap { key_sequence: KeySequence { keys: [None(Char('>'))] }, command: SeekForward { duration: None } }, Keymap { key_sequence: KeySequence { keys: [None(Char('<'))] }, command: SeekBackward { duration: None } }, Keymap { key_sequence: KeySequence { keys: [None(Enter)] }, command: ChooseSelected }, Keymap { key_sequence: KeySequence { keys: [None(Char('r'))] }, command: RefreshPlayback }, Keymap { key_sequence: KeySequence { keys: [None(Char('/'))] }, command: Search }, Keymap { key_sequence: KeySequence { keys: [None(Char('z'))] }, command: Queue }, Keymap { key_sequence: KeySequence { keys: [Ctrl(Char('z'))] }, command: AddSelectedItemToQueue }, Keymap { key_sequence: KeySequence { keys: [None(Char('Z'))] }, command: AddSelectedItemToQueue }, Keymap { key_sequence: KeySequence { keys: [Ctrl(Char('g'))] }, command: JumpToHighlightTrackInContext }, Keymap { key_sequence: KeySequence { keys: [Ctrl(Char(' '))] }, command: ShowActionsOnSelectedItem }, Keymap { key_sequence: KeySequence { keys: [None(Char('g')), None(Char('a'))] }, command: ShowActionsOnSelectedItem }, Keymap { key_sequence: KeySequence { keys: [None(Char('a'))] }, command: ShowActionsOnCurrentTrack }, Keymap { key_sequence: KeySequence { keys: [None(Char('A'))] }, command: ShowActionsOnCurrentContext }, Keymap { key_sequence: KeySequence { keys: [None(Char('R'))] }, command: RestartIntegratedClient }, Keymap { key_sequence: KeySequence { keys: [None(Tab)] }, command: FocusNextWindow }, Keymap { key_sequence: KeySequence { keys: [None(BackTab)] }, command: FocusPreviousWindow }, Keymap { key_sequence: KeySequence { keys: [None(Char('T'))] }, command: SwitchTheme }, Keymap { key_sequence: KeySequence { keys: [None(Char('D'))] }, command: SwitchDevice }, Keymap { key_sequence: KeySequence { keys: [None(Char('u')), None(Char('p'))] }, command: BrowseUserPlaylists }, Keymap { key_sequence: KeySequence { keys: [None(Char('u')), None(Char('a'))] }, command: BrowseUserFollowedArtists }, Keymap { key_sequence: KeySequence { keys: [None(Char('u')), None(Char('A'))] }, command: BrowseUserSavedAlbums }, Keymap { key_sequence: KeySequence { keys: [None(Char('g')), None(Char(' '))] }, command: CurrentlyPlayingContextPage }, Keymap { key_sequence: KeySequence { keys: [None(Char('g')), None(Char('t'))] }, command: TopTrackPage }, Keymap { key_sequence: KeySequence { keys: [None(Char('g')), None(Char('r'))] }, command: RecentlyPlayedTrackPage }, Keymap { key_sequence: KeySequence { keys: [None(Char('g')), None(Char('y'))] }, command: LikedTrackPage }, Keymap { key_sequence: KeySequence { keys: [None(Char('g')), None(Char('L'))] }, command: LyricsPage }, Keymap { key_sequence: KeySequence { keys: [None(Char('l'))] }, command: LyricsPage }, Keymap { key_sequence: KeySequence { keys: [None(Char('g')), None(Char('l'))] }, command: LibraryPage }, Keymap { key_sequence: KeySequence { keys: [None(Char('g')), None(Char('s'))] }, command: SearchPage }, Keymap { key_sequence: KeySequence { keys: [None(Char('g')), None(Char('b'))] }, command: BrowsePage }, Keymap { key_sequence: KeySequence { keys: [None(Backspace)] }, command: PreviousPage }, Keymap { key_sequence: KeySequence { keys: [Ctrl(Char('q'))] }, command: PreviousPage }, Keymap { key_sequence: KeySequence { keys: [None(Char('O'))] }, command: OpenSpotifyLinkFromClipboard }, Keymap { key_sequence: KeySequence { keys: [None(Char('?'))] }, command: OpenCommandHelp }, Keymap { key_sequence: KeySequence { keys: [Ctrl(Char('h'))] }, command: OpenCommandHelp }, Keymap { key_sequence: KeySequence { keys: [None(Char('q'))] }, command: Quit }, Keymap { key_sequence: KeySequence { keys: [Ctrl(Char('c'))] }, command: Quit }, Keymap { key_sequence: KeySequence { keys: [None(Esc)] }, command: ClosePopup }, Keymap { key_sequence: KeySequence { keys: [None(Char('j'))] }, command: SelectNextOrScrollDown }, Keymap { key_sequence: KeySequence { keys: [Ctrl(Char('n'))] }, command: SelectNextOrScrollDown }, Keymap { key_sequence: KeySequence { keys: [None(Down)] }, command: SelectNextOrScrollDown }, Keymap { key_sequence: KeySequence { keys: [None(Char('k'))] }, command: SelectPreviousOrScrollUp }, Keymap { key_sequence: KeySequence { keys: [Ctrl(Char('p'))] }, command: SelectPreviousOrScrollUp }, Keymap { key_sequence: KeySequence { keys: [None(Up)] }, command: SelectPreviousOrScrollUp }, Keymap { key_sequence: KeySequence { keys: [None(PageUp)] }, command: PageSelectPreviousOrScrollUp }, Keymap { key_sequence: KeySequence { keys: [Ctrl(Char('b'))] }, command: PageSelectPreviousOrScrollUp }, Keymap { key_sequence: KeySequence { keys: [None(PageDown)] }, command: PageSelectNextOrScrollDown }, Keymap { key_sequence: KeySequence { keys: [Ctrl(Char('f'))] }, command: PageSelectNextOrScrollDown }, Keymap { key_sequence: KeySequence { keys: [None(Char('g')), None(Char('g'))] }, command: SelectFirstOrScrollToTop }, Keymap { key_sequence: KeySequence { keys: [None(Char('G'))] }, command: SelectLastOrScrollToBottom }, Keymap { key_sequence: KeySequence { keys: [None(End)] }, command: SelectLastOrScrollToBottom }, Keymap { key_sequence: KeySequence { keys: [None(Char('s')), None(Char('t'))] }, command: SortTrackByTitle }, Keymap { key_sequence: KeySequence { keys: [None(Char('s')), None(Char('a'))] }, command: SortTrackByArtists }, Keymap { key_sequence: KeySequence { keys: [None(Char('s')), None(Char('A'))] }, command: SortTrackByAlbum }, Keymap { key_sequence: KeySequence { keys: [None(Char('s')), None(Char('d'))] }, command: SortTrackByDuration }, Keymap { key_sequence: KeySequence { keys: [None(Char('s')), None(Char('D'))] }, command: SortTrackByAddedDate }, Keymap { key_sequence: KeySequence { keys: [None(Char('s')), None(Char('r'))] }, command: ReverseTrackOrder }, Keymap { key_sequence: KeySequence { keys: [None(Char('s')), None(Char('l')), None(Char('a'))] }, command: SortLibraryAlphabetically }, Keymap { key_sequence: KeySequence { keys: [None(Char('s')), None(Char('l')), None(Char('r'))] }, command: SortLibraryByRecent }, Keymap { key_sequence: KeySequence { keys: [Ctrl(Char('k'))] }, command: MovePlaylistItemUp }, Keymap { key_sequence: KeySequence { keys: [Ctrl(Char('j'))] }, command: MovePlaylistItemDown }, Keymap { key_sequence: KeySequence { keys: [None(Char('N'))] }, command: CreatePlaylist }, Keymap { key_sequence: KeySequence { keys: [None(Char('g')), None(Char('c'))] }, command: JumpToCurrentTrackInContext }], actions: [] }, theme_config: ThemeConfig { themes: [Theme { name: "default", palette: Palette { background: None, foreground: None, black: Color { color: Black }, blue: Color { color: Blue }, cyan: Color { color: Cyan }, green: Color { color: Green }, magenta: Color { color: Magenta }, red: Color { color: Red }, white: Color { color: Gray }, yellow: Color { color: Yellow }, bright_black: Color { color: DarkGray }, bright_white: Color { color: White }, bright_red: Color { color: LightRed }, bright_magenta: Color { color: LightMagenta }, bright_green: Color { color: LightGreen }, bright_cyan: Color { color: LightCyan }, bright_blue: Color { color: LightBlue }, bright_yellow: Color { color: LightYellow } }, component_style: ComponentStyle { block_title: None, border: None, playback_status: None, playback_track: None, playback_artists: None, playback_album: None, playback_genres: None, playback_metadata: None, playback_progress_bar: None, playback_progress_bar_unfilled: None, current_playing: None, page_desc: None, playlist_desc: None, table_header: None, selection: None, secondary_row: None, like: None, lyrics_played: None, lyrics_playing: None } }] }, cache_folder: "/home/felipe/.cache/spotify-player" } 2026-02-10T13:34:03.270418Z INFO spotify_player::state::data: Loading Playlists data from /home/felipe/.cache/spotify-player/Playlists_cache.json... 2026-02-10T13:34:03.270474Z INFO spotify_player::state::data: Successfully loaded Playlists data! 2026-02-10T13:34:03.270481Z INFO spotify_player::state::data: Loading FollowedArtists data from /home/felipe/.cache/spotify-player/FollowedArtists_cache.json... 2026-02-10T13:34:03.270499Z INFO spotify_player::state::data: Successfully loaded FollowedArtists data! 2026-02-10T13:34:03.270503Z INFO spotify_player::state::data: Loading SavedShows data from /home/felipe/.cache/spotify-player/SavedShows_cache.json... 2026-02-10T13:34:03.270513Z INFO spotify_player::state::data: Successfully loaded SavedShows data! 2026-02-10T13:34:03.270516Z INFO spotify_player::state::data: Loading SavedAlbums data from /home/felipe/.cache/spotify-player/SavedAlbums_cache.json... 2026-02-10T13:34:03.270559Z INFO spotify_player::state::data: Successfully loaded SavedAlbums data! 2026-02-10T13:34:03.270563Z INFO spotify_player::state::data: Loading SavedTracks data from /home/felipe/.cache/spotify-player/SavedTracks_cache.json... 2026-02-10T13:34:03.270571Z INFO spotify_player::state::data: Successfully loaded SavedTracks data! 2026-02-10T13:34:03.339920Z INFO spotify_player::auth: Using cached credentials 2026-02-10T13:34:03.339940Z INFO spotify_player::streaming: Application's connect configurations: ConnectConfig { name: "spotify-player", device_type: Speaker, is_group: false, initial_volume: 45875, disable_volume: false, volume_steps: 64 } 2026-02-10T13:34:03.339959Z INFO librespot_playback::mixer::softmixer: Mixing with softvol and volume control: Log(60.0) 2026-02-10T13:34:03.339986Z INFO spotify_player::streaming: Initializing a new integrated player with device_id=aaf2d823-df35-4a78-aefa-847d0e03fbf2 2026-02-10T13:34:03.340076Z INFO spotify_player::streaming: Starting an integrated Spotify player using librespot's spirc protocol 2026-02-10T13:34:03.340110Z INFO librespot_playback::convert: Converting with ditherer: tpdf 2026-02-10T13:34:03.340130Z INFO librespot_playback::audio_backend::rodio: Using Rodio sink with format S16 and cpal host: ALSA 2026-02-10T13:34:03.340134Z INFO librespot_playback::audio_backend::rodio: Using audio device: default 2026-02-10T13:34:03.792172Z INFO librespot_core::session: Connecting to AP "ap-gue1.spotify.com:4070" 2026-02-10T13:34:04.350184Z INFO librespot_core::session: Authenticated as '9pnom570s50z6zm6gogsyledd' ! 2026-02-10T13:34:04.350304Z INFO librespot_core::session: Country: "BR" 2026-02-10T13:34:04.591773Z INFO spotify_player::streaming: New streaming connection has been established! 2026-02-10T13:34:04.591799Z INFO spotify_player::client: Used a new session for Spotify client. 2026-02-10T13:34:04.819272Z INFO librespot_core::spclient: Resolved "gue1-spclient.spotify.com:443" as spclient access point 2026-02-10T13:34:04.825521Z INFO spotify_player::cli::client: Starting a client socket at 127.0.0.1:8080 2026-02-10T13:34:04.825984Z INFO spotify_player::media_control: Initializing application's media control event watcher... 2026-02-10T13:34:04.826152Z ERROR client_request{request=GetUserPlaylists}: spotify_player::client::handlers: Failed to handle client request: error sending request for url (https://api.spotify.com/v1/me/playlists?offset=50&market=from_token&limit=50): client error (Connect): dns error: task 69 was cancelled 2026-02-10T13:34:04.826155Z ERROR client_request{request=GetUserSavedTracks}: spotify_player::client::handlers: Failed to handle client request: error sending request for url (https://api.spotify.com/v1/me/tracks?offset=50&market=from_token&limit=50): client error (Connect): dns error: task 70 was cancelled 2026-02-10T13:34:04.826192Z ERROR client_request{request=GetUserSavedAlbums}: spotify_player::client::handlers: Failed to handle client request: error sending request for url (https://api.spotify.com/v1/me/albums?market=from_token&limit=50&offset=0): client error (Connect): dns error: task 67 was cancelled 2026-02-10T13:34:04.826194Z ERROR client_request{request=GetUserSavedShows}: spotify_player::client::handlers: Failed to handle client request: error sending request for url (https://api.spotify.com/v1/me/shows?offset=50&market=from_token&limit=50): client error (Connect): dns error: task 68 was cancelled ``` Please refer to [this URL](https://github.com/aome510/spotify-player?tab=readme-ov-file#logging) for more details. **Screenshots** <img width="958" height="1049" alt="Image" src="https://github.com/user-attachments/assets/f7602842-c245-4b7e-99a9-ee635d24d336" /> **Environment** - OS: ubuntu - Application version: 0.ww **Additional context** Im on hyprland, if its relevant
kerem 2026-03-02 23:48:39 +03:00
  • closed this issue
  • added the
    bug
    label
Author
Owner

@Douglas019BR commented on GitHub (Feb 10, 2026):

I found the solution:

Bug Report: Application exits immediately on Linux with media-control feature

After commit 8759fc7 ("replace tokio blocking tasks with named threads"), the application exits immediately after starting on Linux when compiled with the media-control feature enabled.

Environment

  • OS: Linux
  • Features enabled (in my use): pulseaudio-backend, streaming, media-control, fzf, image
  • Version: v0.22.0

Description

There are two issues introduced in the recent refactoring:

Issue 1: Missing configs variable in PulseAudio setup

File: spotify_player/src/main.rs (line ~110)

The commit removed the let configs = config::get_config(); declaration at the beginning of start_app(), but the PulseAudio backend setup block still references configs.app_config.device.name:

#[cfg(feature = "pulseaudio-backend")]
{
    if std::env::var("PULSE_PROP_stream.description").is_err() {
        std::env::set_var(
            "PULSE_PROP_stream.description",
            format!(
                "Spotify Connect endpoint ({})",
                configs.app_config.device.name  // ERROR: `configs` not in scope
            ),
        );
    }
}

Fix: Add let configs = config::get_config(); inside the conditional block before using configs.

Issue 2: Main thread exits immediately on Linux

File: spotify_player/src/main.rs (lines ~198-213)

The commit replaced tokio::task::spawn_blocking with std::thread::Builder::new().spawn() for the UI and event handler tasks, and removed the for task in tasks { task.await?; } loop that kept the main thread alive.

On macOS/Windows, the winit event loop (event_loop.run()) blocks the main thread. However, on Linux there is no such blocking mechanism, causing start_app() to return immediately after spawning the threads, which terminates the application.

Previous behavior (before commit):

for task in tasks {
    task.await?;
}

Current behavior: No waiting mechanism on Linux - function returns Ok(()) immediately.

Fix: Add a blocking loop for Linux that waits until state.ui.lock().is_running becomes false:

#[cfg(feature = "media-control")]
if config::get_config().app_config.enable_media_control {
    // ... media control thread spawn ...

    #[cfg(any(target_os = "macos", target_os = "windows"))]
    {
        let event_loop = winit::event_loop::EventLoop::new()?;
        #[allow(deprecated)]
        event_loop.run(move |_, _| {})?;
    }

    // On Linux, keep the main thread alive while the UI is running
    #[cfg(not(any(target_os = "macos", target_os = "windows")))]
    {
        loop {
            if !state.ui.lock().is_running {
                break;
            }
            std::thread::sleep(std::time::Duration::from_millis(100));
        }
    }
}

// If media-control is disabled, we still need to keep the main thread alive
#[cfg(not(feature = "media-control"))]
if !state.is_daemon {
    loop {
        if !state.ui.lock().is_running {
            break;
        }
        std::thread::sleep(std::time::Duration::from_millis(100));
    }
}

Steps to Reproduce

  1. Build on Linux with: cargo install --path spotify_player/ --no-default-features --features pulseaudio-backend,streaming,media-control,fzf,image
  2. Run spotify_player
  3. Observe: Application UI flashes briefly and exits immediately

Expected Behavior

Application should start and remain interactive until the user quits.

  • 8759fc7 - "replace tokio blocking tasks with named threads (#921)"
<!-- gh-comment-id:3878334762 --> @Douglas019BR commented on GitHub (Feb 10, 2026): I found the solution: # Bug Report: Application exits immediately on Linux with `media-control` feature After commit `8759fc7` ("replace `tokio` blocking tasks with named threads"), the application exits immediately after starting on Linux when compiled with the `media-control` feature enabled. ## Environment - **OS**: Linux - **Features enabled (in my use)**: `pulseaudio-backend`, `streaming`, `media-control`, `fzf`, `image` - **Version**: v0.22.0 ## Description There are two issues introduced in the recent refactoring: ### Issue 1: Missing `configs` variable in PulseAudio setup **File**: `spotify_player/src/main.rs` (line ~110) The commit removed the `let configs = config::get_config();` declaration at the beginning of `start_app()`, but the PulseAudio backend setup block still references `configs.app_config.device.name`: ```rust #[cfg(feature = "pulseaudio-backend")] { if std::env::var("PULSE_PROP_stream.description").is_err() { std::env::set_var( "PULSE_PROP_stream.description", format!( "Spotify Connect endpoint ({})", configs.app_config.device.name // ERROR: `configs` not in scope ), ); } } ``` **Fix**: Add `let configs = config::get_config();` inside the conditional block before using `configs`. ### Issue 2: Main thread exits immediately on Linux **File**: `spotify_player/src/main.rs` (lines ~198-213) The commit replaced `tokio::task::spawn_blocking` with `std::thread::Builder::new().spawn()` for the UI and event handler tasks, and removed the `for task in tasks { task.await?; }` loop that kept the main thread alive. On macOS/Windows, the `winit` event loop (`event_loop.run()`) blocks the main thread. However, on Linux there is no such blocking mechanism, causing `start_app()` to return immediately after spawning the threads, which terminates the application. **Previous behavior** (before commit): ```rust for task in tasks { task.await?; } ``` **Current behavior**: No waiting mechanism on Linux - function returns `Ok(())` immediately. **Fix**: Add a blocking loop for Linux that waits until `state.ui.lock().is_running` becomes `false`: ```rust #[cfg(feature = "media-control")] if config::get_config().app_config.enable_media_control { // ... media control thread spawn ... #[cfg(any(target_os = "macos", target_os = "windows"))] { let event_loop = winit::event_loop::EventLoop::new()?; #[allow(deprecated)] event_loop.run(move |_, _| {})?; } // On Linux, keep the main thread alive while the UI is running #[cfg(not(any(target_os = "macos", target_os = "windows")))] { loop { if !state.ui.lock().is_running { break; } std::thread::sleep(std::time::Duration::from_millis(100)); } } } // If media-control is disabled, we still need to keep the main thread alive #[cfg(not(feature = "media-control"))] if !state.is_daemon { loop { if !state.ui.lock().is_running { break; } std::thread::sleep(std::time::Duration::from_millis(100)); } } ``` ## Steps to Reproduce 1. Build on Linux with: `cargo install --path spotify_player/ --no-default-features --features pulseaudio-backend,streaming,media-control,fzf,image` 2. Run `spotify_player` 3. Observe: Application UI flashes briefly and exits immediately ## Expected Behavior Application should start and remain interactive until the user quits. ## Related Commit - `8759fc7` - "replace `tokio` blocking tasks with named threads (#921)"
Author
Owner

@aome510 commented on GitHub (Feb 10, 2026):

Thanks @felprangel for reporting and @Douglas019BR for investigating and putting up a quick fix. I just published a new patched release

<!-- gh-comment-id:3878722816 --> @aome510 commented on GitHub (Feb 10, 2026): Thanks @felprangel for reporting and @Douglas019BR for investigating and putting up a quick fix. I just published a new patched release
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#557
No description provided.