New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Exceeded API request limit #779
Comments
I'm experiencing this as well. I believe it's just a limitation that Spotify puts on their API requests. I am not entirely sure what approach I'm going to use to figure out how to fix this. I may wrap my usage of I know I ran into this issue because I was calling As I stated before, I'm not sure if it's in scope of this repository. Perhaps the only thing I can think of is that |
@rogeruiz Yeah, my issue was the same, I want to display what song is playing in my status bar. I did this previously with ncspot by querying every second or so. If would indeed be nice if |
yeah i have had this, no workaround either |
@AckslD and @crypticC0der Mulling this over a bit more, I don't think this is in scope for this project. I'd consider closing this issue as there are a number of ways, especially on macOS, to be able to do this without using |
I'm running into the API limits as well except I have not used |
Thanks @dvignoles could reproduce your use some more, please? More information like how you use the app, do you keep it open or open it on demand? Etc etc. Thanks for mentioning you were only using the TUI interface and not the It seems like it might be a good idea to introduce caching locally for some requests to prevent so many API requests from happening. I'll do some testing on my end as well. |
I've been leaving the TUI open 24/7 (usually idle, not playing) in a tmux session. I'm guessing that if you leave a track paused with the TUI open, the playback information keeps being retrieved on some interval. I'm surprised more people haven't run into this problem, considering this github issue is a few months old now. Is it more likely something in my configuration/environment? |
Thanks @dvignoles. Looks like this project should do more caching if that's the case. I'll do a deep dive into the code base to see where this caching would make the most sense to do. https://developer.spotify.com/documentation/web-api/#conditional-requests |
Just want to chime in that I'm also seeing this issue under the same circumstances: spotify-tui always running in a screen, only not idle during working hours. Not sure if it matters but I am using it to control spotifyd on another machine. One interesting thing in my case, when my spike in requests happened I was not actively using spotify-tui or spotifyd on any machines. I'm running centos 7 with spt installed via snap |
A quick update, I found that I wasn't able to connect after getting the api request limit error, closing spt, and waiting till the x amount of seconds had transpired to launch it again (same error with a shorter amount of x seconds). Looking around I found that I had another instance of spt running on the box that is running spotifyd, I killed that one and was able to reconnect on the proper box after the timeout period |
I'm having this issue every morning. My computer is on but idle during the night: I usually play music and leave the app open with the music paused until the next day. I have >150k requests to
|
same issue here too. hitting api limit upon a few hours of usage. running daemon for 5/6 hours. |
I've also been running into this. Not sure if it helps but I set up logging and I noticed this popping up a bunch when nothing was queued up (shows up one or two times a second)
I don't notice this if I pause my music though. Seems to only happen when there's no information about a currently playing track. EDIT: I reproduced this by letting spt run overnight (no music playing) and that request I mentioned earlier was returning a 429 response
Spotify's API docs say they return a |
I took a shot at trying to fix this master...alejandro-angulo:aa/rate-limit . Gonna leave this running for a bit to make sure it actually fixes my issue before opening a PR. In case anyone else wants to try out my change, run EDIT: I left spt running overnight and still ran into the rate limit issue :( |
I saw this in the logs I have
I think we should only be polling for playback every 5s though https://github.com/Rigellute/spotify-tui/blob/master/src/app.rs#L465 I think maybe the issue is that we set/check |
Ah interesting. I've not run into this myself but definitely sounds like a problem - sorry to hear it! I'm afraid I don't have to much spare time to work on this at the moment - so any help here would be appreciated. |
@Rigellute I might be able to help out here. Thanks for the work on spotify-tui btw, it's super neat to be able to control spotify from my terminal. 👍 I think the issue might be that we're not updating |
I got around to putting up #852 which should resolve this issue 🎉 |
Fantastic! I also just started using spt yesterday, and I was using it like normal (have it open to "simple playback" mode to show the song, playing music for roughly 3 hours) and after that time, I started getting the API quota exceeded warning from Spotify. I checked the Spotify dashboard and this was the result: All those requests to /v1/me/player (28,640 of them) within a matter of roughly 3 hours of normal usage (songs constantly playing in the background, showing information about the currently playing song). I seriously hope this PR gets merged ASAP. In the meantime, I'll probably start using your fork. |
@Septem151 My PR was just merged so you should be able to switch back the official repo (don't think it's part of any release yet so you'll have pull down the master branch yourself). |
I will do some testing tomorrow and hopefully cut a new release with @alejandro-angulo 's fix! |
I haven't noticed the issue anymore with the new release. |
Thanks to @alejandro-angulo this is now fixed and released in v0.25! |
Still persist for me :/ I use spt playback to output the actual playing song into my tmux status.
|
I keep getting
when interacting with the tui or through
spt pb
. Am I doing something wrong?The text was updated successfully, but these errors were encountered: