Rigellute / spotify-tui

Spotify for the terminal written in Rust 🚀
MIT License
17.52k stars 521 forks source link

404 Error #470

Open adesprez opened 4 years ago

adesprez commented 4 years ago

I'm using the latest (0.19.0) version of spotify-tui with spotifyd (compiled from latest source of today for pulseaudio support).

I keep getting the message "Api response: Spotify API reported error code 404". In the meantime, songs keep playing. Pressing ESC after selecting my device (only one device configured) allows me to leave that screen. I have a premium account.

Logs in spotifyd in the meantime:

May 19 14:37:36 lenovo spotifyd[268770]: Loading config from "/home/adesprez/.config/spotifyd/spotifyd.conf"
May 19 14:37:36 lenovo spotifyd[268770]: No proxy specified
May 19 14:37:36 lenovo spotifyd[268770]: Using software volume controller.
May 19 14:37:36 lenovo spotifyd[268770]: Connecting to AP "gew1-accesspoint-b-44vb.ap.spotify.com:443"
May 19 14:37:36 lenovo spotifyd[268770]: Authenticated as "*******" !
May 19 14:37:36 lenovo spotifyd[268770]: Country: "FR"
May 19 14:38:10 lenovo spotifyd[268770]: Unhandled DBus message: (Signal, Some("/org/freedesktop/DBus"), Some("org.freedesktop.DBus"), Some("NameAcquired"))
May 19 14:38:10 lenovo spotifyd[268770]: Unhandled DBus message: (Signal, Some("/org/freedesktop/DBus"), Some("org.freedesktop.DBus"), Some("NameAcquired"))
May 19 14:38:10 lenovo spotifyd[268770]: Couldn't fetch metadata from spotify: Ok(None)
May 19 14:38:10 lenovo spotifyd[268770]: Couldn't fetch metadata from spotify: Ok(None)
May 19 14:38:10 lenovo spotifyd[268770]: Couldn't fetch metadata from spotify: Ok(None)
May 19 14:38:10 lenovo spotifyd[268770]: Couldn't fetch metadata from spotify: Ok(None)
May 19 14:38:11 lenovo spotifyd[268770]: Couldn't fetch metadata from spotify: Ok(None)
May 19 14:38:11 lenovo spotifyd[268770]: Couldn't fetch metadata from spotify: Ok(None)
May 19 14:38:11 lenovo spotifyd[268770]: Couldn't fetch metadata from spotify: Ok(None)
May 19 14:38:11 lenovo spotifyd[268770]: Couldn't fetch metadata from spotify: Ok(None)
May 19 14:38:11 lenovo spotifyd[268770]: Couldn't fetch metadata from spotify: Ok(None)
May 19 14:38:11 lenovo spotifyd[268770]: Couldn't fetch metadata from spotify: Ok(None)
May 19 14:38:12 lenovo spotifyd[268770]: Couldn't fetch metadata from spotify: Ok(None)
May 19 14:38:12 lenovo spotifyd[268770]: Couldn't fetch metadata from spotify: Ok(None)
May 19 14:38:12 lenovo spotifyd[268770]: Couldn't fetch metadata from spotify: Ok(None)
May 19 14:38:12 lenovo spotifyd[268770]: Couldn't fetch metadata from spotify: Ok(None)
May 19 14:38:12 lenovo spotifyd[268770]: Couldn't fetch metadata from spotify: Ok(None)
May 19 14:38:13 lenovo spotifyd[268770]: Couldn't fetch metadata from spotify: Ok(None)
May 19 14:38:13 lenovo spotifyd[268770]: Couldn't fetch metadata from spotify: Ok(None)
May 19 14:38:13 lenovo spotifyd[268770]: Couldn't fetch metadata from spotify: Ok(None)
May 19 14:38:13 lenovo spotifyd[268770]: Couldn't fetch metadata from spotify: Err(RateLimited(Some(5)))
May 19 14:38:14 lenovo spotifyd[268770]: Couldn't fetch metadata from spotify: Err(RateLimited(Some(10)))
May 19 14:38:14 lenovo spotifyd[268770]: Couldn't fetch metadata from spotify: Err(RateLimited(Some(9)))
May 19 14:38:14 lenovo spotifyd[268770]: Couldn't fetch metadata from spotify: Err(RateLimited(Some(9)))
May 19 14:38:14 lenovo spotifyd[268770]: Couldn't fetch metadata from spotify: Err(RateLimited(Some(9)))
May 19 14:38:14 lenovo spotifyd[268770]: Couldn't fetch metadata from spotify: Err(RateLimited(Some(9)))
May 19 14:38:14 lenovo spotifyd[268770]: Couldn't fetch metadata from spotify: Err(RateLimited(Some(9)))
May 19 14:38:14 lenovo spotifyd[268770]: Couldn't fetch metadata from spotify: Err(RateLimited(Some(9)))
May 19 14:38:14 lenovo spotifyd[268770]: Couldn't fetch metadata from spotify: Err(RateLimited(Some(9)))
May 19 14:38:15 lenovo spotifyd[268770]: Couldn't fetch metadata from spotify: Err(RateLimited(Some(8)))
May 19 14:38:15 lenovo spotifyd[268770]: Couldn't fetch metadata from spotify: Err(RateLimited(Some(8)))
May 19 14:38:15 lenovo spotifyd[268770]: Couldn't fetch metadata from spotify: Err(RateLimited(Some(8)))
May 19 14:38:15 lenovo spotifyd[268770]: Couldn't fetch metadata from spotify: Err(RateLimited(Some(8)))
May 19 14:38:15 lenovo spotifyd[268770]: Loading <Fall> with Spotify URI <spotify:track:4xC3NPultaE0hCvUosYLSi>
May 19 14:38:15 lenovo spotifyd[268770]: <Fall> loaded
adesprez commented 4 years ago

On the 404 error page, it says the device selected with d command will be cached. May be it's not being cached properly. How can I check that?

oscarcp commented 4 years ago

Same issue here. Using spotifyd with spotify-tui, evey few seconds a 404 error screen pops up. The client and the server keep working normally.

Name of device: Spotify@ironclad Spotify account type: Family plan

2020-05-19-15:59:04-screenshot

PS: I was unable to get verbose output from spotifyd, but that's outside of the scope of this ticket since it's a spotifyd issue

adesprez commented 4 years ago

I have Family plan as well.

oscarcp commented 4 years ago

It seems this issue might be related to https://github.com/Spotifyd/spotifyd/issues/503

@Rigellute if you think this ticket is out of the scope of spotify-tui please close it.

adesprez commented 4 years ago

When the event occurs (Error 404 page), there is no occurrence of the message:

Couldn't fetch metadata from spotify: Err(RateLimited(Some(10)))

In spotifyd logs. I've had that error message in spotifyd one hour ago and that's it. Since then, I've seen numerous times the Error 404 page in spotify-tui.

According to the logs, it doesn't look like that bug is triggering that 404 page in spotify-tui. Spotify-tui might still be affected by that spotifd bug nonetheless, regardless of the logs.

oscarcp commented 4 years ago

You're right, the 404 doesn't correspond with the spotifyd errors, so this is definitely a spotify-tui issue :)

ghost commented 4 years ago

Also seeing this issue. I have a family plan as well.

adesprez commented 4 years ago

Surprisingly enough, I had few occurrences of this bug for the past 9 days. First day it happened like.... 20 times during an 8 hour work day. Since then, it happened 5 times in 9 days (using Spotify-tui 2 to 4 hours a day).

Also, I've noticed that when it happens, those steps - select the device, press ESC to go back to the normal view - are being done much more quickly. I had previously serious lag doing that.

Those are happening less often on spotifyd as well:

Couldn't fetch metadata from spotify: Err(RateLimited(Some(4)))

It's far less annoying now that it happens less often and that I can recover quickly pressing d + ENTER + ESC.

mredaelli commented 4 years ago

I also have an error, after having spotify-tui running for about 10 minutes.

There's no HTTP code, but maybe it's a version thing?

image

However, when I press d after leaving the error message with Esc the selection dialogue does not appear and I have to restart the client.