[GH-ISSUE #208] Enter doesn't work for on the Search Page #108

Closed
opened 2026-03-02 23:44:37 +03:00 by kerem · 10 comments
Owner

Originally created by @BinaryFly on GitHub (Jun 12, 2023).
Original GitHub issue: https://github.com/aome510/spotify-player/issues/208

When I go to the search page I can't press enter to search, I found out this is the way search by watching the demo on youtube. I can exit the "insert mode" from the search bar by pressing Ctrl + I but even then when I press enter nothing happens. Am I doing something wrong or am I invoking the search in the wrong way?

  • OS: Fedora 38
  • Application version: release
  • Application features: pulseaudio backend

Additional context
the following is my app.toml:

theme = "default"
client_id = "<-private-client-id->"
client_port = 8888
playack_format = "{track} • {artists}\n{album}\n{metadata}"
notify_format = { summary = "{track} • {artists}", body = "{album}" }
# the default `copy_command` is based on the OS
copy_command = { command = "pbcopy", args = [] } # macos
# copy_command = { command = "xclip", args = ["-sel", "c"] } # linux
# copy_command = { command = "clip", args = [] } # windows
app_refresh_duration_in_ms = 32
playback_refresh_duration_in_ms = 0
cover_image_refresh_duration_in_ms = 2000
page_size_in_rows = 20
track_table_item_max_len = 32
enable_media_control = false
enable_streaming = true
enable_cover_image_cache = true
default_device = "spotify-player"
play_icon = "▶"
pause_icon = "▌▌"
liked_icon = "♥"
playback_window_position = "Top"
cover_img_length = 9
cover_img_width = 5
playback_window_width = 6

[device]
name = "spotify-player"
device_type = "speaker"
volume = 100
bitrate = 160
audio_cache = false

and my keymap.toml:

[[keymaps]]
command = "FocusNextWindow"
key_sequence = "l"
[[keymaps]]
command = "FocusPreviousWindow"
key_sequence = "h"
[[keymaps]]
command = "PageSelectNextOrScrollDown"
key_sequence = "C-d"
[[keymaps]]
command = "PageSelectPreviousOrScrollUp"
key_sequence = "C-u"
Originally created by @BinaryFly on GitHub (Jun 12, 2023). Original GitHub issue: https://github.com/aome510/spotify-player/issues/208 When I go to the search page I can't press enter to search, I found out this is the way search by watching the demo on youtube. I can exit the "insert mode" from the search bar by pressing Ctrl + I but even then when I press enter nothing happens. Am I doing something wrong or am I invoking the search in the wrong way? - OS: Fedora 38 - Application version: release - Application features: pulseaudio backend **Additional context** the following is my app.toml: ```toml theme = "default" client_id = "<-private-client-id->" client_port = 8888 playack_format = "{track} • {artists}\n{album}\n{metadata}" notify_format = { summary = "{track} • {artists}", body = "{album}" } # the default `copy_command` is based on the OS copy_command = { command = "pbcopy", args = [] } # macos # copy_command = { command = "xclip", args = ["-sel", "c"] } # linux # copy_command = { command = "clip", args = [] } # windows app_refresh_duration_in_ms = 32 playback_refresh_duration_in_ms = 0 cover_image_refresh_duration_in_ms = 2000 page_size_in_rows = 20 track_table_item_max_len = 32 enable_media_control = false enable_streaming = true enable_cover_image_cache = true default_device = "spotify-player" play_icon = "▶" pause_icon = "▌▌" liked_icon = "♥" playback_window_position = "Top" cover_img_length = 9 cover_img_width = 5 playback_window_width = 6 [device] name = "spotify-player" device_type = "speaker" volume = 100 bitrate = 160 audio_cache = false ``` and my keymap.toml: ```toml [[keymaps]] command = "FocusNextWindow" key_sequence = "l" [[keymaps]] command = "FocusPreviousWindow" key_sequence = "h" [[keymaps]] command = "PageSelectNextOrScrollDown" key_sequence = "C-d" [[keymaps]] command = "PageSelectPreviousOrScrollUp" key_sequence = "C-u" ```
kerem 2026-03-02 23:44:37 +03:00
  • closed this issue
  • added the
    bug
    label
Author
Owner

@aome510 commented on GitHub (Jun 12, 2023):

@BinaryFly can you provide corresponding logs and any videos for demonstration? Without those, it's really hard to find the issue cause.

<!-- gh-comment-id:1587846704 --> @aome510 commented on GitHub (Jun 12, 2023): @BinaryFly can you provide corresponding logs and any videos for demonstration? Without those, it's really hard to find the issue cause.
Author
Owner

@BinaryFly commented on GitHub (Jun 12, 2023):

Sure! I tried again to get a clean log of the problem and these are the lines that are about the search bar:

2023-06-12T18:24:40.330100Z  INFO client_request{request=GetCurrentPlayback}: spotify_player::client: successfully handled the client request, took: 345ms
2023-06-12T18:24:47.361692Z ERROR client_request{request=Search("Take me home country roads")}: spotify_player::client::handlers: Failed to handle client request: http error: status code 404 Not Found
2023-06-12T18:24:48.430237Z ERROR client_request{request=Search("Take me home country roads")}: spotify_player::client::handlers: Failed to handle client request: http error: status code 404 Not Found
2023-06-12T18:24:49.500180Z ERROR client_request{request=Search("Take me home country roads")}: spotify_player::client::handlers: Failed to handle client request: http error: status code 404 Not Found
2023-06-12T18:24:50.401271Z ERROR client_request{request=Search("Take me home country roads")}: spotify_player::client::handlers: Failed to handle client request: http error: status code 404 Not Found
2023-06-12T18:24:51.261999Z ERROR client_request{request=Search("Take me home country roads")}: spotify_player::client::handlers: Failed to handle client request: http error: status code 404 Not Found

which is weird because it can fetch my playlists and liked songs fine. Maybe I need to change my setup in spotify dashboard? (I copied over an old configuration for spotify-tui but since that isn't maintained anymore I thought I could use the same client id for this config)

<!-- gh-comment-id:1587862209 --> @BinaryFly commented on GitHub (Jun 12, 2023): Sure! I tried again to get a clean log of the problem and these are the lines that are about the search bar: ```log 2023-06-12T18:24:40.330100Z INFO client_request{request=GetCurrentPlayback}: spotify_player::client: successfully handled the client request, took: 345ms 2023-06-12T18:24:47.361692Z ERROR client_request{request=Search("Take me home country roads")}: spotify_player::client::handlers: Failed to handle client request: http error: status code 404 Not Found 2023-06-12T18:24:48.430237Z ERROR client_request{request=Search("Take me home country roads")}: spotify_player::client::handlers: Failed to handle client request: http error: status code 404 Not Found 2023-06-12T18:24:49.500180Z ERROR client_request{request=Search("Take me home country roads")}: spotify_player::client::handlers: Failed to handle client request: http error: status code 404 Not Found 2023-06-12T18:24:50.401271Z ERROR client_request{request=Search("Take me home country roads")}: spotify_player::client::handlers: Failed to handle client request: http error: status code 404 Not Found 2023-06-12T18:24:51.261999Z ERROR client_request{request=Search("Take me home country roads")}: spotify_player::client::handlers: Failed to handle client request: http error: status code 404 Not Found ``` which is weird because it can fetch my playlists and liked songs fine. Maybe I need to change my setup in spotify dashboard? (I copied over an old configuration for spotify-tui but since that isn't maintained anymore I thought I could use the same client id for this config)
Author
Owner

@aome510 commented on GitHub (Jun 12, 2023):

(I copied over an old configuration for spotify-tui but since that isn't maintained anymore I thought I could use the same client id for this config)

It should be fine. The client ID is only needed if you want to use the Spotify connect feature.

I can still search the term "Take me home country roads". Does the search functionality work with other simple queries like "take" for example?

<!-- gh-comment-id:1587927796 --> @aome510 commented on GitHub (Jun 12, 2023): > (I copied over an old configuration for spotify-tui but since that isn't maintained anymore I thought I could use the same client id for this config) It should be fine. The client ID is only needed if you want to use the Spotify connect feature. I can still search the term "Take me home country roads". Does the search functionality work with other simple queries like "take" for example?
Author
Owner

@BinaryFly commented on GitHub (Jun 12, 2023):

Nope nothing, i get to the search page type anything but it doesn't show anything when I press enter:

Screenshot from 2023-06-12 21-19-53

2023-06-12T19:19:07.077681Z  INFO client_request{request=GetCurrentPlayback}: spotify_player::client: successfully handled the client request, took: 337ms
2023-06-12T19:19:17.449729Z ERROR client_request{request=Search("take")}: spotify_player::client::handlers: Failed to handle client request: http error: status code 404 Not Found
2023-06-12T19:19:17.649363Z ERROR client_request{request=Search("take")}: spotify_player::client::handlers: Failed to handle client request: http error: status code 404 Not Found
2023-06-12T19:19:17.849225Z ERROR client_request{request=Search("take")}: spotify_player::client::handlers: Failed to handle client request: http error: status code 404 Not Found
<!-- gh-comment-id:1587946908 --> @BinaryFly commented on GitHub (Jun 12, 2023): Nope nothing, i get to the search page type anything but it doesn't show anything when I press enter: ![Screenshot from 2023-06-12 21-19-53](https://github.com/aome510/spotify-player/assets/94313592/4372c0b3-b193-411c-9df2-9542e8e22f2c) ```log 2023-06-12T19:19:07.077681Z INFO client_request{request=GetCurrentPlayback}: spotify_player::client: successfully handled the client request, took: 337ms 2023-06-12T19:19:17.449729Z ERROR client_request{request=Search("take")}: spotify_player::client::handlers: Failed to handle client request: http error: status code 404 Not Found 2023-06-12T19:19:17.649363Z ERROR client_request{request=Search("take")}: spotify_player::client::handlers: Failed to handle client request: http error: status code 404 Not Found 2023-06-12T19:19:17.849225Z ERROR client_request{request=Search("take")}: spotify_player::client::handlers: Failed to handle client request: http error: status code 404 Not Found ```
Author
Owner

@BinaryFly commented on GitHub (Jun 12, 2023):

I tried running the application with RUST_LOG="spotify_player=TRACE" and the following is the last half of the log generated from this, maybe it helps if its a bit more verbose:

2023-06-12T19:34:59.726485Z  WARN spotify_player: Failed to run client socket for CLI: Address already in use (os error 98)
2023-06-12T19:35:00.099038Z  INFO client_request{request=GetUserPlaylists}: spotify_player::client: successfully handled the client request, took: 372ms
2023-06-12T19:35:00.127987Z  INFO client_request{request=GetCurrentUser}: spotify_player::client: successfully handled the client request, took: 401ms
2023-06-12T19:35:00.130173Z  INFO client_request{request=GetUserFollowedArtists}: spotify_player::client: successfully handled the client request, took: 403ms
2023-06-12T19:35:00.178632Z  INFO client_request{request=GetCurrentPlayback}: spotify_player::client: successfully handled the client request, took: 452ms
2023-06-12T19:35:00.286563Z  INFO client_request{request=GetUserSavedAlbums}: spotify_player::client: successfully handled the client request, took: 559ms
2023-06-12T19:35:01.766385Z  INFO client_request{request=GetUserSavedTracks}: spotify_player::client: successfully handled the client request, took: 2039ms
2023-06-12T19:35:02.368178Z DEBUG terminal_event{event=Key(KeyEvent { code: Char('g'), modifiers: NONE, kind: Press, state: NONE })}: spotify_player::event: Handling key event: KeyEvent { code: Char('g'), modifiers: NONE, kind: Press, state: NONE }, current key sequence: KeySequence { keys: [None(Char('g'))] }
2023-06-12T19:35:02.570641Z DEBUG terminal_event{event=Key(KeyEvent { code: Char('s'), modifiers: NONE, kind: Press, state: NONE })}: spotify_player::event: Handling key event: KeyEvent { code: Char('s'), modifiers: NONE, kind: Press, state: NONE }, current key sequence: KeySequence { keys: [None(Char('g')), None(Char('s'))] }
2023-06-12T19:35:04.090279Z DEBUG terminal_event{event=Key(KeyEvent { code: Char('i'), modifiers: NONE, kind: Press, state: NONE })}: spotify_player::event: Handling key event: KeyEvent { code: Char('i'), modifiers: NONE, kind: Press, state: NONE }, current key sequence: KeySequence { keys: [None(Char('i'))] }
2023-06-12T19:35:04.742829Z DEBUG terminal_event{event=Key(KeyEvent { code: Backspace, modifiers: NONE, kind: Press, state: NONE })}: spotify_player::event: Handling key event: KeyEvent { code: Backspace, modifiers: NONE, kind: Press, state: NONE }, current key sequence: KeySequence { keys: [None(Backspace)] }
2023-06-12T19:35:04.892684Z DEBUG terminal_event{event=Key(KeyEvent { code: Char('t'), modifiers: NONE, kind: Press, state: NONE })}: spotify_player::event: Handling key event: KeyEvent { code: Char('t'), modifiers: NONE, kind: Press, state: NONE }, current key sequence: KeySequence { keys: [None(Char('t'))] }
2023-06-12T19:35:05.062967Z DEBUG terminal_event{event=Key(KeyEvent { code: Char('a'), modifiers: NONE, kind: Press, state: NONE })}: spotify_player::event: Handling key event: KeyEvent { code: Char('a'), modifiers: NONE, kind: Press, state: NONE }, current key sequence: KeySequence { keys: [None(Char('a'))] }
2023-06-12T19:35:05.159178Z DEBUG terminal_event{event=Key(KeyEvent { code: Char('k'), modifiers: NONE, kind: Press, state: NONE })}: spotify_player::event: Handling key event: KeyEvent { code: Char('k'), modifiers: NONE, kind: Press, state: NONE }, current key sequence: KeySequence { keys: [None(Char('k'))] }
2023-06-12T19:35:05.297576Z DEBUG terminal_event{event=Key(KeyEvent { code: Char('e'), modifiers: NONE, kind: Press, state: NONE })}: spotify_player::event: Handling key event: KeyEvent { code: Char('e'), modifiers: NONE, kind: Press, state: NONE }, current key sequence: KeySequence { keys: [None(Char('e'))] }
2023-06-12T19:35:05.643589Z DEBUG terminal_event{event=Key(KeyEvent { code: Enter, modifiers: NONE, kind: Press, state: NONE })}: spotify_player::event: Handling key event: KeyEvent { code: Enter, modifiers: NONE, kind: Press, state: NONE }, current key sequence: KeySequence { keys: [None(Enter)] }
2023-06-12T19:35:05.691592Z ERROR client_request{request=Search("take")}: spotify_player::client::handlers: Failed to handle client request: http error: status code 404 Not Found
2023-06-12T19:35:09.203738Z DEBUG terminal_event{event=Key(KeyEvent { code: Char('c'), modifiers: CONTROL, kind: Press, state: NONE })}: spotify_player::event: Handling key event: KeyEvent { code: Char('c'), modifiers: CONTROL, kind: Press, state: NONE }, current key sequence: KeySequence { keys: [Ctrl(Char('c'))] }
<!-- gh-comment-id:1587959399 --> @BinaryFly commented on GitHub (Jun 12, 2023): I tried running the application with RUST_LOG="spotify_player=TRACE" and the following is the last half of the log generated from this, maybe it helps if its a bit more verbose: ```log 2023-06-12T19:34:59.726485Z WARN spotify_player: Failed to run client socket for CLI: Address already in use (os error 98) 2023-06-12T19:35:00.099038Z INFO client_request{request=GetUserPlaylists}: spotify_player::client: successfully handled the client request, took: 372ms 2023-06-12T19:35:00.127987Z INFO client_request{request=GetCurrentUser}: spotify_player::client: successfully handled the client request, took: 401ms 2023-06-12T19:35:00.130173Z INFO client_request{request=GetUserFollowedArtists}: spotify_player::client: successfully handled the client request, took: 403ms 2023-06-12T19:35:00.178632Z INFO client_request{request=GetCurrentPlayback}: spotify_player::client: successfully handled the client request, took: 452ms 2023-06-12T19:35:00.286563Z INFO client_request{request=GetUserSavedAlbums}: spotify_player::client: successfully handled the client request, took: 559ms 2023-06-12T19:35:01.766385Z INFO client_request{request=GetUserSavedTracks}: spotify_player::client: successfully handled the client request, took: 2039ms 2023-06-12T19:35:02.368178Z DEBUG terminal_event{event=Key(KeyEvent { code: Char('g'), modifiers: NONE, kind: Press, state: NONE })}: spotify_player::event: Handling key event: KeyEvent { code: Char('g'), modifiers: NONE, kind: Press, state: NONE }, current key sequence: KeySequence { keys: [None(Char('g'))] } 2023-06-12T19:35:02.570641Z DEBUG terminal_event{event=Key(KeyEvent { code: Char('s'), modifiers: NONE, kind: Press, state: NONE })}: spotify_player::event: Handling key event: KeyEvent { code: Char('s'), modifiers: NONE, kind: Press, state: NONE }, current key sequence: KeySequence { keys: [None(Char('g')), None(Char('s'))] } 2023-06-12T19:35:04.090279Z DEBUG terminal_event{event=Key(KeyEvent { code: Char('i'), modifiers: NONE, kind: Press, state: NONE })}: spotify_player::event: Handling key event: KeyEvent { code: Char('i'), modifiers: NONE, kind: Press, state: NONE }, current key sequence: KeySequence { keys: [None(Char('i'))] } 2023-06-12T19:35:04.742829Z DEBUG terminal_event{event=Key(KeyEvent { code: Backspace, modifiers: NONE, kind: Press, state: NONE })}: spotify_player::event: Handling key event: KeyEvent { code: Backspace, modifiers: NONE, kind: Press, state: NONE }, current key sequence: KeySequence { keys: [None(Backspace)] } 2023-06-12T19:35:04.892684Z DEBUG terminal_event{event=Key(KeyEvent { code: Char('t'), modifiers: NONE, kind: Press, state: NONE })}: spotify_player::event: Handling key event: KeyEvent { code: Char('t'), modifiers: NONE, kind: Press, state: NONE }, current key sequence: KeySequence { keys: [None(Char('t'))] } 2023-06-12T19:35:05.062967Z DEBUG terminal_event{event=Key(KeyEvent { code: Char('a'), modifiers: NONE, kind: Press, state: NONE })}: spotify_player::event: Handling key event: KeyEvent { code: Char('a'), modifiers: NONE, kind: Press, state: NONE }, current key sequence: KeySequence { keys: [None(Char('a'))] } 2023-06-12T19:35:05.159178Z DEBUG terminal_event{event=Key(KeyEvent { code: Char('k'), modifiers: NONE, kind: Press, state: NONE })}: spotify_player::event: Handling key event: KeyEvent { code: Char('k'), modifiers: NONE, kind: Press, state: NONE }, current key sequence: KeySequence { keys: [None(Char('k'))] } 2023-06-12T19:35:05.297576Z DEBUG terminal_event{event=Key(KeyEvent { code: Char('e'), modifiers: NONE, kind: Press, state: NONE })}: spotify_player::event: Handling key event: KeyEvent { code: Char('e'), modifiers: NONE, kind: Press, state: NONE }, current key sequence: KeySequence { keys: [None(Char('e'))] } 2023-06-12T19:35:05.643589Z DEBUG terminal_event{event=Key(KeyEvent { code: Enter, modifiers: NONE, kind: Press, state: NONE })}: spotify_player::event: Handling key event: KeyEvent { code: Enter, modifiers: NONE, kind: Press, state: NONE }, current key sequence: KeySequence { keys: [None(Enter)] } 2023-06-12T19:35:05.691592Z ERROR client_request{request=Search("take")}: spotify_player::client::handlers: Failed to handle client request: http error: status code 404 Not Found 2023-06-12T19:35:09.203738Z DEBUG terminal_event{event=Key(KeyEvent { code: Char('c'), modifiers: CONTROL, kind: Press, state: NONE })}: spotify_player::event: Handling key event: KeyEvent { code: Char('c'), modifiers: CONTROL, kind: Press, state: NONE }, current key sequence: KeySequence { keys: [Ctrl(Char('c'))] } ```
Author
Owner

@janpfischer commented on GitHub (Jun 12, 2023):

Hey, just started to use spotify_player 1 hour ago. Great so far :)
But exactly the same thing happens to me.
Build freshly with cargo install spotify_player.
Same 404 error message in the logs.

<!-- gh-comment-id:1588011907 --> @janpfischer commented on GitHub (Jun 12, 2023): Hey, just started to use spotify_player 1 hour ago. Great so far :) But exactly the same thing happens to me. Build freshly with cargo install spotify_player. Same 404 error message in the logs.
Author
Owner

@aome510 commented on GitHub (Jun 13, 2023):

This is weird. I tried to reinstall spotify_player on both my M1 Mac and Ubuntu machines and search still works fine. Not sure if this is a temporary regional issue or something else.

I tried running the application with RUST_LOG="spotify_player=TRACE" and the following is the last half of the log generated from this, maybe it helps if its a bit more verbose:

Can you run with RUST_LOG=TRACE or RUST_LOG=DEBUG instead? I want to see the logs of the third-party libraries, which are disabled by default.

<!-- gh-comment-id:1589271843 --> @aome510 commented on GitHub (Jun 13, 2023): This is weird. I tried to reinstall `spotify_player` on both my M1 Mac and Ubuntu machines and search still works fine. Not sure if this is a temporary regional issue or something else. > I tried running the application with RUST_LOG="spotify_player=TRACE" and the following is the last half of the log generated from this, maybe it helps if its a bit more verbose: Can you run with RUST_LOG=TRACE or RUST_LOG=DEBUG instead? I want to see the logs of the third-party libraries, which are disabled by default.
Author
Owner

@BinaryFly commented on GitHub (Jun 13, 2023):

I tried again today and somehow it works now. Maybe an update to fedora or rebooting might have fixed it, not exactly sure. Do you still have this issue @b1rdhous3 ?

<!-- gh-comment-id:1589680820 --> @BinaryFly commented on GitHub (Jun 13, 2023): I tried again today and somehow it works now. Maybe an update to fedora or rebooting might have fixed it, not exactly sure. Do you still have this issue @b1rdhous3 ?
Author
Owner

@janpfischer commented on GitHub (Jun 13, 2023):

@BinaryFly Can confirm. It is working again for me as well. I did not change anything and run the exact same build as yesterday. Maybe there was an issue on Spotify API side.

Thanks!

<!-- gh-comment-id:1590007382 --> @janpfischer commented on GitHub (Jun 13, 2023): @BinaryFly Can confirm. It is working again for me as well. I did not change anything and run the exact same build as yesterday. Maybe there was an issue on Spotify API side. Thanks!
Author
Owner

@aome510 commented on GitHub (Jun 13, 2023):

Great! Let's close this for now. Occasionally, Spotify APIs don't work because of regional issues (server down, etc).

<!-- gh-comment-id:1590129666 --> @aome510 commented on GitHub (Jun 13, 2023): Great! Let's close this for now. Occasionally, Spotify APIs don't work because of regional issues (server down, etc).
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#108
No description provided.