No playlist on psst-gui and failed to read json error
Bug description: There is no playlist menu.
-
Error shown on the gui: "failed to read JSON"
-
Error shown on the terminal: ERROR psst_gui::webapi::client] failed to read local tracks: No such file or directory (os error 2)
To Reproduce Simple open the app with ./psst-gui
Environment OS: Linux Mint 21
I am having the same issue. I get an error saying network timed out, and it gives an api url. I can't see anything that would be pulled with the API.
This started out of nowhere. I'm able to access the API directly with no issue, so I don't believe it's a network issue. This started yesterday (3/21/24).
Spot works with no issue.
Same issue here! Probably the JSON changed
I'm not even getting that far:
Similar issue here on MacOS. In my case the file exists but is not what's expected.
The odd thing is that the file it's trying to load with local : load_tracks_for_user has some content that is unrelated to Spotify or PSST. I have no idea why.
It starts with "SPCOLocalFilesStoraged` " and continues with data unrelated to Spotify.
I attempted to add some debugging in the "make request" code path, but I am not a rust programmer so it is possible/likely I did something incorrectly.
After adding log::info!(...) bits and various values of export PSST_LOG=debug,function=trace, I could see requests initiated from get_playlists and dispatched to for_all_pages which calls self.load that calls ureq::Response.into_json. Because into_json consumes the contents of the response, it's non-obvious how to log the contents of the request and have that request used by the psst-gui client.
Unlike @mackcoding, it seems I'm able to get a response, but there's something about the returned JSON that psst-gui does not like. Happy to re-run if someone can provide a way to simultaneously log the response (or print to STDOUT) and have it used by psst, but since is rust is outside my area of knowledge, I'll need someone else to provide the code for it (or point to an example of it elsewhere).
Recently (few weeks back) Spotify changed the format of some of their responses so that empty lists return 'null' instead of being actual empty lists like they are supposed to be. I had to change my (python) app to handle that, maybe you're hitting the same thing here.
The other problem in this thread appears to be the different case of where they turned off one of their undocumented (private) endpoints. I did see someone with a workaround for that but I helpfully can't find it now. I don't use the undocumented endpoints myself (in a futile attempt to avoid Spotify breaking my app all the time with their stupid random changes).
Recently (few weeks back) Spotify changed the format of some of their responses so that empty lists return 'null' instead of being actual empty lists like they are supposed to be. I had to change my (python) app to handle that, maybe you're hitting the same thing here.
Took a stab at fixing the error based on this info from @kingosticks (thanks!). Here's a PR: https://github.com/jpochyla/psst/pull/464
Tested locally and it looks good to me, but I'm not familiar with Rust, so please review it :).
Recently (few weeks back) Spotify changed the format of some of their responses so that empty lists return 'null' instead of being actual empty lists like they are supposed to be. I had to change my (python) app to handle that, maybe you're hitting the same thing here.
The other problem in this thread appears to be the different case of where they turned off one of their undocumented (private) endpoints. I did see someone with a workaround for that but I helpfully can't find it now. I don't use the undocumented endpoints myself (in a futile attempt to avoid Spotify breaking my app all the time with their stupid random changes).
Regarding the other problem, with endpoints being removed (made-for-x etc), I found the related issue I was looking for: https://github.com/michaelherger/Spotty-Plugin/issues/117
I'm not sure if the fix they used there is directly relevant here, I don't personally use either software. But maybe it helps.