Constantly loses connection
I discovered lofi a couple months ago and was SUPER excited. It's awesome! However, it would constantly lose connection to spotify. Basically every song. So I forgot about it. I reinstalled today hoping it was fixed, but it's not. What can I do? Is there a log I can provide? Is this a known issue?
I was going to raise this but I see it's an existing issue. I have the same problem.
This is probably a Spotify API polling issue not related to Lofi. If you open the debug panel (in the settings), you should see a bunch of 429 errors in there. The next release will provide a small tooltip when that happens.
Can you confirm it's a 429 error?
@dvx We may want to check if we can move Lofi into Spotify's Extended Quota Mode. I think this could prevent all of these.
Hi Nicholas, I’ll check for you tomorrow.
On Mon, 13 Sep 2021 at 13:24, Nicolas St-Amour @.***> wrote:
This is probably a Spotify API polling issue not related to Lofi. If you open the debug panel (in the settings), you should see a bunch of 429 errors in there. The next release will provide a small tooltip when that happens.
Can you confirm it's a 429 error?
— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/dvx/lofi/issues/107#issuecomment-918139402, or unsubscribe https://github.com/notifications/unsubscribe-auth/AR3ROFMV4GCSNIZR4Y2CTB3UBXURTANCNFSM4YVTCPBA . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.
Could the polling be reduced a bit? Would that affect the behavior of the app too much?
Having a slower polling rate would make the app appear unresponsive. Currently the Spotify API is polled every second for the track info (song, artist, track progress, etc.) and every 5 seconds to determine whether or not a track is liked.
We could raise the track info polling to 2 seconds, app responsiveness would take a hit, but the 429 issues would probably go away.
This could be a hidden setting in the config where it defaults to 1sec but could be changed easily (not via the UI).
But now it reaches the limit and then it's unresponsive for +10s. So, maybe spreading it out a bit would make it seem more responsive.
I find myself repeatedly waiting for the warning sign to go out before I can click the like button because It won't work. If you don't notice that, you feel that the app is unresponsive for large amounts of time.
The delay is exponential actually, you get throttled for 1 secs, then 2, then 4, then 10, etc. up to 50ish seconds iirc. This delay is 100% controlled by their backend.
The only way to prevent it is to lengthen the delays between polling, sadly.
Adding a configurable polling rate is easy.
I think we should implement not a delay, but a call rate which the app should maintain. If we get a 249 then the rate is increased slightly. This should, in theory, sync the request rate with the APIs rate limit.
I can try to put together some improvements for us to test and see if it's a better experience.
This is probably a Spotify API polling issue not related to Lofi. If you open the
debugpanel (in the settings), you should see a bunch of429errors in there. The next release will provide a small tooltip when that happens.Can you confirm it's a
429error?
Wanted to jump in with my experience - I am getting throttled almost constantly and have confirmed that the page has 429s in the debug panel. Therefore, I'd love to see either an option in the settings for the user to control the poll rate, or for us to explore the comment from @stamoun:
@dvx We may want to check if we can move Lofi into Spotify's Extended Quota Mode. I think this could prevent all of these.
This looks like a great option - could get the best of both worlds (responsive and no API throttling constantly).