[GH-ISSUE #684] Search returns json parse error #1340

Closed
opened 2026-03-14 14:28:46 +03:00 by kerem · 3 comments
Owner

Originally created by @EliRibble on GitHub (Mar 1, 2025).
Original GitHub issue: https://github.com/aome510/spotify-player/issues/684

Describe the bug
Any time I search I either get an error (direct search as a command argument) or nothing happens (type in search from search page)

To Reproduce
Start spotify-player. Hit "g s" to go to the search page. Type in any search query. Hit "enter". Nothing happens in the UI, all results stay empty.

Alternatively, run spotify_player with:

spotify_player search anything

Output is:

Bad request: json parse error: invalid type: null, expected struct SimplifiedPlaylist at line 1 column 4573: invalid type: null, expected struct SimplifiedPlaylist at line 1 column 4573

Expected behaviour
To see search results, or output indicating no matches

Log and backtrace

2025-03-01T00:08:14.752929Z ERROR client_request{request=Search("anything")}: spotify_player::client::handlers: Failed to handle client request: json parse error: invalid type: null, expected struct SimplifiedPlaylist at line 1 column 2140: invalid type: null, expected struct SimplifiedPlaylist at line 1 column 2140
2025-03-01T00:08:14.862643Z  INFO client_request{request=GetCurrentUserQueue}: spotify_player::client: Successfully handled the client request, took: 334ms
2025-03-01T00:08:17.874728Z ERROR client_request{request=Search("anything")}: spotify_player::client::handlers: Failed to handle client request: json parse error: invalid type: null, expected struct SimplifiedPlaylist at line 1 column 2140: invalid type: null, expected struct SimplifiedPlaylist at line 1 column 2140

Screenshots
If applicable, add screenshots to help explain your problem.

Environment

  • OS: NixOS 24.11.714614.c618e28f7025
  • Application version: spotify_player 0.20.1
Originally created by @EliRibble on GitHub (Mar 1, 2025). Original GitHub issue: https://github.com/aome510/spotify-player/issues/684 **Describe the bug** Any time I search I either get an error (direct search as a command argument) or nothing happens (type in search from search page) **To Reproduce** Start spotify-player. Hit "g s" to go to the search page. Type in any search query. Hit "enter". Nothing happens in the UI, all results stay empty. Alternatively, run spotify_player with: ``` spotify_player search anything ``` Output is: > Bad request: json parse error: invalid type: null, expected struct SimplifiedPlaylist at line 1 column 4573: invalid type: null, expected struct SimplifiedPlaylist at line 1 column 4573 **Expected behaviour** To see search results, or output indicating no matches **Log and backtrace** ``` 2025-03-01T00:08:14.752929Z ERROR client_request{request=Search("anything")}: spotify_player::client::handlers: Failed to handle client request: json parse error: invalid type: null, expected struct SimplifiedPlaylist at line 1 column 2140: invalid type: null, expected struct SimplifiedPlaylist at line 1 column 2140 2025-03-01T00:08:14.862643Z INFO client_request{request=GetCurrentUserQueue}: spotify_player::client: Successfully handled the client request, took: 334ms 2025-03-01T00:08:17.874728Z ERROR client_request{request=Search("anything")}: spotify_player::client::handlers: Failed to handle client request: json parse error: invalid type: null, expected struct SimplifiedPlaylist at line 1 column 2140: invalid type: null, expected struct SimplifiedPlaylist at line 1 column 2140 ``` **Screenshots** If applicable, add screenshots to help explain your problem. **Environment** - OS: NixOS 24.11.714614.c618e28f7025 - Application version: spotify_player 0.20.1
kerem 2026-03-14 14:28:46 +03:00
  • closed this issue
  • added the
    bug
    label
Author
Owner

@EliRibble commented on GitHub (Mar 1, 2025):

Looking around in the source code I found a reference to https://github.com/ramsayleung/rspotify/issues/459. Seems the data model for responses from Spotify is defined in a library rather than in spotify-player's code.

<!-- gh-comment-id:2691805527 --> @EliRibble commented on GitHub (Mar 1, 2025): Looking around in the source code I found a reference to https://github.com/ramsayleung/rspotify/issues/459. Seems the data model for responses from Spotify is defined in a library rather than in spotify-player's code.
Author
Owner

@EliRibble commented on GitHub (Mar 1, 2025):

Interesting, compiled the code myself and search worked fine. This may be a bug that's already been found-and-fixed between 0.20.1 and master.

<!-- gh-comment-id:2691806810 --> @EliRibble commented on GitHub (Mar 1, 2025): Interesting, compiled the code myself and search worked fine. This may be a bug that's already been found-and-fixed between 0.20.1 and `master`.
Author
Owner

@EliRibble commented on GitHub (Mar 1, 2025):

Threw in the shell.nix I created while investigating this.

<!-- gh-comment-id:2691811144 --> @EliRibble commented on GitHub (Mar 1, 2025): Threw in the `shell.nix` I created while investigating this.
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#1340
No description provided.